How-To: Check a Reverse DNS Record Lookup (PTR Record) and Solve Email Delivery Issues
Jul.10, 2008 in
Development, How To, Linux
More and more mail servers are starting to reject email if your outgoing mail server doesn’t have a reverse DNS record or PTR record. You can check if you have one by issuing the following command:
dig -x 127.0.0.1
Obviously, replace the 127.0.0.1 address with the relevant IP address of your mail server. You should receive a response like this:
; <<>> DiG 9.4.1-P1 <<>> -x 67.192.127.21 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17269 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;21.127.192.67.in-addr.arpa. IN PTR ;; ANSWER SECTION: 21.127.192.67.in-addr.arpa. 3600 IN PTR myserver.mydomain.com. ;; Query time: 217 msec ;; SERVER: 203.50.2.71#53(203.50.2.71) ;; WHEN: Thu Jul 10 11:09:58 2008 ;; MSG SIZE rcvd: 79
If you don't have one setup, you won't get a response in the ANSWER SECTION - so contact your host and ask them to set one up for you. It can help save a lot of headaches when you get bounce-back messages such as:
Could not deliver the message in the time limit specified. Please retry or contact your administrator.

Leave a Reply