I tried switching my MX record from the subdomain mail.mydomain.com to mydomain.com. Updating the Postfix and Dovecot configuration (SSL certs, hostname etc) worked mostly fine. Most e-mail addresses are used to forward mail, but there is a single (virtual) mailbox user managed by Dovecot. The username is [email protected], and his mail is stored at /var/mail/virtual/[email protected].

After changing the rest of the configuration, sending messages to [email protected] (or one of its alias addresses) results in a Postfix error message:

<[email protected]> (expanded from <[email protected]>): unknown user: "mailer"

In Postfix's main.cf, I have

virtual_mailbox_domains = mydomain.com
virtual_mailbox_maps = hash:/etc/postfix/mailbox_users
virtual_transport = lmtp:unix:private/dovecot-lmtp 

and mailbox_users contains a single line

[email protected] OK

Postfix seems to look for a system user now (without the domain), not the Dovecot user [email protected] – which Dovecot/Postfix settings should be changed to solve this problem?

Thanks, Jan

  • Did you modify mailbox_users? If yes, did you run postmap on it? Sep 13, 2022 at 8:34
  • Thank you – I found the solution (s. below).
    – janeden
    Sep 13, 2022 at 9:24

1 Answer 1


Problem solved: I had not changed the value of mydestination for Postfix, which included the updated myhostname (mydomain.com), so there was an overlap between mydestination and the virtual_mailbox_domains.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .