Re: [Dovecot] "doveadm log reopen" don't reopen separate lmtp log
I still see the issue below. Is there anyone running separate LMTP logging that could check if they experience the same issue?
Best regards Henrik Larsson
-------- Original Message -------- Subject: "doveadm log reopen" don't reopen separate lmtp log Date: Sun, 25 Sep 2011 00:23:49 +0200 From: Henrik Larsson dovecot-user@spambox.dk To: dovecot@dovecot.org
Dear all
I have setup separate pop3/imap log "/var/log/dovecot" and lmtp delivery log "/var/log/dovecot-deliver".
After rotating logfiles, i run "doveadm log reopen". I see that my pop3/imap log "/var/log/dovecot" is used straight away, but my lmpt log "/var/log/dovecot-deliver" isn't used at first. After some time, usually a few minutes, logs are being written to this file anyway. But if I compare this to my maillog, it misses some deliveries just after the log rotation.
Is there any problems with this configuration that should be corrected?
--cut-- # doveconf -n # 2.0.15: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.2-STABLE amd64 auth_mechanisms = plain login digest-md5 cram-md5 first_valid_uid = 125 hostname = mail.larsson.it listen = * log_path = /var/log/dovecot mail_plugins = fts fts_squat zlib mail_privileged_group = postfix mail_temp_dir = /var/db/dovecot managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date namespace { inbox = yes location = prefix = separator = . type = private } namespace { hidden = yes inbox = no list = no location = prefix = INBOX. separator = . type = private } passdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { fts = squat fts_squat = partial=4 full=10 sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 lmtp sieve service auth-worker { user = $default_internal_user } service auth { unix_listener /home/mail/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service lmtp { executable = lmtp -L unix_listener /home/mail/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } ssl_cert =
Best regards Henrik Larsson
The problem isn't lmtp itself, it's that you're using -L parameter, which causes LMTP processes to open the log files directly. The only way to reopen the log files is to restart those LMTP processes. "doveadm reload" should do it.
On 18.10.2011, at 18.32, Henrik Larsson wrote:
I still see the issue below. Is there anyone running separate LMTP logging that could check if they experience the same issue?
Best regards Henrik Larsson
-------- Original Message -------- Subject: "doveadm log reopen" don't reopen separate lmtp log Date: Sun, 25 Sep 2011 00:23:49 +0200 From: Henrik Larsson dovecot-user@spambox.dk To: dovecot@dovecot.org
Dear all
I have setup separate pop3/imap log "/var/log/dovecot" and lmtp delivery log "/var/log/dovecot-deliver".
After rotating logfiles, i run "doveadm log reopen". I see that my pop3/imap log "/var/log/dovecot" is used straight away, but my lmpt log "/var/log/dovecot-deliver" isn't used at first. After some time, usually a few minutes, logs are being written to this file anyway. But if I compare this to my maillog, it misses some deliveries just after the log rotation.
Is there any problems with this configuration that should be corrected?
--cut-- # doveconf -n # 2.0.15: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.2-STABLE amd64 auth_mechanisms = plain login digest-md5 cram-md5 first_valid_uid = 125 hostname = mail.larsson.it listen = * log_path = /var/log/dovecot mail_plugins = fts fts_squat zlib mail_privileged_group = postfix mail_temp_dir = /var/db/dovecot managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date namespace { inbox = yes location = prefix = separator = . type = private } namespace { hidden = yes inbox = no list = no location = prefix = INBOX. separator = . type = private } passdb { args = /usr/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { fts = squat fts_squat = partial=4 full=10 sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 lmtp sieve service auth-worker { user = $default_internal_user } service auth { unix_listener /home/mail/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service lmtp { executable = lmtp -L unix_listener /home/mail/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } ssl_cert =
Best regards Henrik Larsson
The problem isn't lmtp itself, it's that you're using -L parameter, which causes LMTP processes to open the log files directly. Just to be sure, isn't this the only way to have a separate LMTP log files? The only way to reopen the log files is to restart those LMTP processes. "doveadm reload" should do it. Thanks, I will try this.
Best regards Henrik Larsson
On 18.10.2011, at 20.53, Henrik Larsson wrote:
The problem isn't lmtp itself, it's that you're using -L parameter, which causes LMTP processes to open the log files directly. Just to be sure, isn't this the only way to have a separate LMTP log files?
Yes. But this isn't LMTP-specific in any way. It's the same as if you wanted separate IMAP or POP3 or whatever log files. The only special cases are programs that are executed directly instead of via dovecot master process (dovecot-lda, doveadm basically), because they always open the log files directly (and die once they're finished, so they don't have the rotation problem).
Hmm. Actually you could probably set service_count=1 for lmtp service and it would get rotated soon enough, because the process would die after handling one LMTP connection.
participants (2)
-
Henrik Larsson
-
Timo Sirainen