Email for Multiple Domains on Same Server

Posted on 2002-06-13
Last Modified: 2010-03-18
I have just added a second domain to my server, and I am having major problems setting up email for it.

Previous to that, there was just one domain assigned to the server. To add users for that first domain, basically I just used adduser and then they had email access.. simple. Now that there is a second domain on there (and more coming), I cannot keep using adduser because there will be conflics with usernames eg. people wanting webmaster, admin, etc for their domain. I wish to keep the emails consistant and not alias them to another username. eg I do not wish to alias to username webmaster01 and then to username webmaster02 or seomthing like that.

From what I have read, I believe a properly configured POP server can manage user authentication with out using /etc/passwd ie adduser?? Is this correct and how do I go about configuring for the above situation?

I hope my explanation is clear.. if not, just ask me to clarify it further.

Thanks in advance!
Question by:cfinniga
  • 5
  • 4
LVL 15

Expert Comment

ID: 7080358

What is you mail server.

If you happens to be running Sendmail has a quite detail instruction on how to get virtual hosting configure (

Back to your intention to have a real-user for,, I would believe if would not be possible due to limitation of Unix/Linux itself which requires each login id to be uniq on the system.  However, this might be possible if you are running some kind of Linux Virtual Server.  I could not comment much on this (due to limited knowledge).

Back to easier approach - VirtualHosting.  Most of the example would be RH7.2 centric.

The step would require you to have the MX entries for each of the domain you would be hosting to point to your mail server.  And if you are running sendmail, and the domain name you would be receiving mail to /etc/mail/ (or add the domain to Cw option in /etc/mail/

Next is to create a unix userid that would be receiving this email, for example webmaster-domain1, and add the entry in /etc/virtusertable; <TAB> webmaster-domain1

Again, visit the sendmail website for a *much* more detailed information.

I hope this could be of some help.
do a "make" in /etc/mail

Author Comment

ID: 7080412

Thanks.. but I am trying to find an alternative to that sendmail method that you described. I do not wish to have the user login with 'webmaster-domain1' when their email username is 'webmaster'.

I believe there is a solution out there somewhere, as the host for one of my sites allows an unlimited amount of email addresses, and the login is the same as the email address (as I am trying to achieve). The site is also being virtual served and is not on its' own dedicated box. So they are achieving it somehow.. I am about to email them and see if they can fill me in!.. fingers crossed! And I will also check out the Linux Virtual
Server method you suggested. Thanks.

LVL 15

Expert Comment

ID: 7080464

Maybe you might want to check other MTA (Mail server) alternative.  If I recalled correctly, there is other mailserver that could do that.  However, the authentication might be tied up to /etc/passwd since authentication will be done via the mails server daemon.  I can not (duh) recally the product name however - it might me qmail, or postfix.  Apology (in advance) if the information is way-off.

The Virtual server approach will *definetely* work since each of the virtual-server would be *independent* to each other (even though they shared the same hw resources).  I haven't personally had much real experience with it. (just happen to know that they exist :)

good luck (anything new, I'll share it with you).
LVL 15

Accepted Solution

samri earned 100 total points
ID: 7080474
I thinkg Qmail could do what you are looking for, except the authentication with /etc/passwd file.

I personally haven't tried Qmail (personally - die hard sendmail fan :)

Take a look at this link, it looks like you could implement such.

The problem that wil arise is; the user (client) might end up login as a different userid is they were to manage the website.

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.


Author Comment

ID: 7080485
Yep, I think qmail looks like it is the way to go.. I am just reading about that now :) and I discovered that my host also uses qmail instead of Sendmail..

This explains in one line what I have been trying to explain in a paragraph: "non-system POP3 accounts" now I know the proper wording for what I am looking for :)

I will get back to you when I have read some more..

Author Comment

ID: 7095030

Just letting you know I havent forgotten about this question. My ADSL has been down the last couple of days, and I've had Uni exams. I will be working on qmail tonight, so I will let you know how it goes..

LVL 15

Expert Comment

ID: 7095171

Best of luck on your exam!

Author Comment

ID: 7107970
I have got qmail working for system username email, but I am having a bitch of a time getting it to work for other domains (non-system accounts). Your link definitely describes what I want to do, thanks again.

Finally.. you wouldn't happen to have any experience with qmail? :)

LVL 15

Expert Comment

ID: 7108038

To be frank, until now, I knew it existed, a few claims that it's much better that Sendmail.  However, after knowing Sendmail for quite sometimes, it's kinda hard to toss the coin and decide.

Based on the information (on Qmail website), it looks promising with lots of feature that is not available on Sendmail;  But if we look back at the role of MTA (Mail Transport Agent), it should be dealing with sending and receiving mail; and all other - filter, throtteling, etc. etc, should be done externally.

If you have been around OS for a while, maybe that is why UNIX is so robust, because each component are/is suppose to do one thing, and it should do it well.  

However, newer demand for a product that "does" all is becoming popular.  And there goes the trend.

Good or bad, I don't know.  Untill now, I am comfortable to do my webpage with "vi" the Unix editor.  And even on Win2K, I tend to get vi for Win32.

Back to the Qmail -- very little experience.  But you will be surprise to see there are other EE members that might be able to help.  Just drop you question, and somebody might jump to help (maybe I would).


Featured Post

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how does facebook / twitter store data? 3 126
OpenWrt 1 36
ESXi NTP client time synch is not working 3 64
What is native VPN for RedHad Enterprise Linux and CentOS? 6 142
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now