MailScanner logs not rotating

Edward L. Hannaford elhannaford at PSFINC.COM
Fri Mar 12 22:32:44 GMT 2004


I think I found the solution.  FYI, I'm running Red Hat Enterprise Edition v3.

Upon examination of logrotate.conf I noticed this little line:
...
include /etc/logrotate.d
...

Looking in this directory I found a file called syslog with the following
entries:
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler
/var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
|| true
    endscript
}

Apparently, after rotating those log files (including maillog!), logrotate
needs to restart the syslogd service.  How much do you want to bet that it's
to allow syslog to recognize the new log files?

I've modifed the section of logrotate.conf that I added.  It now reads thus:
/var/log/MailScanner/ms.log {
    daily
    rotate 14
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
|| true
    endscript
}

I'll let you know if I have any more problems.

-Ed



More information about the MailScanner mailing list