[Dovecot] Maillog rotates, but dovecot still writes logs into old logfile?
Eric Rostetter
rostetter at mail.utexas.edu
Thu Apr 19 20:43:17 EEST 2007
Quoting Mart Pirita <sysadmin at e-positive.ee>:
> log_path = /var/log/maillog
> info_log_path = /var/log/maillog
Could be dangerous, unless all programs writing to /var/log/maillog use
append mode (and it is on local disks, etc).
> Now when log files are rotating at 04:00 (maillog > maillog.1) dovecot
> still keeps login into maillog.1 and not into maillog, where sendmail,
> etc writes logs.
Yes, sounds right.
> The only solution I did found, is adding into /etc/logrotate.d/syslog
> command to restart dovecot:
>
> /var/log/maillog {
> postrotate
>
> /usr/bin/killall -HUP syslogd
>
> /etc/rc.d/init.d/dovecot restart >/dev/null 2>&1
> endscript
>
> }
>
>
> Any other solution?
Have dovecot log via syslog instead of to a file, and the problem goes
away.
> --
> Mart
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
Go Longhorns!
More information about the dovecot
mailing list