Email trouble: PTR records

I recently encountered an issue where my outgoing emails would bounce back with generic error messages such as "Denied by policy".

After running mxtoolbox I noticed I had missed to set up a PTR record for my IP adress.

Quoting mxtoolbox:

When a sending server makes a connection to the recipient server, the recipient server notes the sending IP address and performs a reverse lookup, called a PTR lookup, named after the type of DNS record used. If the result of the reverse lookup matches the result of a forward DNS Lookup, then it's much more likely that the message is legitimate. If the IP address doesn't match, it's much more likely that the sending address was spoofed and therefore much more likely that it's unwanted and could be considered spam.

My emails addresses got marked as spam because my domain name resolved to an IP adress which did not resolve back to my domain name using a reverse DNS lookup. Spam emails are usually sent from servers lacking these records because it requires more time and knowledge to configure.

In my case the fix was easily applied by sending a request to my provider to set up a PTR record and now my emails are delivered once again.