0

My server has 3 IPs: 2 for dns stuff for example 192.0.2.1 and 192.0.2.2, and one that I use for outgoing email, let's say 192.0.2.3. My hostname is mail.mydomain1.com. The problem began when I created rDNS for the third IP with another domain than the first, mydomain2.com. When I send an email from the first domain to an email tester, it tells me that the mail server is mail.mydomain1.com as configured in postfix but the rDNS for the IP 192.0.2.3 is associated with another domain, mydomain2.com.

Should the rDNS always be the same as the mail server hostname?

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92

1 Answers1

1

The rDNS for the IP address you send mail from should absolutely match your mailserver hostname. For best results such a hostname should also resolve to that IP address (A or AAAA) and be listed in the MX record; you can get away with not having it in your MX record as long as you specify it explicitly in your SPF record as an authorized hostname. It should give this same hostname in its EHLO.

All this checking is done to enforce consistency and make it difficult for spammers to use botnets. For more, see the canonical Q&A about how to avoid your mail being marked as spam: Prevent mail being marked as spam.

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92