0

I am using cloudflare's name servers for example.com with a cname for www - these are filtered through cloudflare.

In cloudflare, I have an mx record pointing to mail.example.com and a mail A record pointing to the mail server's IP - which is not filtered through cloudflare.

Mail is working but going to spam in gmail. So I needed a ptr record which cannot be setup with cloudflare because they do not handle mail traffic.

I setup bind9 on the mail server with a ptr record and dig -x [the mail server ip] @[the mail server ip] successfully returns the ptr record for the mail server ip for mail.example.com in the answer section, but the rest of the web does not see this. I tested with the mxtoolbox reverse dns lookup and it still shows the amazon ec2 hostname instead of mail.example.com. Also test emails sent from thunderbird (authenticating to the smtp mail.example.com server) are still going to spam in gmail.

Is it possible to use cloudflare for www.example.com in combination with dns on the mail server for mail.example.com so that the ptr record for the mail server ip will work?

  • PTR records are based on IP address, there is no such thing as a PTR record for mail.example.com. Only the organization that has authority delegated to them for the IP address in question can set a public PTR for the IP. – yoonix Sep 15 '17 at 0:17
  • thank you, the ptr record for the mail server ip is setup and working but my wording was not exactly right there. – asdfqwerzxcv Sep 15 '17 at 0:23
  • i have an elastic ip with amazon ec2. as far as i know we can setup the ptr record in bind9 on the server. the problem is that the name servers are with cloudflare instead of ns.example.com – asdfqwerzxcv Sep 15 '17 at 0:25
  • I think you need to read up and understand how DNS delegation works, specifically with regards to in-addr.arpa. Cloudflare should not be (or need to be) involved with this at all. You need Amazon's IP's PTR updated. – yoonix Sep 15 '17 at 0:39
  • 1
    Yes, that's exactly what you're being told. The DNS servers for example.com have absolutely nothing to do with reverse DNS lookup of IP addresses via PTR records. – womble Sep 15 '17 at 8:16
1

It's important to understand the delegation of DNS records.

Cloudflare is hosting the example.com forward lookup zone. The owner of the IP address (Amazon) is hosting the IP Address reverse lookup zone.

PTR records can ONLY be modified by the owner of the IP address which in this case is Amazon. You can move hosting of example.com to your own server, which is not recommended, and as you said, will defeat the protection CloudFlare gives you. But, that will only move the example.com forward lookup zone. It will not move the IP address reverse lookup zone.

To make a request to Amazon to update your PTR record, please see here: https://aws.amazon.com/blogs/aws/reverse-dns-for-ec2s-elastic-ip-addresses/

  • I got it working as desired but thank you. – asdfqwerzxcv Sep 15 '17 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.