If you require separate namespaces for each of your virtual domains, the
configuration is only slightly more complicated. With separate domains, mail to
firstname.lastname@example.org should go to a different mailbox than
mail to email@example.com. In this case, do not list
the additional domains in the
mydestination parameter. Instead, use
virtual_alias_domains = ora.com, oreilly.com
You must create a user account for every email address that will receive messages on your system. Your system accounts do not have to match the email addresses in any way, since you will be mapping the addresses to the accounts separately, but each account must be unique. If your platform supports long usernames, a good way to create unique account names, and to avoid confusion about which accounts are meant to receive mail at which domains, is to use the domain name itself as part of the account name. One possible naming convention is to create accounts such as info.ora.com and info.oreilly.com.
Once Postfix knows which domains to accept mail for, and you have
accounts for each address, use
virtual_alias_maps to map the email addresses to the accounts you create. In
main.cf, point the
virtual_alias_maps parameter to the virtual alias lookup file. In this example, the file
virtual_alias_maps = hash:/etc/postfix/virtual_alias
The /etc/postfix/virtual_alias file contains entries with the email addresses pointing to the system ...