Present activity is being logged into mail.log_current. It's content will be moved into mail.log_yesterday after a day period.
After the next day, it will end its rotation life inside the mail.log file, increasing its content.
To control the mail.log growth process I use the Solaris logadm tool.
book [/]# crontab -l
[...]
# Messaging Server MTA log rotation
0 0 * * 1 /usr/sbin/logadm -c -C 52 -t '$dirname/$basename.$n' /var/opt/sun/comms/messaging64/log/mail.log
book [/]#
Every monday, at 0:00 AM, the logadm rotates the given logfile. It copies the original file (-c) to a next available one, with increased version number ($basename.$n), and truncates the mail.log content to zero (-c). It keeps 52 copies of rotated files (-C 52) and cleans the rest.
No comments:
Post a Comment