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

Re: Logging of mail events from Postfix to syslog and rotation of the mail logs



On Sun, Jan 29, 2006 at 06:32:47PM -0600, Anthony Simonelli wrote:
> On Sunday 29 January 2006 10:06 am, Simo Kauppi wrote:
> > On Sun, Jan 29, 2006 at 09:17:07AM -0600, Anthony Simonelli wrote:
> > > Currently, I am running a Debian Sarge 3.1 as an MTA server using Postfix
> > > 2.1.5-9.  My questions pertains to the logging of mail events from
> > > Postfix to syslog and rotation of the mail logs.
> > >
> > > Below is my syslog.conf configuration.  Also, where do you specify when
> > > the mail.log files are rotated since it only keeps 7 days worth and I
> > > would like 4 weeks worth?
> >
> > I don't use postfix, but I assume, that it puts its logrotate
> > configuration in the standard place, which is /etc/logrotate.d/
> > directory (or /etc/logrotate.conf file). Look for postfix in there.
> > It has a line, which says 'weekly', change it to 'monthly' (which means
> > that log files are rotated the first time logrotate is run in a month).
> > I'm not sure if it is possible to set it to exactly four weeks. See
> > man logrotate for other possible options to use there.
> >
> > HTH
> > Simo
> 
> Thank you so much!! That had been bothering me for a while now and your answer 
> did the trick.  The funny thing is about the postfix install, I didn't find a 
> syslog entry anywhere on my system.  I thought I'd find an entry 
> in /etc/logrotate.d like where exim4-base has one, but there isn't one.  
> 
> If I write my own in /etc/logrotate.d similar to exim's or another service's 
> settings, will this override the current behavior now?

Hi,

Yes, I believe so. The global option is 'weekly' and files in the
/etc/logrotate.d directory override that. I.e. if postifx doesn't have
logrotation defined anywhere else, you can just create a file in
logrotate.d and that should do the trick.

Simo
-- 
:r ~/.signature

Attachment: signature.asc
Description: Digital signature


Reply to: