View Single Post
  #26  
Old 27th June 2007, 11:08
AlArenal AlArenal is offline
Senior Member
 
Join Date: Feb 2007
Location: Germany
Posts: 104
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Ok, I'm currently on my second attempt to explore how things are working. Seems after the years where I had less to do with administration, I've gotten a bit rusty...

Normal rotation in /var/log is done via /etc/cron.daily/sysklogd

Changing

Code:
for LOG in `syslogd-listfiles`
into

Code:
for LOG in `syslogd-listfiles -s "mail.*"`
disables the default rotation for the mail-logs (mail.info, mail.log, mail.warn, mail.err).

Now we have no rotation at all, except of mail.log's rotation, as described in the howto at the bottom of /etc/logrotate.conf . What's missing now is rotation setting for the other logfiles. Because I like to have it all in one place and sorted, I move the howto's config out of logrotate.conf .

Instead I create a file /etc/logrotate.d/postfix and put this in it:
Code:
"/var/log/mail.log" /var/log/mail.err /var/log/mail.info /var/log/mail.warn {
  missingok
  daily
  rotate 7
  create 640 root adm
  compress
  start 0
  postrotate
        /etc/init.d/postfix reload > /dev/null
  endscript
}
Whether this works or not, tomorrow I will know for sure

P.S.:
If you're using spamassassin it will complain about a lot of stuff in the report (because it contains a lot of spamner's addresses and such stuff). For not having to scan your junk mail folder for the report it makes perfectly sense to add "whitelist_from pflogsumm@yourserver.tld" to your local.cf . Better do not configure this address as real account on your system or otherwise you may end up receiving real spam sent to this address.

Last edited by AlArenal; 27th June 2007 at 11:19.
Reply With Quote