[Dovecot] Log rotation?
Hi people.
I had read dovecot logging info, they say something about using log rotation to help us rotate our log, with this setup:
# dovecot SIGUSR1: Re-opens the log files.
/var/log/dovecot*.log {
missingok
notifempty
delaycompress
sharedscripts
postrotate
/bin/kill -USR1 cat /var/run/dovecot/master.pid 2>/dev/null
2>
/dev/null || true
endscript
}
Well, my question is simple, Do we need to restart the service each time logrotation runs?
In my case, is wrong this?
var/log/dovecot*.log { weekly rotate 8 notifempty missingok copytruncate create 600 root start 0 }
I have 2 dovecot logs:
dovecot-info.log dovecot.log
dovecot-info.log is the biggest, 5MB by week, is to much? Do I have to change our log rotation to "daily"?
Centos 5.4 updated, dovecot 1.0.7-7.el5, thanks!!!
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Beto Moreno said the following on 28/12/09 08:02:
I had read dovecot logging info, they say something about using log rotation to help us rotate our log, with this setup:
With CentOS ad Dovecot logging via [r]syslog I simply add the dovecot logfile to the list of /etc/logrotate.d/syslog
It works since Dovecot 0.6x :)
Ciao, luigi
/ +--[Luigi Rosa]-- \
If you always postpone pleasure you will never have it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAks4WYEACgkQ3kWu7Tfl6ZTGYACdGi0v/Unp35QDjNrp6ksJQvcL NKIAoI5SGx+ervphXKTbMt6ceakuBEnc =8Oyr -----END PGP SIGNATURE-----
On Sun, Dec 27, 2009 at 11:08 PM, Luigi Rosa lists@luigirosa.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Beto Moreno said the following on 28/12/09 08:02:
I had read dovecot logging info, they say something about using log rotation to help us rotate our log, with this setup:
With CentOS ad Dovecot logging via [r]syslog I simply add the dovecot logfile to the list of /etc/logrotate.d/syslog
It works since Dovecot 0.6x :)
Ciao, luigi
/ +--[Luigi Rosa]-- \
If you always postpone pleasure you will never have it. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAks4WYEACgkQ3kWu7Tfl6ZTGYACdGi0v/Unp35QDjNrp6ksJQvcL NKIAoI5SGx+ervphXKTbMt6ceakuBEnc =8Oyr -----END PGP SIGNATURE-----
Hi luigi.
On my syslog I have this:
local5.* /var/log/dovecot.log
But for dovecot I have 2 log file:
Error message: dovecot.log Info message: dovecot-info.log
How do u are handling this logs?
Thanks for your help!!!
On Sun, 2009-12-27 at 23:02 -0800, Beto Moreno wrote:
postrotate /bin/kill -USR1
cat /var/run/dovecot/master.pid 2>/dev/null
2> /dev/null || true endscript }Well, my question is simple, Do we need to restart the service each time logrotation runs?
If you've configured log_path in Dovecot, you need to run the postrotate kill command above. It doesn't restart Dovecot, it just makes Dovecot reopen the log file.
participants (3)
-
Beto Moreno
-
Luigi Rosa
-
Timo Sirainen