I have configured Postfix and Dovecot according to the documentation for virtual setups and LMTP transport:
https://www.postfix.org/VIRTUAL_README.html
/usr/local/etc/postfix/main.cf:
virtual_transport = lmtp:unix:/path/name/to/socket
virtual_mailbox_domains = example.com example2.com
virtual_mailbox_maps = hash:/usr/local/etc/postfix/vmailbox
virtual_alias_maps = hash:/usr/local/etc/postfix/virtual
/usr/local/etc/postfix/vmailbox:
[email protected] whatever
[email protected] whatever
/usr/local/etc/postfix/virtual:
[email protected] [email protected]
/usr/local/etc/dovecot/users:
[email protected]:{SHA512-CRYPT}$6$/kTQFQ[...]/::::::userdb_quota_rule=*:storage=2048M
[email protected]:{SHA512-CRYPT}$6$/kTQFQ[...]/::::::userdb_quota_rule=*:storage=2048M
If I send emails from external addresses, it is accepted and properly transported via LMTP. Generally everything works as expected.
To remain in this example, when I send an email from [email protected] via authenticated SMTP submission to [email protected], it always throws:
<[email protected]>: host mx.example.com[private/dovecot-lmtp] said: 550 5.1.1
<[email protected]> User doesn't exist: [email protected] (in reply
to RCPT TO command)
I'm aware that the error is thrown by Dovecot's LMTP. What I don't understand is why everything works from unauthenticated external addresses but not when sending authenticated on my own.
I'm thankful for any pointers. If more configuration data is needed, let me know and I will add it.