Anyone having problems with logrotate and CentOS 5.4?<br><br>Although I have /etc/logrotate.d/mail (contents below) to rotate my maillog file, it fails to do it automatically:<br><br><br>/var/log/maillog {<br> compress<br>
dateext<br> maxage 365<br> rotate 60<br> size=+1024k<br> missingok<br> postrotate<br> /etc/init.d/MailScanner restart<br> endscript<br>}<br>++++++++++++++++++++++++++++<br><br><br>logrotate.conf:<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++<br># see "man logrotate" for details<br># rotate log files weekly<br>#weekly<br>daily<br><br># keep 4 weeks worth of backlogs<br>rotate 5<br><br># create new (empty) log files after rotating old ones<br>
create<br><br># uncomment this if you want your log files compressed<br>compress<br><br># RPM packages drop log rotation information into this directory<br>include /etc/logrotate.d<br><br># no packages own wtmp -- we'll rotate them here<br>
#/var/log/wtmp {<br># monthly<br># minsize 1M<br># create 0664 root utmp<br># rotate 1<br>#}<br><br># system-specific logs may be also be configured here.<br>++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
<br>The file rotates correctly if I manually force it, however my logs won't update until I restart syslogd. In other words, the new /var/log/maillog isn't created after the logrotate. I have to manually restart syslogd and manually touch /var/log/maillog.<br>
<br><br>I've made no changes to syslog.conf:<br><br>/etc/syslog.conf:<br>++++++++++++++++++++++++++++++++++++++++++++++++++++<br># Log all kernel messages to the console.<br># Logging much else clutters up the screen.<br>
#kern.* /dev/console<br><br># Log anything (except mail) of level info or higher.<br># Don't log private authentication messages!<br>*.info;mail.none;authpriv.none;cron.none /var/log/messages<br>
<br># The authpriv file has restricted access.<br>authpriv.* /var/log/secure<br><br># Log all the mail messages in one place.<br>mail.* -/var/log/maillog<br>
<br><br># Log cron stuff<br>cron.* /var/log/cron<br><br># Everybody gets emergency messages<br>*.emerg *<br><br># Save news errors of level crit and higher in a special file.<br>
uucp,news.crit /var/log/spooler<br><br># Save boot messages also to boot.log<br>local7.* <br>++++++++++++++++++++++++++++++++++++++++++++++++++++<br><br><br>Thanks!<br>