[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] logrotate problem



> I am trying to rotate my maillog file every week and email the current log
> file to a support address. I have added this entry to the file syslog in the
> directory /etc/logrotate.d but nothing seems to be happening with it, can
> anyone help
> 
> 
> /var/log/maillog {
> rotate 5
> size=400k
> mail support@xxxxxxxxxxxx
> errors support@xxxxxxxxxxxx
> postrotate
> /usr/bin/killall -HUP syslogd
> endscript
> }

Hey Mark,

If you want it to rotate weekly then you have to specify it in your config
file. Your above config is rotating it according to size. Try something like
I have below.

/var/log/maillog {
rotate 5
weekly
mail support@xxxxxxxxxxxx
errors support@xxxxxxxxxxxx
postrotate
    /usr/bin/killall -HUP syslogd
endscript
}

hth,
j
-- 
http://www.bizmanuals.com