Thanks man

You suggesting the same as https://wiki2.dovecot.org/Logging says?

postrotate
 kill -s 0 `cat /var/run/dovecot/master.pid` || kill -s USR1 `cat /var/run/dovecot/master.pid`
endscript
Well, I already tried that and didn't work. Hence my guess that it's something else.

On 15/06/18 13:19, Stephen Satchell wrote:
From the manpage:
SIGNALS
       Dovecot handles the following signals as described:

       USR1   Force dovecot to reopen  all  configured  log  files
       (log_path, info_log_path and debug_log_path).

So, you need to add

  kill -s USR1 `cat /var/run/dovecot/master.pod`

(or wherever your distribution puts the PID for dovecot) in your
log-rotate file, to tell Dovecot to use the new log file.
Alternatively, check to see if "doveadm" is installed in your system; if
not, that would cause exactly the symptoms you are seeing.

On 06/14/2018 03:30 PM, Michael Heuberger wrote:
Hi there

This is weird. On my latest Ubuntu server Dovecot seems to write to
/var/log/dovecot.log.1 instead of a recently created /var/log/dovecot.log

Here my logrotate config for Dovecot:

/var/log/dovecot.log {
        su root syslog
        rotate 7
        missingok
        copytruncate
        create 666 root syslog
        sharedscripts
        postrotate
            doveadm log reopen
        endscript
}

Doveadm should reopen it but no, still writes to old log file.

Not sure, maybe it's someone else, not dovecot, writing to the log file?

And here the versions:

# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.14.49-rh65-20180612025235.xenU.x86_64 x86_64 Ubuntu 18.04 LTS

How can we investigate best? Or is there a mistake in the above
logrotate config?

- Michael


    

-- 

Binary Kitchen
Michael Heuberger
1/33 Parrish Road
Sandringham
Auckland 1025
(New Zealand)

Mobile (text only) ...  +64 21 261 89 81
Email ................  michael@binarykitchen.com
Website ..............  http://www.binarykitchen.com