Setting up an email server's IP address for reverse DNS lookup

2

Should I set my IP address' PTR record to the domain (mydomain.com) or the subdomain where the mail server is (mail.mydomain.com)? It's a little confusing.

Jim

Posted 2011-09-05T21:20:58.777

Reputation: 45

The forward and reverse DNS should be mirrors of each other. Whatever IP mailserver.domain.com points to should point to mailserver.domain.com. – MaQleod – 2011-09-05T21:33:24.117

Answers

2

To expand on my comment, here is an example of proper forward and reverse DNS for mail (methods can vary if you will have multiple mail servers, here is an example where three are load balanced):

All mail servers and priority:

$ host speakeasy.net | grep mail
speakeasy.net mail is handled by 15 mx02.speakeasy.net.
speakeasy.net mail is handled by 5 mx.speakeasy.net.
speakeasy.net mail is handled by 10 mx01.speakeasy.net.

Forward DNS on mail servers:

$ host mx.speakeasy.net
mx.speakeasy.net has address 69.17.117.60
$ host mx01.speakeasy.net
mx01.speakeasy.net has address 69.17.117.60
$ host mx02.speakeasy.net
mx02.speakeasy.net has address 69.17.117.60

RDNS for mail IP:

$ host 69.17.117.60
60.117.17.69.in-addr.arpa domain name pointer mx.speakeasy.net.

MaQleod

Posted 2011-09-05T21:20:58.777

Reputation: 12 560

To expand on this, if your mail domain actually points to the same IP as your naked domain, you should make the mail domain a CNAME and treat your naked domain as a proper host name and PTR to that. – billc.cn – 2011-09-05T22:13:30.963