Hello, I've got a Centos 5.4 box that is not rotating it's mail logs. I just found out about this, the file is considerably large. I've included my log rotation configs if anyone has any suggestions i'm open to them. Thanks. Dave.
/etc/rsyslog.conf: # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.* /dev/console
# Log anything (except mail) of level info or higher. # Don't log private authentication messages! # don't log clamd messages *.info;ftp.none;clamd.none;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access. authpriv.* /var/log/secure
# Log all the mail messages in one place. mail.* /var/log/maillog
# Log cron stuff cron.* /var/log/cron
# Everybody gets emergency messages *.emerg *
# Save news errors of level crit and higher in a special file. #uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log local7.* /var/log/boot.log
# log ftp stuff separately ftp.* /var/log/ftp.log
/etc/logrotate.d/syslog: /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 /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true endscript }
logrotate.conf: # see "man logrotate" for details # rotate log files weekly weekly
# keep 4 weeks worth of backlogs rotate 4
# create new (empty) log files after rotating old ones create
# uncomment this if you want your log files compressed compress
# RPM packages drop log rotation information into this directory include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here /var/log/wtmp { monthly minsize 1M create 0664 root utmp rotate 1 }
# system-specific logs may be also be configured here.
On Sun, Mar 14, 2010 at 5:10 PM, David Mehler dave.mehler@gmail.com wrote:
I've got a Centos 5.4 box that is not rotating it's mail logs. I just found out about this, the file is considerably large. I've included my log rotation configs if anyone has any suggestions i'm open to them.
I had a system, set up very minimally by someone else, exhibit this behavior. In my case, turned out that the "crontabs" package was not installed, which has the general cron config. Check that?
--wes
Hi, Thanks for your reply. Crontabs package is indeed installed. Thanks. Dave.
On 3/14/10, Wes Shull wes.shull@gmail.com wrote:
On Sun, Mar 14, 2010 at 5:10 PM, David Mehler dave.mehler@gmail.com wrote:
I've got a Centos 5.4 box that is not rotating it's mail logs. I just found out about this, the file is considerably large. I've included my log rotation configs if anyone has any suggestions i'm open to them.
I had a system, set up very minimally by someone else, exhibit this behavior. In my case, turned out that the "crontabs" package was not installed, which has the general cron config. Check that?
--wes _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sunday 14 March 2010 20:38:23 David Mehler wrote:
Thanks for your reply. Crontabs package is indeed installed.
Various things:
1- Check that indeed crond is running (ps -ef | grep cron) 2- Check that the logrotate script is indeed in the /etc/cron.daily|hourly| weekly directories... 3- the best one: run it manually by doing: logrotate -d -f /etc/logrotate.conf
..and see for yourself why isn't running.
HTH, Jorge
Hi, Thanks for your reply. Cron is indeed installed and started. I had a logrotate script in cron.daily. When i ran logrotate -d -f logrotate.conf first it failed to complete with an error having to do with ftp, corrected that, reran it, this time it completed successfully but the major file had not rotated. The script claimed rotation of the maillog* files replacing 5 with 4, but the large maillog file didn't go away. Thanks. Dave.
On 3/14/10, Jorge Fábregas jorge.fabregas@gmail.com wrote:
On Sunday 14 March 2010 20:38:23 David Mehler wrote:
Thanks for your reply. Crontabs package is indeed installed.
Various things:
1- Check that indeed crond is running (ps -ef | grep cron) 2- Check that the logrotate script is indeed in the /etc/cron.daily|hourly| weekly directories... 3- the best one: run it manually by doing: logrotate -d -f /etc/logrotate.conf
..and see for yourself why isn't running.
HTH, Jorge _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos