Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

Logrotate problems

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
mcaisapanta
Asked:
mcaisapanta
  • 2
1 Solution
 
mcaisapantaAuthor Commented:
Do I need some aditional configuration settings?
0
 
paullamhkgCommented:
try config like this :

compress

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

0
 
paullamhkgCommented:
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
 
jlevieCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now