AWS EC2 Reverse DNS (PTR) Failing

两盒软妹~` 提交于 2019-12-11 04:58:47

问题


Have searched everywhere, can't find answer.

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 mail.

My dns looks like this:

A @ webserverip
A www webserverip
A mail ec2ip

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 "mail.mydomain.com" in the "Reverse DNS Record for EIP 1" box.

However, I keep receiving emails back from them saying:

When attempting to map the reverse DNS entry, we notice that this 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.

I really don't understand what I am doing wrong. The "mail" 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)


回答1:


You can follow these steps to configure the DNS for your EC2 dedicated mail server on AWS:

STEPS

  1. Add two A host records for pop.mydomain.com and smtp.mydomain.com that point to your elastic IP and assign your MX record to the smtp.mydomain.com host.
  2. Add a CNAME record (not A host record) for mail.mydomain.com that points to the DNS entry assigned by AWS (e.g., ec2-XXX-XXX-XXX-XXX.REGION.compute.amazonaws.com).
  3. Submit your rDNS request for smtp.mydomain.com mapping to your EIP.
  4. Don't forget to add the SPF TXT record for your mail server. For example, v=spf1 mx a

Once you're done with this setup, you should have a proper mail server configuration in terms of DNS that would pass SMTP tests and avoids being flagged as spam.



来源:https://stackoverflow.com/questions/41424842/aws-ec2-reverse-dns-ptr-failing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!