I have set up Postfix on an Ubuntu 18.04, with a view to sending emails from two different domains, which I will refer to here as abc.com and xyz.com. I'm trying to configure everything so that emails are not rejected. I have created the SPF record OK in the control panels for both domains, so that is not a problem.
What I'm having difficulty with is a seeming conflict between DKIM and Reverse DNS. If I set up Reverse DNS for my server to be 'mail.abc.com', I can send out mail from 'xyz.com', correctly signed with the right DKIM key, and when I check with a verification address like 'check-auth@verifier.port25.com', it passes the DKIM validation fine but fails an 'iprev' check because the Reverse DNS is wrong (it resolves to mail.abc.com). But when I set the from address of my 'xyz.com' mail to 'abc.com', it passes the iprev check OK, but doesn't get a DKIM signature (and potentially has a misleading From address in the email).
So is it possible to set things up on this single server so that I can send out emails from 2 different domains and have iprev and DKIM checks work OK? If so, how do I configure this?
A
orAAAA
record query can return multiple IP addresses and a single reverse DNS (PTR
record query) can return multiple names. If your server needs to handle services for multiple domains, its reverse DNS should respond all those domains at the same time and each of the domains should point to correct IP. And if you have redundant servers, you should have multiple IPs for each domain and reverse IP for all the IPs should return ALL the domain names hosted by those IP numbers. Note thatiprev
authentication recommends default limit of max 10 results per DNS query.