msir@uhura.cc.rochester.edu (Mark Sirota) (06/07/89)
What exactly is an MX Record? I understand the functionality, but how are they implemented? I assume it's not just a line in the sendmail.cf which aliases one name to another... -- Mark Sirota - University of Rochester, Rochester, NY Internet: msir@cc.rochester.edu Bitnet: msir_ss@uordbv.bitnet UUCP: ...!rochester!ur-cc!msir
karl@giza.cis.ohio-state.edu (Karl Kleinpaste) (06/07/89)
msir@uhura.cc.rochester.edu (Mark Sirota) writes:
What exactly is an MX Record? I understand the functionality, but how are
they implemented? I assume it's not just a line in the sendmail.cf which
aliases one name to another...
MX records are resource records (RRs) in your nameserver. They
identify the host to which mail for a given domain entity should be
given. They are particularly useful for, e.g., non-IP sites (notably,
UUCP sites) which wish to be domain-addressable.
Syntax in a nameserver zone file is
<entity> IN MX <metric> <MX hostname>
as in
$ORIGIN rochester.edu.
some-uucp-host-in-your-domain IN MX 10 your-gateway.rochester.edu.
The <metric> provided is used by your mailer to determine preference
order in the case of multiple MX's. There can be an arbitrarily large
number of MX records for any given <entity>, though I can't recall
having ever seen more than about 5. The <metric>s provided tell the
mailer which to try first; and if it doesn't answer the phone, as it
were, which to try second, and so on.
Sendmail as of (about) 5.51 (5.54? I have long since lost track)
learned to put MX records to use automatically. When the mailer
chosen in S0 is P=[IPC], then MX records are requested from the
nameservers, and delivery is actually attempted to the hosts so
identified. If no MX records exist, then sendmail expects to find an
A (address) record for the indicated destination, so that it can
deliver directly.
Of course, the host which is advertised as being the MX host for some
given <entity> had better have some sort of schema for detecting those
hosts for which it does MX'ing, and must not resolve in S0 to P=[IPC].
I do it with a set of classes identifying those domains for which I
MX, and hand them to a mailer P=/bin/smail, with a paths file which
knows the mapping to real UUCP hosts for those domains.
--Karl