In this example, we use a DNS lookup tool to query the DNS server and show the responses. You can use the Windows NT command line program, NSLOOKUP, to query a DNS server. If you are not familiar with this tool, we suggest the Ipswitch WS_Ping ProPack application, available as a demo at http://www.ipswitch.com/_download/main.asp?product=WP-0000, which provides a graphical interface for querying a DNS server. Use the Lookup tool in WS_Ping ProPack.
To describe the DNS entries for a mail server, we use examples from a typical small network and start with the following assumptions:
You must set up the following records for the computer:
E-mail for the users on this mail host is addressed to user@domain.com.
First, we do an MX lookup (just as a sending mail server would do) to find the mail host for the domain.com network. To simulate this, in the WS_Ping ProPack’s Lookup tool, we enter domain.com in the Name/Address box and MX as the Query Type, which returns the following:
domain.com
This shows that mail.domain.com and cecil.domain.com are both mail hosts for the domain.com network. The cecil.domain.com host is a backup mail server. The number indicates the priority of the mail host — it tells the sending mail server which mail host to try first. The lower the number, the higher the priority. In our case, mail.domain.com is the one we want other mail servers to use first; cecil.domain.com is used only if mail.domain.com is down.
For information about how a backup mail server works, see “Setting Up IMail Server as a Backup Mail Spooler” in the IMail Administrator Help.
Only a host name is returned in response to an MX query. The sending mail server needs the IP address of this host name so it can connect to the mail host. The sending mail server performs another DNS lookup to get the IP address (defined in the A record) of highest priority mail host. To simulate this, in the Lookup tool, we enter mail.domain.com in the Name/Address box and A as the Query Type, which returns the following:
mail.domain.com
If we query the A record for cecil.domain.com, we get:
cecil.domain.com
With the IP address for the mail.domain.com host, the sending mail server can now connect to that host and deliver the mail. If the attempt is successful, there is no need to go any further. However, if the mail.domain.com host is down, the connection attempt fails and the sending mail server will have to try the next highest priority MX record, in this case, cecil.domain.com.