HP-UX Mailing Services Administrator's Guide (B2355-91064)

MX host in the list in order, and it delivers the message to the first MX host to which it
successfully connects. If that MX host is not the final destination for the message, it is
expected that the host will relay the message to its final destination.
If Sendmail tries all the MX hosts in the list and fails, the message is returned to the
sender with an error message. If you want Sendmail to try to connect to the host to
which the message is addressed, uncomment the following line in the
/etc/mail/sendmail.cf file:
TryNullMXList
Sendmail then tries to connect to the host to which the message is addressed, if any of
the following conditions occur:
The name server returns no MX records.
The name server is not running.
The local host is the highest preference mail exchanger in the list.
At log level 11 and above, Sendmail logs in the system log the name and Internet
address of the MX host (if any) to which it delivered (or attempted to deliver) a message.
MX records are used for two main purposes:
To arrange one host backup by receiving mail for the host when it is down
To arrange the mail addressed to remote networks be relayed through the
appropriate gateways
In the following example, the name server serving the domain paf.edu has the
following MX records configured to provide backup for host bling:
;name ttl class MX preference mail exchanger
bling IN MX 0 bling.paf.edu.
IN MX 20 wheo.paf.edu.
IN MX 30 munch.pag.edu.
Normally, mail for bling will go directly to bling. However, if bling is down, or if
the sending host cannot connect to bling, Sendmail will route mail for bling to wheo.
If wheo is also down or unreachable, Sendmail will route the mail to munch. Naturally,
for this to be useful, wheo and munch must be able to route mail to bling.
Assuming that the host and its mail exchangers see the same MX data from the name
server, each host that has MX records should have an MX record for itself, and the
preference on its own record should be the highest (that is, the lowest number) in the
list.
The following example relays messages through a gateway:
;name ttl class MX preference mail exchanger
*.nz. IN MX 0 gw.dcc.nz.
28 Mailing Services Overview