Log rotation and combining...
SH Development
listaccount at starionline.com
Thu Nov 16 11:27:44 EET 2017
I have recently noticed that my dovecot-deliver.log is huge and wanted to start rotating it. So a couple of questions:
1. Can the dovecot-deliver.log be combined with the maillog, that gets rotated weekly? If it can be done, is it advisable?
Since the inception of this particular server, the log file has been located in the /home/vmail directory. Is there a reason it shouldn’t be located in the /var/log directory with the maillog?
2. Separate from above, if I create a new logrotate script example as follows:
# dovecot SIGUSR1: Re-opens the log files.
/home/vmail/dovecot-deliver.log {
missingok
notifempty
delaycompress
sharedscripts
postrotate
/bin/kill -USR1 `cat /var/run/dovecot/master.pid 2>/dev/null` 2> /dev/null || true
endscript
}
I get the following error only when cron tries to run it:
/etc/cron.daily/logrotate:
error: stat of /home/vmail/dovecot-deliver.log failed: Permission denied
Owner on the log are vmail:vmail. If I manually force logrotate on this particular log, it works fine.
Ethon
More information about the dovecot
mailing list