Something new here has cropped up, no changes to configs for some time.
I've had my dovecot using the default /var/log/dovecot.log location for
logging, logrotate used to back this up weekly and logging would
continue using this same file. Now when logrotate runs, it correctly
backs up the log but then creates a new dovecot.log-yyyymmdd file and
dovecot starts logging to that. I'm at a loss as to why this is
happening. My postfix and other processes are still using their correct
log files, so it seems related only to dovecot.
From dovecot/conf.d/10-logging.conf:
# Log file to use for error messages. "syslog" logs to syslog, # /dev/stderr logs to stderr. #log_path = syslog log_path = /var/log/dovecot.log
From /etc/logrotate.d/dovecot /var/log/dovecot.log { weekly rotate 4 missingok notifempty compress delaycompress sharedscripts postrotate doveadm log reopen endscript }
Looks like something happened mid last month but other than periodic software updates nothing has changed for a while here. If I reboot the system, dovecot resumes logging to /var/log/dovecot.log, but as soon as logrotate runs (I did a --force to test) it logs to the new file again.
Hoping this may sound familiar to someone on the list.
On 2024-10-23 14:47, Jim Wright via dovecot wrote:
Something new here has cropped up, no changes to configs for some time. I've had my dovecot using the default /var/log/dovecot.log location for logging, logrotate used to back this up weekly and logging would continue using this same file. Now when logrotate runs, it correctly backs up the log but then creates a new dovecot.log-yyyymmdd file and dovecot starts logging to that. I'm at a loss as to why this is happening. My postfix and other processes are still using their correct log files, so it seems related only to dovecot.
From /etc/logrotate.d/dovecot /var/log/dovecot.log { weekly rotate 4 missingok notifempty compress delaycompress sharedscripts postrotate doveadm log reopen endscript }
After some more troubleshooting, I commented out the compress and delaycompress lines, and that seems to have resolved it. No other logs were being compressed here so no hard done. Have to assume something was going wrong with the compression that led to the issues I was seeing. Will wait for something worse to blow up to dive into it again. LOL
participants (1)
-
jim@themailshack.com