Virtual email domains with one static ip using sendmail and vpop3d

I have installed redhat 6.1 and am having trouble making virtual email work, for exaple and and get emails at and
I am trying to do this using sendmail. vpop3d, I am using linuxconf for all this.

1. IS it possiable to set up email domains using one qualified IP (using ppp i have one static ip from isp) and use ip aliases that are local area (
I think this is and the reason i am asking this is because sendmail help says that it is and then it starts talking about dns and ip reverse mapping, this is where i am confused, does it mean that i have to setup a dns that compliments the dns servers used by these domains (DNS for virtual domains)
The DNS servers for and are isp's

2.if u can pleasegive me pointers to further reading on setting this up, (I have already ordered the BAT book)

3. Are there any howto's for virtual email hosting?
thanks for the help

PS if there  is any other email system that u have used and u think it is better than sendmail pls give ur recomendations.

Who is Participating?
jebrightConnect With a Mentor Commented:
Use sendmails virtusertable to acomplish this easily.

it is simliar to the alias file.

edit /etc/mail/virtusertable


save file and do the following to activate it:

makemap hash /etc/mail/virtusertable <  /etc/mail/virtusertable

(all on one line of course)

And you are done.

I can't help you with sendmail as I don't use it. You may wish to try qmail which is a replacement for sendmail but more secure, easier to configure.

Threre are losts of patches that specifically do what you want.
set the MX RECORD IN dns for that domain name to point to the IP you have and make sure you put the domain name in your file and restart sendmail. That is it!

You may want to also define a cname IN dns (like "mail") so that your users have a friendly name to access for smtp and pop3 servers.... also add that into your file.
I would read the "bat book" (sendmail) by Oielly.

The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

amitunixAuthor Commented:
I have the MX already setup, and the suggestion u've made works well if and want to get mail in one real account "amit" .I am trying to setup virtual email domains where is different from , there will not be a dividing line between them.

I want to create virtual pop only accounts where the user is not a real user.

i've replaced pop3d with vpop3d in my inetd.conf and when i try telnet to check the vpop3d for, I get virtual pop3 ready, but for it goes to pop3 and doesn't recognize any virtual users for

I'll say it again, use qmail instead of sendmail. It is specifically set up to do exactly this type of thing. Additionally there are patched and packages out to allow virtual users and virtual pop accolunts.

Also qmail is faster then sendmail and smaller.

I've been using qmail for several years and for more then 100,000 users.
amitunixAuthor Commented:
just to clearify Them, I am new to this virtual world.
I have only one static IP. Will qmail let me create multiple virtual email domains and for each domain a virtual pop only user.

yes , but for receiving email (mx host) i think is two options.

1. you have static ip & continous connection to net. if this is your case .. i recommend you're
using qmail + vmailmgrd.
visit for details.
i will explain in general.

1. get qmail+patches8 , daemontools , supervise scripts, ucspi-tcp srpm from
bruce's homepage.

compile & install uscpi-tcp , daemontools , supervise-script , then build & install
qmail , qmail-cyclog , checkpassword ,
relay-ctrl ,vmailmgrd.

vi /var/qmail/control/rcpthost

then add the domain you wishes (virtual domain)

vi /var/qmail/control/virtualdomains

add the domain you wishes like step above
but this time at the format :

virtual_user_handle --> is the user
that you assign to handle all email to that domain.

adduser virtual_user_handle
passwd to that user
su to that user .

run vsetup .
then vadduser the user you wishes, for your domain.  

and as usual don't forget to change your mx
record in dns to point to your email host. :)

2. if you're using ppp (static / dynamic ip).
try persuade the isp for spooling all the email
for the domain you're control.

and set .. fetchmail for get the email for
all user.
and set the qmail . to sent email
using smtp routes.

read the qmail faq for more details.


Yes, qmail will work fine with a single static address. As budi_a pointed out as long as you have a continus connection to the net qmail will work well. If you have an intermittant connction qmail will still work but will need serial mail installed too.

I have some source rpm packages that will set you up and get you running. There are also quite a few other packages at
The problem with this is that sendmail does not allow you to have two virtual users in different domains. THat is you can not have and be different people. With qmail you can.
Umm... yes you can.... with sendmail... Read my proposed answer and use the virtusertable setup (proconfigured in RedHats default config for sendmail). Don't get me wrong, I lik eqmail as well, but he has sendmail installed already....

Also, sendmail is pretty much the defacto internet standard.
The problem with this is that sendmail does not allow you to have two virtual users in different domains. THat is you can not have and be different people. With qmail you can.
All Courses

From novice to tech pro — start learning today.