6

I'm trying to configure postfix and dovecot to work together with virtual domains stored in MySQL, but I keep running into this whenever mail is passed from postfix to dovecot.

Apr 26 11:54:40 smtp postfix/pipe[13165]: 20CCE1C30D5: to=<james@domain.ext>, relay=dovecot, delay=45846, delays=45846/0.28/0/0.14, dsn=4.3.0, status=deferred (temporary failure. Command output: lda: Error: user james@domain.ext: Error reading configuration: Invalid settings: postmaster_address setting not given lda: Fatal: Internal error occurred. Refer to server log for more information. )

Now, since I do know how Google works, I found lots of reference to "you need to add the postmaster_address option to the lda protocol line in 15-lda.conf".

It is, here is the output of doveconf -n

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-49-generic i686 Ubuntu 14.04.2 LTS ext4
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
disable_plaintext_auth = no
last_valid_uid = 5000
mail_debug = yes
mail_gid = vmail
mail_location = maildir:/var/mail/virtmail/%d/%n
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  list = yes
  location = maildir:/var/mail/virtmail/%d/%n
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
  separator = /
  subscriptions = yes
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
postmaster_address = postmaster@piku.xyz
protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
}
ssl_cert = </etc/ssl/private/home.piku.org.uk.crt
ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
ssl_key = </etc/ssl/private/home.piku.org.uk.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_max_userip_connections = 100
}
protocol pop3 {
  mail_max_userip_connections = 10
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  deliver_log_format = msgid=%m: %$
  mail_plugins = sieve sieve
  postmaster_address = postmaster
  quota_full_tempfail = yes
  rejection_reason = Your message to <%t> was automatically rejected:%n%r
}

my /etc/postfix/master.cf contains this to connect it to dovecot

dovecot      unix   -        n      n       -       -   pipe
        flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -d $(recipient)

What else can I check to see what is causing this error?

  • 1
    Tried to change the given value postmaster_address = postmaster to email address including the domain part? – sebix Apr 26 '15 at 11:52
9

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.

  • You can accept your own answer as well and this would make others task much easier in the future. – peterh Apr 27 '15 at 0:23
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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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