Postfix, Dovecot & RoundCube broke after Ubuntu upgrade

Recently I upgrade my server from Ubuntu 12.04LTS to 14.04.1 LTS. The upgrade went smoothly. However found out later that our email service is not working anymore.

Here are the issues encountered:

1. When user tried to log in via the webmail interface (roundcube) , there is a message that says "Connection to Storage server failed". And the login failed.

2. Whenever I send an email to someone on the mail server, I noticed that it gets stuck in the Postfix Queue Messages. The status message says:

"host jupiter.myserver.com[private/dovecot-lmtp] said: 451 4.3.0 <admin@myserver.com> Temporary internal error (in reply to end of DATA command)"

mail.log shows the following wherever an email was received by Postfix:

jupiter postfix/lmtp[5839]: 4236D10F10: to=<admin@myserver.com>, relay=jupiter.myserver.com[private/dovecot-lmtp], delay=1152, delays=1152/0.01/0/0.01, dsn=4.3.0, status=deferred (host jupiter.myserver.com[private/dovecot-lmtp] said: 451 4.3.0 <admin@myserver.com> Temporary internal error (in reply to end of DATA command))


/var/log/dovecot.log shows this for failed login:

imap-login: Info: Login: user=<admin@myserver.com>, method=PLAIN, rip=106.186.30.93, lip=106.186.30.93, mpid=5806, TLS, session=<1RL8y4QDjgBquh5c>

Sep 21 04:09:36 imap(admin@myserver.com): Debug: Effective uid=5000, gid=5000, home=/var/mail/vhosts/myserver.com/admin

Sep 21 04:09:36 imap(admin@myserver.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:/var/mail/vhosts/myserver.com/admin

Sep 21 04:09:36 imap(admin@myserver.com): Debug: maildir++: root=/var/mail/vhosts/myserver.com/admin, index=, indexpvt=, control=, inbox=, alt=

Sep 21 04:09:36 imap(admin@myserver.com): Error: user admin@myserver.com: Initialization failed: namespace configuration error: inbox=yes namespace missing

Sep 21 04:09:36 imap(admin@myserver.com): Error: Invalid user settings. Refer to server log for more information.

Sep 21 04:10:51 lmtp(5840): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=

Sep 21 04:10:51 lmtp(5840): Info: Connect from local

Sep 21 04:10:51 lmtp(5840): Debug: auth input: admin@myserver.com uid=5000 gid=5000 home=/var/mail/vhosts/myserver.com/admin

Sep 21 04:10:51 lmtp(5840, admin@myserver.com): Debug: Effective uid=5000, gid=5000, home=/var/mail/vhosts/myserver.com/admin

Sep 21 04:10:51 lmtp(5840, admin@myserver.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:/var/mail/vhosts/myserver.com/admin

Sep 21 04:10:51 lmtp(5840, admin@myserver.com): Debug: maildir++: root=/var/mail/vhosts/myserver.com/admin, index=, indexpvt=, control=, inbox=, alt=

Sep 21 04:10:51 lmtp(5840, admin@myserver.com): Error: user admin@myserver.com: Initialization failed: namespace configuration error: inbox=yes namespace missing

Sep 21 04:10:51 lmtp(5840): Info: Disconnect from local: Successful quit


Postfix config file /etc/postfix/main.cf

smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)

biff = no

appenddotmydomain = no

readme_directory = no

smtpdtlscert_file=/etc/ssl/certs/dovecot.pem

smtpdtlskey_file=/etc/ssl/private/dovecot.pem

smtpdusetls=yes

smtpdtlsauth_only = yes

smtpdsasltype = dovecot

smtpdsaslpath = private/auth

smtpdsaslauth_enable = yes

smtpdrecipientrestrictions =

permitsaslauthenticated,

permit_mynetworks,

rejectunauthdestination

myhostname = jupiter.myserver.com

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = localhost

relayhost =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

mailboxsizelimit = 0

recipient_delimiter = +

inet_interfaces = all

virtual_transport = lmtp:unix:private/dovecot-lmtp

virtualmailboxdomains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

virtualmailboxmaps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

virtualaliasmaps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

smtpdrelayrestrictions = permitsaslauthenticated, permitmynetworks, rejectunauth_destination


My dovecot conf file:

!include_try /usr/share/dovecot/protocols.d/*.protocol

protocols = imap pop3 lmtp

dict {

quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext

expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext

}

!include conf.d/*.conf

!include_try local.conf


In closing, these config files were working fine all along and I have not changed anything. I guess there was something in the Ubuntu upgrade that changed something, to break it. I have been working on this for hours but having no success. Any help would be greatly appreciated. Thanks

3 Replies

Ubuntu 12.04 uses Dovecot version 2.0.19 and Postfix version 2.9.1; Ubuntu 14.04 uses Dovecot version 2.2.9 and Postfix version 2.11.0.

It's possible that there are incompatible changes in the configuration files for these. In my experience, Postfix (2.10, 2.11 release notes) tends not to make radical changes (and usually old configuration options are supported). I don't use Dovecot, so can't provide any guidance on that, but the namespace error you're getting might result from some difference in configuration options.

Thanks for your comments. It did put me on the right track to finally find a solution to this problem.

Basically the latest version of Dovecot, its configuration is quite particular about namespaces, which it wasn't in the past. Anyhow adding this to the dovecot.conf file help resolved the issue:

namespace inbox {

inbox = yes

}

Also in the event you have also have an error message that says "Connection refused" when postfix trying to connect to dovecot, within dovecot.conf, uncomment out this line :

listen = *, [::]

This will allow it to listen on both IPv4 and IPv6 interfaces. I had this issue too after I resolved the namespace issue. Hopefully this will help someone else.

i also had a dovecot problem after upgrading to ubuntu 14.04. my imap clients could no longer connect, and i saw these errors in my mail.err file:

> Error: Invalid user settings. Refer to server log for more information.

Error: user xxx@yyy.org: Initialization failed: namespace configuration error: inbox=yes namespace missing
i can confirm that adding a "namespace inbox" section with a "inbox = yes" entry fixed the problem.

however, i did not make the raw change to dovecot.conf as sloo did above. instead, i tweaked conf.d/10-mail.conf, where i had read that namespace definitions are "meant" to go (dovecot.conf includes all the conf.d/*.conf files). i uncommented the topmost namespace definition within 10-mail.conf, and ensured that its inbox= line was uncommented and set to yes. now i'm running fine.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct