PLANNING


The Domain Name System (DNS) and SMTP mail routing

The Domain Name System (DNS) is a directory used by SMTP to convert a name, such as renovations.com, to a list of servers that can receive connections for that name and to find the IP address of a specific server. By looking up a destination server's address in the DNS, the sending server can properly route a message to a recipient.

DNS uses two kinds of records: Mail Exchanger (MX) records and A records. An MX record maps a domain name to the names of one or more mail hosts. An A record maps a host name to the IP address of a server.

Mail servers also use other DNS records. For example, servers that receive Internet mail perform a reverse lookup to a DNS PTR record to determine the host name for a given IP address. Reverse lookups are useful in verifying the source of a message, an important tool for restricting relay access through your server or preventing unsolicited commercial e-mail (UCE).

You must correctly configure DNS to support your use of SMTP. To determine the IP address of the mail server for the destination domain, HCL Domino® does the following:

1. The server looks up the domain part of each recipient's address in DNS.

2. If DNS finds an MX record, the server tries to connect to the server listed in that MX record. If there is more than one MX record, the server tries to connect to the record that has the lowest cost. If more than one MX record has the lowest cost, the server randomly selects one and tries to connect to the server listed in that MX record.


3. If DNS finds only an A record, Domino routes the message to the IP address in that A record.

4. If DNS does not find a record, Domino cannot deliver the message and sends a nondelivery message to the sender.

An MX record maps a domain name to one or more host names. An A record maps a host name to the IP address of a server. You may want to use a host name in the MX record instead of just an A record for the following reasons:


You can use DNS to provide failover and load-balancing for your mail servers by creating multiple MX records for a domain name on the DNS server. When you set more than one MX record for a name, you can set preference values to control how DNS selects those records. DNS selects smaller value preferences first -- for example, DNS selects 5 before 10. If more than one MX record has the same preference value, DNS randomly selects from among those MX records. If one of those MX records fails -- for example, because a server is unavailable -- DNS caches that failure and tries other MX records of equal weight, followed by less-preferred MX records.

For example, the renovations.com domain has four MX records:


When a server tries to connect to renovations.com, the DNS first uses MX records with preferences of 5. If there are two MX records with preferences of 5, DNS randomly selects between the MX record for mail1.renovations.com or mail2.renovations.com. If the DNS returns the MX record for mail1.renovations.com and mail1.renovations.com is unavailable, the DNS returns the MX record for mail2.renovations.com. If mail2.renovations.com is unavailable, both MX records with a cost of 5 have failed. The DNS then selects MX records that have a cost of 10 and uses them the same way it used the MX records that have a cost of 5.

Parent topic: Messaging overview

Related concepts
Restricting SMTP inbound routing

Related tasks
Specifying how Domino looks up SMTP hosts when sending outbound mail
Using a Global Domain document to set up a server to receive mail for multiple Internet domains
Restricting inbound SMTP connections