[Dovecot] Dovecot stops logging of imap logins after logrotation
Hi list,
on my Debian box there is a logrotation cron job that will gzip existing /var/log/mail.log file and create a new mail.log.
It seems that after running logrotation dovecot stops logging successful POP or IMAP logins to /var/log/mail.log (nevertheless, it still works to login with POP or SMTP).
This is bad because pop-before-smtp mechanisms also stop working.
I have deactivated logrotation cron job and will monitor mail.log file.
Maybe I should just run /etc/init.d/dovecot restart after logrotation script.
What do you think?
TIA Gerhard
Gerhard Hofmann wrote:
Maybe I should just run /etc/init.d/dovecot restart after logrotation script.
Probably overkill (sorry for the pun!). We just kill -HUP the Dovecot master process :-
kill -HUP cat /var/run/dovecot/master.pid
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
Gerhard Hofmann wrote:
Hi list,
on my Debian box there is a logrotation cron job that will gzip existing /var/log/mail.log file and create a new mail.log.
It seems that after running logrotation dovecot stops logging successful POP or IMAP logins to /var/log/mail.log (nevertheless, it still works to login with POP or SMTP).
Most likely Dovecot is still holding onto the file. Sensible log rotation leaves the most recently rotated log uncompressed, in case the daemon is still holding a file descriptor. Most programs (Dovecot included) allow you to send them a signal to tell them to release the log files.
Maybe I should just run /etc/init.d/dovecot restart after logrotation script.
What do you think?
I think someone else has already pointed out a SIGHUP should be enough.
-- Curtis Maloney cmaloney@cardgate.net
On 10.2.2006 00:35, "Curtis Maloney" <cmaloney@cardgate.net> wrote:
Maybe I should just run /etc/init.d/dovecot restart after logrotation script.
What do you think?
I think someone else has already pointed out a SIGHUP should be enough.
SIGUSR1 works also, and doesn't waste time reloading configuration.
participants (5)
-
Chris Wakelin
-
Curtis Maloney
-
Gerhard Hofmann
-
Luigi Rosa
-
Timo Sirainen