1 (edited by sirpumpkin 2017-10-19 01:40:23)

Topic: dovecot logs still empty

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MYSQL edition.
- Linux/BSD distribution name and version: Ubuntu 16.04.3 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

After appyling the following fix while upgrading to 0.9.7 several months ago, Dovecot log files are still empty:
http://iredmail.org/docs/upgrade.iredma … -log-files

# ls -la /var/log/ | grep dovecot

-rw-------  1 vmail   vmail         0 Okt 15 06:25 dovecot-imap.log
-rw-------  1 vmail   vmail        20 Aug  6 06:25 dovecot-imap.log.10.gz
-rw-------  1 vmail   vmail        20 Okt  9 06:25 dovecot-imap.log.1.gz
-rw-------  1 vmail   vmail        20 Okt  1 06:25 dovecot-imap.log.2.gz
-rw-------  1 vmail   vmail        20 Sep 25 06:25 dovecot-imap.log.3.gz
-rw-------  1 vmail   vmail        20 Sep 17 06:25 dovecot-imap.log.4.gz
-rw-------  1 vmail   vmail        20 Sep 11 06:25 dovecot-imap.log.5.gz
-rw-------  1 vmail   vmail        20 Sep  3 06:25 dovecot-imap.log.6.gz
-rw-------  1 vmail   vmail        20 Aug 28 06:25 dovecot-imap.log.7.gz
-rw-------  1 vmail   vmail        20 Aug 20 06:25 dovecot-imap.log.8.gz
-rw-------  1 vmail   vmail        20 Aug 14 06:25 dovecot-imap.log.9.gz
-rw-------  1 vmail   vmail         0 Okt 15 06:25 dovecot-lda.log
-rw-------  1 vmail   vmail        20 Aug  6 06:25 dovecot-lda.log.10.gz
-rw-------  1 vmail   vmail        20 Okt  9 06:25 dovecot-lda.log.1.gz
-rw-------  1 vmail   vmail        20 Okt  1 06:25 dovecot-lda.log.2.gz
-rw-------  1 vmail   vmail        20 Sep 25 06:25 dovecot-lda.log.3.gz
-rw-------  1 vmail   vmail        20 Sep 17 06:25 dovecot-lda.log.4.gz
-rw-------  1 vmail   vmail        20 Sep 11 06:25 dovecot-lda.log.5.gz
-rw-------  1 vmail   vmail        20 Sep  3 06:25 dovecot-lda.log.6.gz
-rw-------  1 vmail   vmail        20 Aug 28 06:25 dovecot-lda.log.7.gz
-rw-------  1 vmail   vmail        20 Aug 20 06:25 dovecot-lda.log.8.gz
-rw-------  1 vmail   vmail        20 Aug 14 06:25 dovecot-lda.log.9.gz
-rw-------  1 vmail   vmail         0 Okt 15 06:25 dovecot.log
-rw-------  1 vmail   vmail        20 Aug  6 06:25 dovecot.log.10.gz
-rw-------  1 vmail   vmail        20 Okt  9 06:25 dovecot.log.1.gz
[...]

Content of /etc/logrotate.d/dovecot:

/var/log/dovecot*.log {
    compress
    weekly
    rotate 10
    missingok

    # Use bzip2 for compress.
    #compresscmd bzip2
    #uncompresscmd bunzip2
    #compressoptions -9
    #compressext .bz2

    postrotate
        doveadm log reopen
    endscript
}

Could you please help me with this? Thanks a lot! smile

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: dovecot logs still empty

Please show us output of commands below:

doveconf -n | grep log
cat /etc/rsyslog.d/*dovecot*

3

Re: dovecot logs still empty

ZhangHuangbin wrote:

Please show us output of commands below:

doveconf -n | grep log
cat /etc/rsyslog.d/*dovecot*

Hey, sure:

$ doveconf -n | grep log

service imap-login {
service managesieve-login {
service pop3-login {
syslog_facility = local5

# cat /etc/rsyslog.d/*dovecot*

# Debug
if $syslogfacility-text == 'local5' and ($msg contains ": Debug:") then -/var/log/dovecot.log
& stop

# sieve and LMTP
if $syslogfacility-text == 'local5' and ($msg contains "lmtp(" or $msg contains "lda(") then -/var/log/dovecot-lda.log
& stop

# IMAP
if $syslogfacility-text == 'local5' and ($msg contains "imap(" or $msg contains "imap-login:") then -/var/log/dovecot-imap.log
& stop

# POP3
if $syslogfacility-text == 'local5' and ($msg contains "pop3(" or $msg contains "pop3-login:") then -/var/log/dovecot-pop3.log
& stop

# managesieve
if $syslogfacility-text == 'local5' and ($msg contains "managesieve(" or $msg contains "managesieve-login:") then -/var/log/dovecot-sieve.log
& stop

# All other Dovecot log
local5.*    -/var/log/dovecot.log
& stop

4

Re: dovecot logs still empty

Try this:

rm -f /var/log/dovecot*log

We configure Dovecot to use syslog, so the log files must be owned by syslog daemon user/group, and if log files were missing, syslog daemon will create them automatically.

5

Re: dovecot logs still empty

Thanks, this worked.