Solved

Logrotate problems

Posted on 2004-04-27
4
338 Views
Last Modified: 2010-04-20
Hi...I have installed logrotate to rotate some logs, I put the configuration file something like this...

/var/log/process.log {
 daily
 rotate 3
 compress
 size=100M
 mail myuser@server.com
}

But It didn´t work when It tried to send me an e-mail, I got some like this....

from: root@server.com
to: myuser@server.com
subject: process.log.1.gz
ýçßýóoÿøÇÿü¿ýóïÿõŸþø‡“õ_ýýøó¿ü;ÂòßýÅßÿ‡øë¿üË¿ù«TÌüúÍ_o
càÍ€Žªt ䷅̾Æ·/Í€[^

I didn´t  receive the attachtment, just a lotta symbols.

Thx...for your help.

Regards..
MARIO
0
Comment
Question by:mcaisapanta
  • 2
4 Comments
 

Author Comment

by:mcaisapanta
ID: 10934430
Do I need some aditional configuration settings?
0
 
LVL 12

Accepted Solution

by:
paullamhkg earned 250 total points
ID: 10934709
try config like this :

compress

/var/log/process.log {
 daily
 rotate 3
 size=100M
 mail myuser@server.com
}

0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 10934719
also try read the man page of logrotate :)

http://www.die.net/doc/linux/man/man8/logrotate.8.html

hope this info can help
0
 
LVL 40

Expert Comment

by:jlevie
ID: 10935192
That's not going to work as is. 'mail' is a very simple program that isn't "attachment aware" and it simply mailed you the compressed data "as is". Either don't compress the log, which will send it as plain text, or compress and then uuencode the log.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now