This is a draft, it isn't finished at all!
This guide gives some very rough hints about the things to do when you setup e-mail for a small domain or a single computer. It is not intended as a full blown description, but just as a collection of hints, of DOs and DON'Ts. The MTA I will describe is sendmail (the current version can be found at ftp.sendmail.org .) There are others available too, but I'm used to sendmail and I recommend it. Please send comments/suggestions to me.
MY.DOM.AIN.
The mailhost in this domain is
MAIL.MY.DOM.AIN.
You have a direct connection to the Internet,
your system is (most of the time) online.
MY.DOM.AIN. IN MX 10 MAIL.MY.DOM.AIN.Now every e-mail to
USER@MY.DOM.AIN
is delivered to
USER@MAIL.MY.DOM.AIN
Please use an MX record, even if you have an A record for
MY.DOM.AIN
!
There is a simple reason for this:
All MTAs (should) use the MX record to deliver e-mail.
If you don't have one, they will ask the DNS for it anyway.
So each time an e-mail will be delivered to your domain,
a request for the MX record will be made.
If there is one, it is at least a chance that it has been cached,
so no need to contact your DNS server for each e-mail.
If there is none, this will unnecessary increase internet traffic
and slow down the delivery of your e-mail.
This is also explained in the book
"Sendmail"
pg. 217.
Don't let your MX record point to a CNAME!
This is a violation of
RFC 974
,
and most likely it will break some things.
(Excerpt:
Note that the algorithm to delete irrelevant RRs breaks if LOCAL has
a alias and the alias is listed in the MX records for REMOTE. (E.g.
REMOTE has an MX of ALIAS, where ALIAS has a CNAME of LOCAL). This
can be avoided if aliases are never used in the data section of MX
RRs.
)
This is also explained in the book
"Sendmail"
pg. 213f.
RFC 974 explains how e-mail is delivered, i.e., how to use MX records, etc.
sendmail.cf
or
create it from a
.mc
file in
SENDMAIL/cf/cf.
The
README
in SENDMAIL/cf
explains very well what you need to know for special cases.
The simplest way to get a working configuration is
to use one of the examples and adopt it to your needs.
I won't explain any special stuff here,
but a simple setup (as given in the
assumptions
above
).
Choose one of the example files named
cs-OS.mc
where
OS
matches the operating system of your mailhost.
We'll take SunOS 4.1.x for this guide, so the file is
cs-sunos4.1.mc
The important lines are:
VERSIONID(`@(#)cs-sunos4.1.mc 8.3 (Berkeley) 8/6/95') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl MAILER(smtp)dnlTheoretically you just have to change this to:
VERSIONID(`@(#)cs-sunos4.1.mc 8.3 (MY.DOM.AIN) 04/21/96') MASQUERADE_AS(MY.DOM.AIN) OSTYPE(sunos4.1)dnl MAILER(local)dnl MAILER(smtp)dnlAnd there you go... (use
m4 my-dom-ain.mc > sendmail.cf
to generate the sendmail.cf
file).
Now you need to add all names for which your host
should receive e-mail to the class w,
e.g.,
CwMY.DOM.AIN. CwMAIL.MY.DOM.AIN
If this doesn't fulfill your needs, you need to read a little bit more.