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

Re: keep sendmail logs longer?



On Mon, 15 Jul 2002 15:56:28 -0400 Loren Jordan <ljordan@nw3c.org>
wrote:

> At 03:20 PM 7/15/2002 -0400, Kurt Yoder wrote:
> >Hello list
> >
> >I'd like to retain my sendmail logs for a longer time on my Debian
> >box. It looks like they're being rotated by syslog? Or is this
> >incorrect? In any case, there's no entry in /etc/logrotate.conf or
> >/etc/logrotate.d/ where I can specify that I'd like to keep the logs
> >longer.
> 
> look in "/etc/logrotate.conf" you will see on line 6 (on woody)
> 
> rotate 4
> 
> change this to be how many weeks you want to keep.  This will catch 
> /var/log/mail.log which is rotated every week, but will NOT catch 

On my system, sendmail logs are rotated by savelog (syslog), not
logrotate, so none of the above applies.

> /var/log/syslog which is rotated every day.

... or every week, depending on how it is called (from cron.daily or
cron.weekly). Actually, depending on the output of the
"syslogd-listfiles [--weekly]" command.

> If your sendmail is logging to /var/log/syslog (I don't run sendmail
> so am not sure where you have it logging to)  you will need to modify 
> /etc/cron.daily/sysklogd and fix the "savelog" line.

Actually, cron.weekly. 

> The -c # argument is the number of days the log file is saved, so just
> fix this to be the number of days you want to keep.

-c # specifies number of cycles, not necessarily days. So, when making
the proposed changes, please consider the number of weeks for which you
want to keep the logs.

Also be aware that changing the savelog line will also apparently impact
all the other weekly log rotations handled by the syslog/savelog dynamic
duo, like daemon.log, messages, lpr.log, auth.log, ...

It's really a PITA not to have logs handled by logrotate, huh?

> I do want to say, I don't know how to make these changes last over a 
> syslogd upgrade, so watch for an upgrade to wipe out your changes.

-- 
Carlos Sousa
http://vbc.dyndns.org/


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: