Postfix/Dovecot - Multiple Domains and Multiple Linux Accounts

Solution 1:

I believe I've solved this problem, and hoping that this will serve as help for others who encounter this issue. A little disappointed that there wasn't a lot of help here, but I guess the act of writing it out may have helped. Anyway:

In main.cf, the myorigin and mydestination variables need to be set to localhost. So:

myorigin = localhost
mydestination = localhost

Instead of using mydestination to handle domain assignment, switching to virtual domain mapping allows virtual users to get the mail they need.

virtual_alias_domains = hash:/etc/postfix/domains

Which means we need to also properly format the /etc/postfix/domains file:

example.org    #
example.com    #

The comments simply fulfill the hash format, nothing more. A postmap will be necessary on this file as well:

postmap /etc/postfix/domains

That should be it. All of the individual accounts will route email to the proper unix addresses, after the lookup through virtual domains is done.

I still have no idea what "expanding" to a user is, or what was posted by the other individual who had trouble, but it seems irrelevant for this particular issue.

I hope this helps someone else like me.

EDIT: Also remove everything in /etc/aliases.