Hello all isoqlog group members,
I just discovered isoqlog on Friday and am pretty impressed... I've
desperately needed a tool to monitor email traffic on my servers and
this is a good start.
Thought I would share how I changed my maillog rotation from the default
weekly to daily on my RedHat systems:
Edit the file /etc/logrotate.d/syslog
Remove /var/log/maillog from the line where it appears with all the
other syslog files that get rotated.
Create a new logrotate control file.
I put mine in /etc/maillogrotate.conf
It definitely should NOT go in /etc/logrotate.d directory
NOTES:
The line between the postrotate and the endscript is ONE (1) line of
text, not two (2). (it wraps in my email program)
Be careful of the "back-ticks" (`) which are NOT apostrophes (').
Feel free to change the number of rotations kept from my 32 to whatever
you need.
# Begin maillogrotate control file
/var/log/maillog {
daily
rotate 32
sharedscripts
create
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null ||
true
endscript
}
# End maillogrotate control file
Add a new crontab entry to rotate the maillog everyday at midnight
(crontab -e)
0 0 * * * /usr/sbin/logrotate /etc/maillogrotate.conf 2>&1 > /dev/null
This works for me, and was impossible to find any hints anywhere on how
to do, so I felt obligated to share.
Good luck and enjoy isoqlog,
Rich