bselinske
By:
bselinske

How do I setup a PTR Record?

April 8, 2015 42.7k views
DNS Email

I am running an email server and my outgoing emails are finding themselves in the recipient's spam box.

After diving into the issue.. I am seeing that the issue is coming from being unable to do a reverse DNS lookup.

I've added all the appropriate mail records (A, MX, TXT) and am still coming across this issue.

This is what I am seeing from www.intodns.com/americanglassandmirror.com

Reverse MX A records (PTR) ERROR: No reverse DNS (PTR) entries. The problem MX records are:
30.253.236.104.in-addr.arpa -> no reverse (PTR) detected
You should contact your ISP and ask him to add a PTR record for your ips

Can you clue me in on what I could be missing here?

3 comments
  • An additional note... that is not my IP address on DigitalOcean.

    After doing a lookup on that IP address... it said that it was the "DoD Network Information Center".
    Does anyone have any insight on to why its pointing to their IP?

    This only seems to be the case when I do a PTR lookup (dig -x ipaddr) on my digital ocean address.

  • DigitalOcean automatically configures the reverse dns entry (PTR) on their end. It will be the hostname you choose when you set up your dropplet. You can change/check this in the control panel by selecting your dropplet, then settings, then rename. As it says, changing the name there will update the PTR but not the hostname of the system, that is something you will need to do, instructions for that vary depending on the system you have installed.

    You can check the PTR by using the host command as follows:
    host <IP_ADDRESS>
    You will have to substitute your IP address in the command above.
    Example:
    host 8.8.8.8
    8.8.8.8.in-addr.arpa domain name pointer google-public-dns-a.google.com.

    You may also be a little confused: You can not update the PTR of an IP address you have not been assigned (in the U.S. by ARIN). The IP address you are using from DigitalOcean may be able for you to use, but it has not really been assigned in a way you can freely control as far as reverse dns goes, therefor you can't change a PTR record for an IP you don't have access to. (That's why mail servers check PTR; if you have a properly configured reverse dns record your more likely to be authorized to send mail from that IP.)

    Good luck.

  • I can't find the "settings" option on my droplet. I did find the domains option from the list of droplets -> dropdown on the right "more" -> "add a domain"? I did that but a PTR Record is still not being indicated. Do I just need to wait for the record to propagate?

9 Answers

A support staff helped me with the problem:

The droplet must be named with a fully qualified domain name (example something.com) before a PTR Record can be created. To rename the droplet select it from the droplets control panel and in its own page click on the name itself (there is no obvious button).

  • Hah, thank you for pointing that out! I was looking for the "Settings>Rename" option and it wasn't there! Clicking on Droplets>{droplet name} then clicking on the droplet name at the top opens up the name field. So much for usability! :) Even a popup label like "Click to Rename" would be helpful. Thank you.

But then how does that work when you have more than one domain on the droplet? Which PTR record/domain gets the short straw?

I too have two domains on one droplet and would like to know how to give them both PTR records. Why not assign PTR records based on A and AAAA records?

Edit: Thinking on it some more, it seems possible that you can't have an ip address resolve to more than one domain, as a limitation of the reverse DNS system. In which case: wow gg protocol writers. Way-to-go. Thanks a bunch.

Though it would be more the fault of email servers for using a broken filter method in the first place.

It doesn't seem like there is, but is there a workaround?

  • You have a good point there.

    This looks to have fixed an issue I was having with some emails getting rejected when using an inmotionhosting account as a mail server so I'm glad for that.

    I have multiple domains running on the droplet too so I just picked one and used it to send mail from the apps on it. I didn't really think about how they others would work.

  • As long as the reverse IP is set to an FQDN and that FQDN resolves to that IP you will be fine

Hi,

I have the same problem on my droplet. How is this configured if you multiple domains on the droplet though?

If I configured the reverse DNS lookup with an FQDN for domain A, and sent an email from domain B, wouldn't the emails from domain B show as coming from Domain A ?

If yes, is there ayway around this? Thanks

Perfect... renaming the droplet did the trick!

Didn't think the solution would've been so simple!

Thanks so much!

Renaming the droplet with a FQDN worked for me too. Thanks.

It seems that the functionality is missing.

I also have the same problem on my droplet with multiple domains, only one has this problem though as the client is using an aol email, my mail logs state "421 mtaig-aab02.mx.aol.com Service unavailable - try again later."

Good question ianjhar, if anyone knows the answer would appreciate some advice before I start tinkering with the FQDN:

"If I configured the reverse DNS lookup with an FQDN for domain A, and sent an email from domain B, wouldn't the emails from domain B show as coming from Domain A ?

thanks

HI,

I fallow this link its working Example link

Step1: Change the Droplet name as your Domain name, The Digital Ocean Automagically tack the rDNS .

To check rDNS :

  1. Click on the Networking --> then click on PTR record.
    1. Check thorough command line , Type command $ host 'your ip addres'
    2. Check thorough this url Example link
Have another answer? Share your knowledge.