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

Re: [cobalt-users] logrotate problem



On Tuesday 21 May 2002 04:56 am, Mark Ward wrote:
> 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
> }

Try
/var/log/maillog {
 weekly
 rotate 1
 size=400k
 mailfirst support@xxxxxxxxxxxx
 errors support@xxxxxxxxxxxx
 postrotate
     /usr/bin/killall -HUP syslogd
 endscript
 }

mailfirst 
email the just-rotated file instead of the about-to-expire-file 
To test run;
  logrotate -d /etc/logrotate.d/syslog
writes debug info to stdout, does not actually rotate

-- 
Gerald Waugh 
http://www.frontstreetnetworks.com :: Phone. [011] 203.785.0699
Front Street Networks LLC | SOHO Networks & Web Site Hosting
229 Front Street, Ste. #C, New Haven, CT, 06513-3203 United States