MX (mail exchanger) resource record
MX records specify a list of
hosts that are configured to receive mail sent to this domain name.
Every host that receives mail should have an MX record, since
if one is not found at the time the mail is delivered, an MX value
will be imputed with a cost of 0 and a destination of the host itself.
In the following example, Seismo.CSS.GOV is a mail gateway that knows how to deliver mail to Munnari.OZ.AU. These two machines may have a private connection or use a different transport medium. The preference value is the order that a mailer should follow when there is more than one way to deliver mail to a single machine. Lower numbers indicate higher precedence, and mailers are supposed to randomize same-valued MX hosts so as to distribute the load evenly if the costs are equal. See RFC 974 for more detailed information.
Here is an example MX record:
name {ttl} addr-class MX preference value mailer exchanger Munnari.OZ.AU. IN MX 0 Seismo.CSS.GOV. *.IL. IN MX 0 RELAY.CS.NET.
In the second example, all mail to hosts in
the domain IL is routed through RELAY.CS.NET.
This is done by creating a wildcard resource record,
which states that
Wildcards are often not an optimal solution, because MX records must appear the same both inside and outside a given domain. Therefore, if you want to use mail exchangers within your domain, do not use a top-level wildcard. Instead, create specific MX records for each of the machines in your domain.