How do i check if i have reverse DNS PTR set up properly?

As title suggests I’m looking to make sure my hosting is set up to respond with valid PTR information so my server generated emails aren’t flagged as spam.

I have full SSH access to the machine at root level.

Running a CentOS machine but there are also other virtual hosts using a shared ip.

thanks.

with a “dig -x ip_adresse” or “host ip_adresse” command:

dig -x 193.58.255.251

; <<>> DiG 9.4.2-P2 <<>> -x 193.58.255.251
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64461
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;251.255.58.193.in-addr.arpa. IN PTR

;; ANSWER SECTION:
251.255.58.193.in-addr.arpa. 3600 IN PTR webalis.com.

;; AUTHORITY SECTION:
255.58.193.in-addr.arpa. 3600 IN NS ns1.vservers.ch.
255.58.193.in-addr.arpa. 3600 IN NS ns2.vservers.ch.

;; ADDITIONAL SECTION:
ns1.vservers.ch. 3600 IN A 193.58.255.37
ns2.vservers.ch. 3600 IN A 193.58.255.45

;; Query time: 0 msec
;; SERVER: 193.58.255.37#53(193.58.255.37)
;; WHEN: Fri Nov 7 20:45:18 2008
;; MSG SIZE rcvd: 149

host 193.58.255.251
251.255.58.193.in-addr.arpa domain name pointer webalis.com.

Yes,

dig -x ip

is one command along with the :

host ipaddress

command which shows the PTR setup for that same ip address.

You can use the commands below to verify whether an IP has a PTR record setup:

dig -x IP +short - it will show the short result

and

host -i IP

First of all, find the IP you’re bound to.

host -i

will spew out the IP that eventually your mails will get if you’re using a simple sendmail type of methodology to send emails to the world.

Otherwise, if you’re using more complex settings let us know how exactly emails are being sent out etc.

Once you know your IP, perhaps a GUI can be used complement to what folks have already provided you with. Domaintools is a good start (look for dns tools on that page)

You might also want to check the results of running hostname as this will be name that will go out on received from field on your emails.

This will therefore be the name that get a reverse DNS lookup from the receiving SMTP server. You can use something like gmail to check your headers i.e. send an email to your gmail account and view the orginal email, you’ll see the the originating hostname along with gmail’s info about the lookup.