chester c young writes:
with two local domains, d1.com and d2.com, with respective users
support1 and support2.
would like mail to supportATd1.com to be deliverd to support1 (AT
d1.com), and supportATd2.com to go to support2 (AT d2.com).
this should be easy, but not for me today.
That's because d1.com and d2.com should be in hosteddomains, and not locals.
When a message is received for us...@example.com, if example.com is listed in
the locals file, the domain is removed, and the mail is delivered to the
local mailbox "user". When a message is received for us...@example.com, if
example.com is listed in the hosteddomains file, the mail is delivered to
the local mailbox "us...@example.com".
See the courier man page for more information.
Since in your case both d1.com and d2.com are listed in the locals file,
mail received for "supp...@d1.com" is delivered to the local mailbox
"support", and mail received for "supp...@d2.com" is also delivered to the
local mailbox "support", and there is no way to tell them apart.
You will need to move d1.com and d2.com from locals to hosteddomains, rerun
makealiases, then rename all your local accounts. You did not specify which
authentication module you're using, LDAP, MySQL, or something else, but
whichever one you're using you will have to update the corresponding records
and rename each account from "user" to "us...@d1.com" or "us...@d2.com".
Then, afterwards, you may set up two aliases:
supp...@d1.com: supp...@d1.com
supp...@d2.com: supp...@d2.com