[afnog] Logrotate Problem

Peter Nyamukusa petern at africaonline.co.sz
Thu Oct 4 14:59:58 UTC 2007


Hi Tawanda,

I here is a potion of my syslog file and it looks pretty similar to yours,
all my log files are being rotated and compress to .gz in /var/log/ since
this is a production mail server I have opted to delete the rotated files
manually when I no longer have use for them other wise its also possible to
do a script that can clean up say rotated files older than 30 days.

Please compare and advise

}

/var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}

/var/log

mail-20070903.gz      mail.info-20070916.gz  mail.warn-20071004.gz
warn-20070907.gz
mail-20070904.gz      mail.info-20070917.gz  mcelog
warn-20070909.gz
mail-20070905.gz      mail.info-20070918.gz  messages
warn-20070911.gz
mail-20070906.gz      mail.info-20070919.gz  messages-20070107.gz
warn-20070913.gz
mail-20070907.gz      mail.info-20070920.gz  messages-20070519.gz
warn-20070915.gz
mail-20070908.gz      mail.info-20070921.gz  messages-20070911.gz
warn-20070917.gz
mail-20070909.gz      mail.info-20070922.gz  net-snmpd.log
warn-20070919.gz
mail-20070910.gz      mail.info-20070923.gz  net-snmpd.log-20070324.gz
warn-20070921.gz
mail-20070911.gz      mail.info-20070924.gz  net-snmpd.log-20070404.gz
warn-20070923.gz
mail-20070912.gz      mail.info-20070925.gz  net-snmpd.log-20070415.gz
warn-20070925.gz
mail-20070913.gz      mail.info-20070926.gz  net-snmpd.log-20070427.gz
warn-20070927.gz

Cheers,
------------------------------------
Peter Nyamukusa (MCSE, CCIP, A+)
 
 
> -----Original Message-----
> From: afnog-bounces at afnog.org [mailto:afnog-bounces at afnog.org] On Behalf
Of
> tawanda kavayi
> Sent: Thursday, October 04, 2007 11:46 AM
> To: afnog at afnog.org
> Subject: [afnog] Logrotate Problem
> 
> 
> Hi, hope you are all well.
> 
> I'm running a postfix mail server on OpenSuSe 10.2. The postfix is
> running under the Sophos Puremessage for Unix package. My problem is
> that all my mail log files in /var/log are not being rotated. These are
> mail, mail-info and mail-warn. However, all other log files like
> messages, etc, are being rotated.
> 
> I have attached my config files as follows:
> 
> logrotate (/etc/cron.daily/logrotate)
> logrotate.conf (/etc/logrotate.conf)
> syslog ( /etc/logrotate.d/syslog)
> 
> 
> Regards,
> 
> Tawanda




More information about the afnog mailing list