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. > > Postfix mail events are logged in both mail.log and syslog under /var/log/ at > the moment, leaving me with nearly identical logs. I'd rather conserve the > space and designate only one log file for Postfix mail events (mail.log). > > Since the system log contains all of Postfix's logs, any other system > messages > are lost in the mail events when logcheck sends me it's reports. I already > use pflogsumm and awstats to analyze my email activity so I need to stop the > mail events from being logged in syslog. Can anyone show me how this can be > done?
> # /etc/syslog.conf Configuration file for syslogd. > # > # For more information see syslog.conf(5) > # manpage. > > # > # First some standard logfiles. Log by facility. > # > > auth,authpriv.* /var/log/auth.log > *.*;auth,authpriv.none -/var/log/syslog mail.none should do the trick, i.e. *.*;auth,authpriv.none,mail.none -/var/log/syslog See man syslog.conf for more details... > 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 -- :r ~/.signature
signature.asc
Description: Digital signature