Gmail "Mail delivery failed: returning message to sender" > Created PTR record

What is the name of the domain?

e-reportingca

What is the error number?

550-5.7.25

What is the issue you’re encountering

Email Undeliverable

What steps have you taken to resolve the issue?

Created PTR record in Cloudflare

What feature, service or problem is this related to?

DNS records

What are the steps to reproduce the issue?

On Friday, I received this:

[email protected]
host gmail-smtp-in.l.google.com [142.250.114.27]
SMTP error from remote mail server after end of data:
550-5.7.25 [nn.222.136.122] The IP address sending this message does not have a
550-5.7.25 PTR record setup, or the corresponding forward DNS entry does not
550-5.7.25 match the sending IP. As a policy, Gmail does not accept messages
550-5.7.25 from IPs with missing PTR records. For more information, go to
550-5.7.25 Email sender guidelines - Google Workspace Admin Help
550-5.7.25 To learn more about Gmail requirements for bulk senders, visit
550 5.7.25 Email sender guidelines - Google Workspace Admin Help. 006d021491bc7-5c41492b0cbsi685894eaf.25 - gsmtp

I found this when searching for what to do: https://www.cloudflare.com/learning/dns/dns-records/dns-ptr-record/

I went into Cloudflare and created a PTR record using 122.136.222.nn.in-addr.arpa as the domain name.


Today, when I sent another email to a Gmail account:

[email protected]
host gmail-smtp-in.l.google.com [142.250.114.27]
SMTP error from remote mail server after end of data:
550-5.7.25 [nn.222.136.122] The IP address sending this message does not have a
550-5.7.25 PTR record setup, or the corresponding forward DNS entry does not
550-5.7.25 match the sending IP. As a policy, Gmail does not accept messages
550-5.7.25 from IPs with missing PTR records. For more information, go to
550-5.7.25 Email sender guidelines - Google Workspace Admin Help
550-5.7.25 To learn more about Gmail requirements for bulk senders, visit
550 5.7.25 Email sender guidelines - Google Workspace Admin Help. 586e51a60fabf-25d8e17fc2esi5261416fac.23 - gsmtp

Any ideas on why I still can’t send to gmail.com accounts?

Thanks,

John

Reverse records (IP → domain) can’t be created in a forward zone (domain → IP).

Creating a PTR record is something that needs to be done by the owner of the IP. Usually, there would be an option in your hosting menu somewhere.

1 Like

Thanks @Laudian Laudian. I followed the instructions in that Cloudflare Learning doc I linked to:


While DNS A records are stored under the given domain name, DNS PTR records are stored under the IP address — reversed, and with “.in-addr.arpa” added. For example, the PTR record for the IP address 192.0.2.255 would be stored under “255.2.0.192.in-addr.arpa”.

“in-addr.arpa” has to be added because PTR records are stored within the .arpa top-level domain in the DNS. .arpa is a domain used mostly for managing network infrastructure, and it was the first top-level domain name defined for the Internet. (The name “arpa” dates back to the earliest days of the Internet: it takes its name from the Advanced Research Projects Agency (ARPA), which created ARPANET, an important precursor to the Internet.)

in-addr.arpa is the namespace within .arpa for reverse DNS lookups in IPv4.


So I should ask my host to do it? But they don’t have access to my Cloudflare account… So I’m a bit confused.

Thanks,

John

PTR records have nothing to do with your Cloudflare account.

PTR records can only be set by the owner of an IP address, which is usually your host.
Your host could use Cloudflare (in their own account) to create PTR records, but you can’t.

As I said, there would usually be some menu where you can set reverse records if you have a dedicated IP address from your host.

1 Like

@Laudian it looks like this because my website is hosted on a shared server: the PTR record is properly configured with the server name on it.

My guess is that gmail.com wants the PTR IP address to match the domain I am sending from, not the machine name I am sending from.

John

Your MX is pointing to a proxied hostname. I don’t know if that is part of this specific problem, but it will always create problems. If the MX hostname is in the same domain, it should be set to :grey: DNS Only.

https://cf.sjr.org.uk/tools/check?da2ced1ae4ba41ca82de7fe49f43975b#dns-mail

1 Like

No, it is not.

dig +short 122.136.222.67.in-addr.arpa ptr
by.dns8.net.

dig +short by.dns8.net
67.222.136.247

You can see that the hostname in the reverse DNS record does not match the IP in the forward record.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.