DNS MX Records and Reverse DNS for Mail Servers

EQ Admin

EQ Forum Admin
Staff member
Hello,

Here are a few guidelines for setting up and checking the DNS for your mail server.

First, when creating an MX record you should always use an A record that points to an IP address. You should not use an IP address or a CNAME as an MX record. For example, the MX record for EmailQuestions.com is mail.emailquestions.com. You can verify this with command line tools such as nslookup or my personal preference dig.

> dig emailquestions.com mx

;; ANSWER SECTION:
emailquestions.com. 14400 IN MX 10 mail.emailquestions.com.

;; ADDITIONAL SECTION:
mail.emailquestions.com. 14400 IN A 66.202.109.26

It is also good to make sure that your mail server has a reverse DNS PTR record that also resolves back to the IP address. It is not necessary for this name to be the same as your MX record, but it doesn't hurt to have all 3 names match the IP address.

> dig -x 66.202.109.26

;; ANSWER SECTION:
26.109.202.66.in-addr.arpa. 14400 IN PTR mail.discussny.com.

> dig mail.discussny.com

;; ANSWER SECTION:
mail.discussny.com. 600 IN A 66.202.109.26
In my case above I have my own dedicated server that shares several web hosting and email domains. The reverse DNS and matching forward DNS happens to be for the first domain that was live on that server.
 
Last edited:
Top