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 user@example.com and user@example.net and verify both messages are delivered successfully to user@example.com
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_forwarding
seems to be more complex than necessary. Assume you want to forward*@example.com
to*@example.net
. A e-mail tofoo@example.com
arrives and should be forwarded tofoo@example.net
. Why do you care about the existance offoo@example.net
? 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.net
isn'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!