Forward DNS maps a name to an address. Reverse DNS maps the address back to a name, and mail servers check it: an address with no name, or a name that does not match, is treated as a home connection sending spam.

Check what yours says

dig -x 1.2.3.4 +short\n# should print mail.yourdomain.com.

A generic name from the provider - something with the IP digits in it - is the default and is not good enough for a server that sends mail.

It is set at the provider, not in your DNS

Reverse DNS lives with whoever owns the IP address. You cannot set it in your own DNS zone, however much you would like to. It is a field in the provider panel, or a support request.

The three must agree

  • The reverse record points to a name, e.g. mail.yourdomain.com.
  • That name resolves forward, back to the same IP.
  • The mail server introduces itself with that same name in HELO.
dig mail.yourdomain.com +short   # must be the same address\npostconf myhostname             # must be the same name

A mismatch is worse than nothing

A reverse record pointing at a name that does not resolve back, or a HELO that disagrees with both, is read as a misconfiguration or a forgery. Receivers score it worse than an address with no record at all.

If you send through a relay or a transactional provider, their reverse DNS is what matters and yours is irrelevant - which is one reason a relay is easier than running your own sender.