Running a Droplet on DigitalOcean with Apache and a mailserver on Ubuntu. I've managed to get SPF, DKIM and DMARC working on this server, but Reverse DNS is something that I've never figured out.
I have a floating IP that points to this particular server, as it makes things easy when I want to change the Droplet that is serving my website. The DNS records are as follows:
A: example.com -> 1.2.3.4 (floating IP)
A: mail.example.com -> 5.6.7.8 (actual Droplet IP)
MX: mail.example.com
The problem with reverse DNS now is that a query to 5.6.7.8
leads to example.com
, but a query of example.com
leads to IP 1.2.3.4
, so reverse DNS (and PTR records, which I have no idea what they are) fails. Can I add an extra A
record to my DNS to fix this?
A: example.com -> 5.6.7.8 (actual Droplet IP)
I presume this will cause DNS to either point to my floating IP or my actual Droplet, and that when the actual Droplet is down (e.g. when I want to switch the Droplet to assign to the floating IP), the floating IP will be used as the A record instead.