0

Have searched everywhere and even try the answer here : AWS EC2 Reverse DNS (PTR) Failing

I have the domain mydomain.com. The root and www records point to my main server, which runs my website.

I am now using a separate AWS ec2 instance to set up an email server for my domain. This is running on the subdomain "listes".

My DNS looks like this:

A @ webserverip
A www webserverip
A listes ec2ip
A pop ec2ip
MX listes listes.mydomain.com
SPF listes "v=spf1 mx ~all"
TXT listes "v=spf1 ip4:ec2ip ~all"

To prevent my server from getting flagged for spam, I submitted the amazon reverse dns form here: https://aws.amazon.com/forms/ec2-email-limit-rdns-request

I gave them the ip of my ec2 mail server, and put "listes.mydomain.com" in the "Reverse DNS Record for EIP 1" box.

However, I keep receiving emails back from them saying:

The mapping for this reverse DNS entry is failing because the PTR record doesn't match the A record for that domain. We currently require the forward A record to match the PTR record for all reverse DNS entries.

You can either provide us with an alternate hostname, or configure the A record for this domain to match the desired PTR record on your side.

I tried to submit the same form almost 10 times with always the same response...

I really don't understand what I am doing wrong. The "listes" subdomain has an A record pointing to my ec2 server ip. Any assistance would be greatly appreciated!

(I am using cloudflare for my dns if this makes any difference)

benjisail
  • 1,646
  • 5
  • 21
  • 35
  • 2
    Does `dig @8.8.8.8 listes.example.com` return exactly one A record in the `ANSWER` section? If so, is it the correct IP address? – Michael - sqlbot Sep 22 '19 at 17:07
  • 1
    This basically says the forward and reverse lookup isn't matching for your record. example: dig listes.mydomain.com --> result x.x.x.x and dig -x x.x.x.x --> result should result listes.mydomain.com. – James Dean Sep 23 '19 at 07:06

1 Answers1

0

Thanks for the tips regarding using the dig command to double-check the A record for my domain name.

In my case, the dif command do not return the IP that I have set up on Cloudflare but instead another IP from Cloudflare.

The solution was to disable the proxy feature of Cloudflare. After disabling this feature on the DNS A Record, the good EC2 IP is returned by the dig command.

benjisail
  • 1,646
  • 5
  • 21
  • 35