The 20 Minute E-mail Solution!
TOC PREV NEXT INDEX

Setting Up Mail Server Records in the DNS


To set up your mail server in the DNS, you must create the records that other mail servers use to find and connect to your mail server. Making these entries requires that you first have:

Your Local Network's DNS server

Before your mail server can communicate with other mail hosts, you must configure the DNS server to recognize your mail server. Without a functional and correctly set DNS, IMail Server cannot deliver mail, except to domains that are within IMail Server.

For each mail host on your network, you must make the following entries in your DNS:

Note that mail hosts (virtual hosts) that do not have an IP address require only an MX record.

Since there are DNS servers from many vendors available, we cannot describe how to create the records for your specific DNS server. Instead, we show an example using a basic configuration for a single mail host.

Example of a Basic Configuration

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, 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 
10, mail.domain.com
50, cecil.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 Server User's Guide.

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 
156.21.50.5 

If we query the A record for cecil.domain.com, we get:

cecil.domain.com 
156.21.50.100 

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.

Sample DNS Records

If we use a DNS lookup tool to query the DNS server for the network in our example (for all information, in verbose mode), you would see entries like the following:

domain.com.  IN MX   50 cecil.domain.com.  
IN MX 10 mail.domain.com
 
cecil.domain.com.  IN A  156.21.50.100 
mail.domain.com.   IN A  156.21.50.5  
 
5.50.21.156.in-addr.arpa.,type = PTR 
 host = mail.domain.com 
5.100.21.156.in-addr.arpa.,type = PTR 
 host = cecil.domain.com 

Other Configurations

If you have multiple mail hosts on your IMail Server, you will need an MX, A, and PTR record for each host. The "Configuration" chapter in the IMail Server User's Guide describes some advanced configuration topics and describes the DNS entries you must make for these advanced configurations.



Ipswitch, Inc.
http://www.ipswitch.com
TOC PREV NEXT INDEX
©Ipswitch 2004