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@example.com, and his mail is stored at /firstname.lastname@example.org.
After changing the rest of the configuration, sending messages to email@example.com (or one of its alias addresses) results in a Postfix error message:
<firstname.lastname@example.org> (expanded from <email@example.com>): 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
mailbox_users contains a single line
Postfix seems to look for a system user now (without the domain), not the Dovecot user firstname.lastname@example.org – which Dovecot/Postfix settings should be changed to solve this problem?