I do this but I am not sure it is the only way. The first thing you have to do is have two separate "real" accounts. You would have "byrdman@domain1.com" go to the real account "byrdman1" and "byrdman@domain2.com" go to the real account "byrdman2". You do this by adding the entries to the "/etc/mail/virtusertable":
- Code: Select all
byrdman@domain1.com byrdman1
byrdman@domain2.com byrdman2
The above is not exactly how I do it because I need the actual email address to end up going to sevaral "real" addresses. An example is having a "contact@domain1.com" where several people need to get messages sent to that address. A completely different group of people need to get mail sent to "contact@domain2.com". The way I do this is to use mail aliases in addition to the virtusertable. The /etc/mail/virtusertable would look like this:
- Code: Select all
contact@domain1.com contactalias1
contact@domain2.com contactalias2
and in the /etc/aliases file you would have:
- Code: Select all
contactalias1: user1, user2, user3@someotherdomain.com
contactalias2: user4, user5, user6@yetanotherdomain.com
Hope this helps...
[edit]
Just looked it up on the sendmail web site and they suggest doing it the way I did above. This is probably the page where I learned how to do it:
http://www.sendmail.org/virtual-hosting.html
[/edit]