1

Upgraded Ubuntu from 14.04lts to 16.04lts, having problems with dovecot, which ran fine under 14.04. Exim4 mail server running fine (receiving and delivering).

Purged the dovecot install and deleted /etc/dovecot; reinstalled and disabled imap and configured required ssl (plus certificate) for imaps, set logfile to /var/log/dovecot. I've also enabled all verbose dovecot logging.

No apparmor denied messages (the only dovecot messages in syslog and kern.log are for apparmor, there are no dovecot messages in /var/log/mail.log), but /var/log/dovecot contains:

Jul 31 16:21:23 master: Info: Dovecot v2.2.22 (fe789d2) starting up for imap (core dumps disabled)
Jul 31 16:21:31 master: Fatal: execv(/usr/lib/dovecot/imap-login) failed: Permission denied
Jul 31 16:21:31 master: Error: service(imap-login): command startup failed, throttling for 2 secs
Jul 31 16:21:31 imap-login: Fatal: master: service(imap-login): child 16741 returned error 84 (exec() failed)
Jul 31 16:21:33 master: Fatal: execv(/usr/lib/dovecot/imap-login) failed: Permission denied
Jul 31 16:21:33 master: Error: service(imap-login): command startup failed, throttling for 4 secs
...etc, repeats...

systemctl seems ok:

%> systemctl status dovecot.socket
● dovecot.socket - Dovecot IMAP/POP3 email server activation socket
   Loaded: loaded (/etc/systemd/system/dovecot.socket; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-07-31 16:21:23 CDT; 8min ago
   Listen: 0.0.0.0:993 (Stream)
           [::]:993 (Stream)

Jul 31 16:21:23 xxxxx systemd[1]: Listening on Dovecot IMAP/POP3 email server activation socket.

Permissions:

%> ls -l /usr/lib/dovecot/imap-login
-rwxr-xr-x 1 root root 31K Apr  5 08:45 /usr/lib/dovecot/imap-login*

I cannot figure out from the various logs what is actually not working. How can I identify where the configuration problem is?

0

OK, long story. Turned off apparmor, and everything worked. Turned it back on and got a message that there were two profiles for dovecot. This was causing apparmor to hang somehow on startup without logging messages about dovecot, and dovecot never got much past opening the socket so it wasn't logging anything after the first message. Removed the duplicate profile, a bunch of new progress messages from dovecot appeared in its logfile, and a bunch of apparmor denied audits appeared.

After adding about 60 lines to the dozen apparor dovecot configs to clear the denied audits, it finally works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.