All SMTP mail servers that communicate with other Internet hosts use a DNS server to look up mail addresses. The basic communications between a mail server and a DNS server work as follows for incoming mail and outgoing mail.
Incoming Mail:
To illustrate how a DNS server is used to look up mail addresses, we use the example of what happens when a user on another Internet host sends mail to a user on your IMail Server host (for example to fred@domain.com).
Outgoing Mail:
When one of your IMail Server users sends mail to a user on another Internet host (for example, to sam@widgets.com), the same process occurs, except that it is your mail server that does the lookups for MX and A records on the DNS server for the widgets.com network.
Reverse Lookups
Note that some mail servers, upon receiving mail, will do a "reverse lookup" on the address to make sure it is valid. This is done in an attempt to thwart bulk mailers who may be illegally using someone else's mail server to relay mail. A PTR record attempts to verify that the inbound e-mail is originating from a mail server and not a workstation. To do a reverse lookup, the receiving mail server asks the DNS server on the sending mail server's network to confirm that the IP address of the sending server matches the host name of the sending server.
Reverse lookups are enabled in DNS by creating a PTR record for the mail host. The PTR record maps an IP address to a host name.