[BlueOnyx:16476] Re: Sendmail - Maillog

Jim Scott jscott at infoconex.com
Tue Nov 18 11:40:07 -05 2014


Chris,

> Is there a way to have to Maillog reset nightly (like the older servers) as I 
> have to review it for errors and its a week old and massive. 

You can change the default behavior for all logs OR just the maillog.

To make the change so it happens for all logs modify /etc/logrotate.conf and change 
setting from weekly to daily. 


# rotate log files weekly
#weekly
daily


If you want to modify the maillog then go into /etc/logrotate.d/syslog and add daily 
inside the brackets. Note as you can see cron, maillog, messages, secure and spooler 
will all be affected.


/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
    daily
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}






More information about the Blueonyx mailing list