Topic: Dovecot logging issue
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6 MARIADB edition
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====
This is a new install. I was trying to help a user get set up and I needed to see the dovecot-imap log. To my surprise, all the dovecot logs were empty:
t# ll /var/log/dovecot*
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot-imap.log
-rw-r--r-- 1 syslog adm 54057 May 7 06:18 /var/log/dovecot-imap.log.1.gz
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot-lda.log
-rw-r--r-- 1 syslog adm 7155 May 7 06:23 /var/log/dovecot-lda.log.1.gz
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot.log
-rw-r--r-- 1 syslog adm 692 May 5 19:29 /var/log/dovecot.log.1.gz
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot-pop3.log
-rw-r--r-- 1 syslog adm 16874 May 7 06:25 /var/log/dovecot-pop3.log.1.gz
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot-sieve.log
-rw-r--r-- 1 syslog adm 343 May 6 11:46 /var/log/dovecot-sieve.log.1.gz
Seems they were owned by vmail and had permissions of 600, so syslog couldn't write to them.
Changing ownership fixed the issue, but hopefully there's a better fix:
# chown syslog /var/log/dovecot*
# ll /var/log/dovecot*
-rw------- 1 syslog vmail 12962 May 9 19:05 /var/log/dovecot-imap.log
-rw-r--r-- 1 syslog adm 54057 May 7 06:18 /var/log/dovecot-imap.log.1.gz
-rw------- 1 syslog vmail 622 May 9 19:04 /var/log/dovecot-lda.log
-rw-r--r-- 1 syslog adm 7155 May 7 06:23 /var/log/dovecot-lda.log.1.gz
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot.log
-rw-r--r-- 1 syslog adm 692 May 5 19:29 /var/log/dovecot.log.1.gz
-rw------- 1 syslog vmail 2744 May 9 19:05 /var/log/dovecot-pop3.log
-rw-r--r-- 1 syslog adm 16874 May 7 06:25 /var/log/dovecot-pop3.log.1.gz
-rw------- 1 syslog vmail 0 May 7 06:27 /var/log/dovecot-sieve.log
-rw-r--r-- 1 syslog adm 343 May 6 11:46 /var/log/dovecot-sieve.log.1.gz
Besides setting a cron to chown those files is there a fix?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.