Errors

5.7.25: reverse DNS failed for the sending IP, and how to fix it

Short answer

5.7.25 means the IP address that sent your email failed a reverse DNS check. At Gmail it means the IP has no PTR record, or the PTR name does not resolve back to the same IP. At Microsoft 365 it means an IPv6 sender has no reverse DNS record. The fix belongs to whoever owns the IP: set a PTR record that matches a forward A or AAAA record, or send through a provider that already does.

Last checked 16 November 2026

A 5.7.25 bounce means the server that delivered your email failed a reverse DNS check. The receiving side looked up the PTR record of the sending IP and either found none, or found a hostname that does not point back to that IP. You fix it on the IP, not in your domain’s records.

The error message

Gmail’s SMTP error reference lists it like this:

550 5.7.25 This message was blocked because the sending IP address doesn't have a PTR record, or the forwarding DNS entry doesn't reference the sending IP address. Gmail requires that sending IP addresses have a PTR record.

Microsoft’s NDR reference lists:

5.7.25 Access denied, the sending IPv6 address [2a01:111:f200:2004::240] must have a reverse DNS record

What it means

RFC 7372 registers X.7.25 as “Reverse DNS validation failed”: the client’s IP address failed a reverse DNS check, contrary to local policy. Receivers do two lookups. First the PTR record of the IP gives a hostname. Then the A or AAAA record of that hostname must give back the same IP. This is called forward-confirmed reverse DNS. If either step fails, the IP looks like a home connection or a misconfigured server, which is where a lot of spam comes from.

Why it happens

  • The IP has no PTR record at all. Common on new cloud servers and virtual machines.
  • The PTR record points to a generic name like ip-203-0-113-10.provider.net that has no matching forward record.
  • The hostname in the PTR does not resolve back to the same IP, for example after a server move.
  • IPv6 was used without IPv6 reverse DNS. Your server prefers IPv6 when the receiver offers it, and only the IPv4 address was set up. This is the Microsoft case.
  • You are sending straight from an app server instead of through a mail provider.

How to fix it

  1. Find the sending IP in the bounce or in your server log. Note whether it is IPv4 or IPv6.
  2. Check the PTR record: dig -x 203.0.113.10 +short. Then check the name it returns: dig A mail.example.com +short. Both must agree.
  3. Set the PTR record with the IP owner. In most cloud and hosting panels this is called reverse DNS. Choose a hostname you control, such as mail.example.com.
  4. Add the matching forward record in your domain’s DNS:
    mail.example.com.  A     203.0.113.10
    mail.example.com.  AAAA  2001:db8::10
  5. Fix IPv6 or turn it off for outbound mail. Either give the IPv6 address its own PTR and AAAA records, or configure your mail server to send over IPv4 only.
  6. Make the server greet with that name. Set the HELO/EHLO hostname to the same name as the PTR. See our reverse DNS guide for the full checklist.
  7. Or stop sending from your own IP. An email API or SMTP relay delivers from IPs that already have correct reverse DNS.

Which server sent it

Provider Meaning of 5.7.25
Gmail Sending IP has no PTR, or the PTR does not resolve back to the IP. Gmail also uses temporary versions: 421 4.7.0 and 451 4.7.23 with the same explanation and a rate limit.
Microsoft 365 / Outlook IPv6 sender without a reverse DNS record.
Postfix servers Postfix 3.0 and later reject unknown clients with 450 4.7.25 Client host rejected: cannot find your hostname, a temporary version of the same check. Older releases sent 4.7.1.
Yahoo Not listed by number on Yahoo’s error page.

Is it temporary?

A 550 5.7.25 is permanent: retrying from the same IP fails until reverse DNS is fixed. The 4.7.x versions from Gmail and Postfix are temporary, so your server keeps retrying, but they will not clear on their own either. Fix the records, wait for the DNS TTL to pass, then let the queue retry or resend.

How Mailcandor handles it

Mailcandor delivers through Amazon SES, whose sending IPs already have reverse DNS, so you never manage PTR records yourself. If you move an app off its own mail server, the deliverability coach explains any bounce you still get in plain English, and hard bounces go on your suppression list automatically. Paste any code into the free bounce code lookup, see the SPF, DKIM and DMARC guide for domain records, or browse all error codes. More free checks are on the tools page.

Questions

What is a PTR record?

A reverse DNS record. It maps an IP address back to a hostname, for example 203.0.113.10 to mail.example.com. Receivers check that the hostname also resolves forward to the same IP.

Can I add a PTR record in my DNS zone?

Usually not. PTR records live in the reverse zone controlled by whoever owns the IP block: your hosting company, cloud provider or ISP. Ask them, or set it in their control panel.

Why does Gmail say 5.7.25 but Microsoft talks about IPv6?

Each provider attaches its own text to the code. Gmail uses it for any sending IP without a matching PTR record. Microsoft's NDR reference describes it for IPv6 senders without reverse DNS.

Is there a temporary version of this error?

Yes. Gmail sends 421 4.7.0 or 451 4.7.23 with the same PTR explanation when it rate limits rather than blocks. Fix the PTR record and the deferrals stop.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.