[Dovecot] Maillog rotates, but dovecot still writes logs into old logfile?

Mart Pirita sysadmin at e-positive.ee
Thu Apr 19 20:28:52 EEST 2007


Tere.


I use:

log_path = /var/log/maillog
info_log_path = /var/log/maillog

And into /var/log are:

maillog
maillog.1
maillog.2
maillog.3

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.

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?

-- 
Mart



More information about the dovecot mailing list