Hi everybody !
Had the same issue on Debian, quite annoying.
However, as udi111 points out, the problem here is not to restart rsyslogd, but to restart dovecot at every logrotate. This is because dovecot is configured to log to a logfile, and not to syslog or rsyslogd or syslog-ng.
This is further complicated by the fact that in iredmail, the old logfile gets compressed with bzip2 as soon as the rotation is executed, so dovecot tries to log to a compressed file, and actually logs nowhere.
Summing up, if you have your dovecot configured to log to a file (which means in /etc/dovecot/dovecot.conf you have a line such as:
log_path = /var/log/dovecot.log
Then you need to restart dovecot, and not rsyslogd, in the logrotate file.
Since I prefer the next newer log to be left uncompressed, and I don´t really care to compress logfiles with bzip2, here is my modified /etc/logrotate.d/dovecot file:
/var/log/dovecot.log {
compress
# delaycompress will leave the next newest log uncompressed
delaycompress
weekly
rotate 10
create 0600 vmail vmail
missingok
# Use bzip2 for compress.
#compresscmd /bin/bzip2
#uncompresscmd /bin/bunzip2
#compressoptions -9
#compressext .bz2
postrotate
# Since dovecot is configured to log directly to a file, we
# need to restart Dovecot here, not syslog-ng
#invoke-rc.d syslog-ng reload > /dev/null
/bin/kill -USR1 `cat /var/run/dovecot/master.pid 2>/dev/null` 2> /dev/null || true
endscript
}
iredmail developers, please fix this in the next release
Best regards