Multiple mail domains, single machine

I have a single machine connected to the internet 24/7, and configured as a Sendmail mail server for a domain, say I would like to configure it as a mail server for another domain, say The problem is that I must have different accounts for each of the two domains. In other words, I would like to have the option of making an account without an account working, and vice versa.
I don't know if virtual hosting can do this.

My machine can use two IP's to appear as two servers to the world..
Can this be done?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

jlevieConnect With a Mentor Commented:
You need to look at which explains what's involved in hosting multiple domains from sendmail's perspective. There's no problem with having usernames at the virtual domains being the same or different from users in the other domains. However, the actual email accounts names must be unique across all domains. After you read the above document all of that will make a lot more sense.

Now, if you want to host virtual domains and don't want the email accounts for your virtual users to be Linux accounts that can be done by using Cyrus  and SASL to implement the client access portion (POP, IMAP) of the email system (see That combination allows for the email accounts to be divorced from the Linux system authentication process and eliminates the need for each email account to have a home directory. The result of that is that you can have email accounts that don't correspond to a Linux account.

By the way the question is phrased it would seem that your virtual email accounts will be accessed by individuals that aren't within your local domain. This will present a problem if those accounts will also need to send outgoing email via your sendmail server. The cleanest and safest solution is to use SMTP AUTH (see and SASL to authenticate your remote users. A properly authenticated user is allowed to bypass the anti-relay restricions.
karouriAuthor Commented:
and how?
karouriAuthor Commented:
Thanks jlevie, your answer is the thing I need and the guess is quite right.
Where can I find an good introductory how-to/ tutorial on these?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

The references that I cited above are the most complete and accurate documents that I know of. Of course the definitive reference on sendmail is the Sendmail book by O'Rielly, but one would hardly call that an introductory reference. There is some information in the Linux HowTo's also ( If, after reading through the documentation above you have specific qurestions, I'd be most willing to try to answer those questions.
karouriAuthor Commented:
Thanks jlevie for the answers.
I am now trying to do it. If I had a problem, I will post it as a seperate question..
Within reason, you can ask other questions related to this on this question and I'll try to answer them here. It's your choice as to whether to open a new question or not.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.