The Business Email Security Blog

Email Server Basics: PTR Records, A Records, and MX Records

This is the first article in a two-part series that will go over some basic DNS records important for Email Servers. The next article in the series will talk about why these DNS records are important for the proper functioning of Email Servers.

Internet Protocol (IP) addresses allow us a way to connect to other devices on the internet. For example, the ‘device’ behind a particular IP address could be an Email Server. Email Servers are usually servers that can send, receive, and store email. To represent your device properly on the internet as an Email Server, you’ll need to know about PTR records, A records, and MX records.

What is a PTR record

A PTR record refers to the domain name that is associated with an IP address. Performing a reverse DNS lookup on an IP address will provide you with its domain name, also known as a PTR, hostname, or reverse DNS record. The PTR record is normally used to identify whether an IP is associated with a particular network, someone’s computer, or other objects on the internet like websites and Email Servers.

When it comes to Email Servers, it is recommended to update the PTR record of the Email Server’s IP to a domain that reflects the responsible party. The responsible party are the ones responsible for any email that is sent from that Email Server.

Examples of Email Server PTR records:

mail.your_domain.tld

mx.your_domain.tld

webmail.your_domain.tld

Best Practices for Email Operators say that the domain (your_domain.tld) used in the PTR record SHOULD be associated with an URL, e.g. your company website. If your website (http://your_domain.tld) doesn’t come up then you should fix that or adjust your PTR record.

While you can have multiple PTR records associated with the same Email Server’s IP, it may confuse some spam protection tools. Also, having too many PTR records may slow down connections. As such, you should endeavor to limit PTR records associated with the same Email Server’s IP to just one.

What is an A record

‘A’ records refer to the IP address (specifically IPv4) that is associated with a domain. Performing a forward DNS lookup on a domain will provide you with a corresponding IPv4 address, also known as an ‘A’ record or forward DNS record. The A record of a domain provides information on where to locate the device that handles communication for that domain.

When it comes to Email Servers, the domain name used when sending an email (such as the one found in the PTR record, or email address) should have an A record that resolves to the IP address of your Email Server.

In other words, if a forward DNS lookup is performed on your Email Server’s PTR record

mail.your_domain.tld

it should result in the IP address of your Email Server.

A records and PTR records are Distinct

A forward DNS lookup is like the opposite of a reverse DNS lookup. The former finds the IP address associated with a domain name, whereas the latter finds the domain name associated with an IP address. However, do NOT confuse these two records, as they are not the same.

To elaborate, it is not always the case that these records match. If you do a forward DNS lookup of a domain name, you will get an IP address; if you do a reverse DNS lookup of that IP address, it won’t necessarily result in the same domain name that you did a forward DNS lookup on previously.

This is a perfectly normal occurrence.

Forward Confirmed Reverse DNS (FCrDNS)

When the PTR record and an A record matches, this configuration is referred to as Forward Confirmed Reverse DNS (FCrDNS). FCrDNS is achieved when:

  1. A reverse DNS lookup on your Email Server’s IP results in a PTR, e.g. mail.your_domain.tld
  2. A forward DNS lookup on that PTR, e.g. mail.your_domain.tld, results in the Email Server’s IP in (1)

While FCrDNS is not strictly required, it may negatively impact your email deliverability to certain mail operators when it isn’t in place. Also, be aware that some spam protection systems may have trouble determining whether FCrDNS was achieved when there are multiple PTR records associated with the Email Server’s IP.

What is an MX record

An MX record refers to the Email Servers associated with a domain name. Performing an MX record lookup on a domain that provides Email Services will provide you with the Email Server(s) that receive email on that domain’s behalf.

The result of an MX record lookup on a domain that provides Email Services is a list of one or more domain names. The result should NOT be an IP address, as Email Servers are not configured to handle IP addresses when doing an MX record lookup.

Examples of MX Records:

= 10 mail1.your_domain.tld

= 20 mail2.your_domain.tld

The number represents the priority of which Email Server to attempt to send an email to first. The lower the number, the higher the priority. In this case, mail1.your_domain.tld will be attempted first and if for any reason that fails, mail2.your_domain.tld will be used.

Conclusion

PTR, A, and MX records are some of the basic DNS records Email Server operators should be aware of. PTR and A records are required, and failure to properly configure them will lead to your Email Server not functioning properly. According to RFC 5321, MX records are optional; however, it is highly recommended to have an MX record for your Email Server as a Best Practice.

The next article will explain how these DNS records affect an Email Server’s ability to deliver and receive email.