[Dovecot] rotate logs ?
Robert Schetterer
robert at schetterer.org
Tue Jan 18 22:34:00 EET 2011
Am 18.01.2011 20:50, schrieb Mark Alan:
> On Tue, 18 Jan 2011 11:53:17 +0200, Timo Sirainen <tss at iki.fi> wrote:
>> Be sure to send a SIGUSR1 signal to dovecot process too so that it
>> reopens the logs. (With v2.0 you can use doveadm log reopen.)
>
> Would this do?
>
> /var/log/dovecot.log {
> weekly
> rotate 4
> create 600 root root
> size 64k
> compress
> notifempty
> postrotate
> [ -f /var/run/dovecot/master.pid ] && kill -USR1 $(cat /var/run/dovecot/master.pid)
> endscript
> }
>
>
> M.
be aware that new /var/log/dovecot.log after rotate is writable to the
dovecot user
after all i would use daily
logrotate differs a little bit from distro to distro
simply try it
logrotate --help
Usage: logrotate [OPTION...] <configfile>
-d, --debug Don't do anything, just test (implies -v)
-f, --force Force file rotation
-m, --mail=command Command to send mail (instead of
`/usr/bin/mail')
-s, --state=statefile Path of state file
-v, --verbose Display messages during rotation
so i.e
logrotate -f -v /etc/logrotate.d/dovecot
will help to test
and/or
look
http://wiki.dovecot.org/Logging
--
Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
More information about the dovecot
mailing list