postfix/dovecot says "postmaster_address setting not given" but it is

Solution 1:

I fixed it, but the fix wasn't so obvious.

Having a missing postmaster_address setting was not the actual problem. dovecot-lda not looking at the correct config file was the actual problem.

However the deeper problem seems to be this "feature" I randomly came across on Google https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/671065 where

The deliver configuration (LDA) is stored in '/etc/dovecot/conf.d/01-mail-stack-delivery.conf'. This is fundamentally broken because dovecot's deliver ignores files included with !include_try and !include. This problem shows up with this error:

Fatal: postmaster_address setting not given

And is cured by adding -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf to the dovecot-lda command line in master.cf (although then you have to make both conf.d and the file itself world-readable so the non-root dovecot-lda can read it, which feels like a horrible hack, rather than an actual solution... but now I have working mail.

I leave this answer here in case there is anyone else using Ubuntu who ends up in this situation. May you spend less time than I did fixing it.

Solution 2:

Better answer for me was to add

postmaster_address=postmaster at DOMAIN

obviously substituting you actual domain for "DOMAIN" in your

/etc/dovecot/dovecot.conf

and then restarting dovecot

service dovecot restart

Not my answer... I just found it here: https://github.com/mail-in-a-box/mailinabox/issues/31 and it fixed my problem.