![]() |
![]() |
Technical Library |
|
12 Oct 2000
Domain Name System |
DNS: Mail ExchangerDNS uses the MX resource record to implement mail routing. MX records specify a mail exchanger for a domain name. The mail exchanger either delivers it to the individual host it is addressed to or gateways it to another mail transport. MX records are given a preference value to prevent mail loops. The preference values of a host's mail exchangers determine the order in which a mailer should use them. Mailers attempt to deliver to the mail exchanger with the lowest preference value (highest priority). The most preferred mail exchanger has the lowest preference value. If the highest priority mail exchanger fails, the mailer will attempt to deliver to the next highest priority. The Mail Exchanger record redirects mail to a mail server. The format of the MX records is:
name IN MX preference host
Here is an example of mail for a domain being directed to specific machines:
In this example, the MX records are configured to accept mail for usernames@domain.com, and attempt to direct it to the host, ed.domain.com, because the MX record directing mail to ed.domain.com has the lower preference value ( higher priority ). If ed.domain.com is unreachable at the time of delivery, the mail will be directed to the next lowest preference mail server. In this case, conto.domain.com would be the one. The components of the MX records are described below. name This is the name of the host or domain to which the mail is addressed. This can be viewed as the piece that occurs after the @ symbol in a mailing address. Mail addressed to this name is directed to the mail server associated in the host field. preference This specifies the order in which mail servers are tried when a host or domain has more than one MX record associated with it. Servers with the lowest preference value is tried first. Preference values are usually assigned in increments of 5 or 10, so new servers may be inserted without editing the current server's preference values. host This is the name of the mail server which mail is directed to when mail is addressed to the host or domain specified in the name field. |