Hi Scott,

Since you just asked about virtual domains I'm going to assume that you
have the real domain for your machine set up with a fully qualified,
resolvable domain.

1) Go to /etc/sendmail.cw and add the virtual domain(s) in:

*************************

# sendmail.cw - include all aliases for your machine here.
# domain1.com
# domain2.com

holiness.homeip.net
christianfamilies.org
edwards.brooklyn-park.mn.us

*************************

Check your sendmail.cf file and make sure the following lines exist and
have the correct path to the domaintable and virtusertable files.  Most
installs for these two files on RedHat are /etc/mail/domaintable and
/etc/mail/virtusertable.  For whatever reason when I installed 5.2 these
files didn't exist, so I put them in /etc.  The exact location isn't as
important as that the path shown below matches their actual location. If
these lines don't exist then you'll need to find and modify your .mc file
and create a new sendmail.cf file from it.  It's not recommended that you
simply hand enter these lines to sendmail.cf (Some modifications to sendmail.cf
require other changes in the file that are automatically done by the .mc file
when it creates the new sendmail.cf file. If you do these by hand you may
break your sendmail configuration and shut down your mailer completely.). Lines
preceded by "#" are comments and thus ignored.

*******************

# Domain table (adding domains)
Kdomaintable hash /etc/domaintable

# Generics table (mapping outgoing addresses)
#Kgenerics dbm /etc/genericstable

# Virtual user table (maps incoming users)
Kvirtuser hash /etc/virtusertable

*******************

Once sendmail.cf and sendmail.cw are properly set up, SIGHUP sendmail.  At
least that's what the directions say, but I've never got it to work.  Stop
sendmail and restart it by whatever means works on your box.

2) Modify your domaintable by adding in the domain and the user it is assigned
to (I try to keep simple instructions for this file and its cousins in these
files.  I don't do this often enough to memorize the steps, so I keep notes
to help job my memory.):

************************

# Domain table (maps virtual domains)
# makemap hash /etc/domaintable < /etc/domaintable
# Virtual Users are set up in /etc/virtusertable (maps incoming users)
# Generics table is set up in /etc/genericstable (maps outgoing users)

holiness.homeip.net     glenlee
christianfamilies.org   glenlee
edwards.brooklyn-park.mn.us     glenlee

************************

Do the same with virtusertable:

************************

# Virtual User table (maps incoming email to specific user)
# makemap hash /etc/virtusertable < /etc/virtusertable
# Domains are set up in /etc/domaintable
# Generics are set up in /etc/genericstable (maps outgoing users)
# Separate email address / user by a single tab

# [EMAIL PROTECTED]  glenlee1
# [EMAIL PROTECTED] glenlee

[EMAIL PROTECTED] jan
@holiness.homeip.net    glenlee

************************

Then execute the commands:

makemap hash /etc/virtusertable < /etc/virtusertable
makemap hash /etc/domaintable < /etc/domaintable

Use the correct paths in the above.  If you're setup for dbm files (I'm not),
I believe you have to use:

makemap dbm /etc/virtusertable < /etc/virtusertable

BUT I don't know for sure.  Consult http://www.sendmail.org for specifics.

3) You may need to modify /etc/aliases.  If a user on your system has the
virtual email address [EMAIL PROTECTED], but his username on your box is jackson,
you'll need to modify /etc/aliases to read:

******************

# USER ALIASES

jack:   jackson

******************

If you don't incoming email to [EMAIL PROTECTED] will be rejected with a 551 "no
such user" error message.

The above directions only describe how to set up virtual domains on your box.
You still need to have a resolvable real domain for outgoing email to work.
If you're on a dedicated line then you should already have this installed.
If you're dial-up like I am then you're going to have some trouble. There 
are filters that some systems are using that block dial-up Linux accounts 
that use their box as their MTA based in IP address of the dial-up machine.  
To fix this you can use IP masquerading, but doing so forces all outgoing
mail from your box to read your real machine name, meaning that you can't
show your return email address as that of your virtualdomain.  All outgoing
mail has the From: header changed by Sendmail to your real domain.

Hope this helps.

Glen


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to