Set Up MX Records
An MX record is simply the method used by DNS to route mail bound for one machine to another instead. An MX record is created by a single line in one of your named(8) files:
hostA IN MX 10 hostB
This line says that all mail destined for
your domain should instead be delivered to
in your domain. The
IN says that this is an
Internet-type record, and the
10 is the cost for
using this MX record.
An MX record can point to another host or to the original host:
hostA IN MX 0 hostA
This line says that mail for
hostA will be
hostA. Such records might seem
redundant, but they are not because a host can have many MX records
(one of which can point to itself):
hostA IN MX 0 hostA IN MX 10 hostB
hostA has the lowest cost
hostB), so the first delivery attempt will be to
hostA is unavailable,
delivery will be attempted to
Usually, MX records point to hosts inside the same domain. Therefore, managing them does not require the cooperation of others. But it is legal for MX records to point to hosts in different domains:
hostA IN MX 0 hostA IN MX 10 host.other.domain.
Here, you must contact the administrator at
other.domain and obtain permission before creating
this MX record. We cover this concept in more detail when we discuss
disaster preparation later in this chapter.
Although MX records are usually straightforward, there can be a few problems associated with them.