View Single Post
  #18  
Old 14th November 2007, 15:25
satommy satommy is offline
Junior Member
 
Join Date: Oct 2007
Posts: 9
Thanks: 0
Thanked 3 Times in 2 Posts
Default

Quote:
Originally Posted by satommy
In addition to this:

the mail logrotate file needs to be different.

----------------------------------------------------

/etc/logrotate.d/mail :

/var/log/mail.log {
rotate 30
daily
compress
delaycompress
create 644 root adm
}

/var/log/mail.err {
rotate 30
daily
compress
delaycompress
create 644 root adm
}

/var/log/mail.info {
rotate 6
weekly
compress
delaycompress
create 644 root adm
}

/var/log/mail.warn {
rotate 6
weekly
compress
delaycompress
create 644 root adm
}
------------------------------------------------------------

We also need to disable some lines in the /etc/logrotate.conf.

We can do this with the following commands:

---------------------------------------------------------------

sed 's/mail\.\*\t/#mail\.\*\t/' /etc/syslog.conf | sed 's/mail\.info\t/#mail\.info\t/' | sed 's/mail\.warn\t/#mail\.warn\t/' | sed 's/mail\.err\t/#mail\.err\t/' > /etc/syslog.tmp

------------------------------------------------------------

mv -f /etc/syslog.tmp /etc/syslog.conf

----------------------------------------------------------

So this should do the final trick :-)

Gr. Tommy
Guys,

After testing the above solutions for a couple of days it seems the log files get corrupted, so please do not include this. I am working on a working solution ;-)

Thnx
Reply With Quote