Qmail vs Sendmail for Virtual Domain

ok i have two domains  abc.com and xyz.com.  fred@abc.com and fred@xyz.com would be valid email accounts, but totally separate.  I want fred@abc.com to access his account through mail.abc.com and fred@xyz.com to acces his account through mail.xyz.com.  Its my understanding that Sendmail will recieve mail from both accounts but the two mail boxes would be the same, Qmail on the other hand would keep them totally separate.  Also i only have one IP.. Can someone if i understand this and what would be the best solution. also where to go to get good docs on implementing the solution
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sendmail can be configured to send mail for fred@abc.com to user fred.abc and mail for fred@xyz.com to user fred.xyz.
Then you make mail.abc.com and mail.xyz.com point to the same machine and tell the two fred's to login using fred.abc or fred.xyz.
This solution is fairly straightforward to configure using linuxconf or whatever point-and-click interface you prefer for sendmail.

It would probably also be possible to run two instances of your pop3 server for mail.xyz.com and mail.abc.com but I think it would require two separate ip-addresses to differentiate between the two.
lugnut1221Author Commented:
the question wasnt really answered
I am not familiar with Qmail and all its features, but I have been using Sendmail extensively for a number of years.  I currently have over 100 domain names running on one machine, and there are numerous domains with common userIDs (such as fred@abc.com and fred@xyz.com).

All domains have unique IP addresses, however I to the best of my knowledge sendmail (and the POP daemon) have no way of distinguishing what IP address a TCP session is using and acting accordingly.  In your case, you only have one IP address, so that wouldn't help even if it could.

So here's my solution for you, which is the way I keep mail separate:

/etc/passwd:  fred
/etc/mail/virtusertable:   fred@abc.com              fred

So his POP login ID is fred

fred@xyz.com   (say he gets his acct first)
/etc/passwd:  fred2
/etc/mail/virtusertable:   fred@abc.com              fred2

And his POP login ID is fred2

The person with the userID of "fred2" can still have "fred" as his email address but just uses a slightly different POP username.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.