Skip to search.
isoqlog

Group Information

  • Members: 112
  • Category: Open Source
  • Founded: Feb 28, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
How to rotate maillogs daily on RedHat   Message List  
Reply Message #313 of 2237 |
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





Mon May 26, 2003 12:04 am

pianohuff
Offline Offline
Send Email Send Email

Message #313 of 2237 |
Expand Messages Author Sort by Date

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...
Rich Huff
pianohuff Offline Send Email
May 26, 2003
12:04 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help