After updating your main.cf and your Dovecot configuration you can now add alias domains to ViMbAdmin:
- Create new domain example.net which we want to alias to example.com
- Create new alias on example.net named *@example.net that forwards to *@example.com
- Test send an email to [email protected] and [email protected] and verify both messages are delivered successfully to [email protected]
Users can log in to Dovecot (IMAP/POP3/SMTP AUTH) using either example.net or example.com. If login fails to find the username/password combo on the first try, it will attempt to look it up in the alias table, and allow login if that succeeds. This way users can configure their mail clients however they please.
Your
virtual_domain_forwardingseems to be more complex than necessary. Assume you want to forward*@example.comto*@example.net. A e-mail to[email protected]arrives and should be forwarded to[email protected]. Why do you care about the existance of[email protected]? Postfix changes theTo:header and starts over with an completely new delivery process. According to the domains managed by Postfix, the mail will be handeled internally (and rejected if the destination doesn't exist) or forwarded to another mail server.Besides the unnecessary complexity, you MUST NOT care about the destination. Assume a setup where
example.netisn't hosted on the same mail system.By the way: It's not necessary to exclude
*aliases invirtual_alias: When somebody sends an email to*@example.com, the mail will be forwarded to*@example.net- what is exactly what you want.Big thanks for your how to anyway!