clement

550 5.7.27: Message didn't pass SPF (Gmail)

Gmail blocked the message because SPF failed for the sending IP. Gmail requires bulk senders to pass SPF.

Bounce type
Hard bounce (permanent)
What to do
Fix your setup, keep the contact
Returned by
Gmail / Google Workspace

What 550 5.7.27 means

Gmail returns 550 5.7.27 when a message 'didn't pass SPF authentication' and the sender falls under Gmail's bulk sender rules, which require SPF. The temporary version is 421 4.7.27, where Gmail rate limits instead of blocking.

Note the IANA registry defines 5.7.27 as 'Sender address has null MX'; Gmail uses the code for its own SPF requirement. Trust the text in the bounce.

What the bounce looks like

The wording providers document for this code. Your bounce may add an IP address, a session ID or a help link after it.

Gmail
550 5.7.27 This message was blocked because it didn't pass SPF authentication. Gmail requires bulk email senders to authenticate their email with SPF. Authentication results: SPF with [IP] = did not pass
Gmail
421 4.7.27 Your email has been rate limited because SPF authentication didn't pass for this message. Gmail requires all bulk email senders to authenticate their email with SPF.

Temporary version. Same fix.

Why cold emailers see 550 5.7.27

  • The service sending your mail isn't included in your domain's SPF record.
  • Your SPF record exceeds 10 DNS lookups, which makes SPF evaluate to an error.
  • Two SPF records on the same domain, which is invalid and also fails.
  • The envelope sender (Return-Path) uses a domain whose SPF you don't control.

How to fix 550 5.7.27

  1. Find the IP in the bounce and identify which service owns it.
  2. Add that service's include: mechanism to your single SPF record, and remove services you no longer use.
  3. Count DNS lookups (include, a, mx, ptr, exists, redirect) and stay at 10 or fewer.
  4. Send a test to Gmail and confirm 'spf=pass' in Show original before resending.

Retry or suppress?

Don't suppress the recipient. Fix SPF and resend; every Gmail recipient will fail the same way until you do.

Reading the code

The basic code 550 means "Mailbox unavailable or message refused (permanent)" under RFC 5321. In 5.7.27, the 5 is the class (permanent failure) and the 7 is the subject (security or policy). The detail number 27 is registered in RFC 3463 / the IANA registry as "Sender address has null MX".

Class 5
Permanent failure
Resending the same message won't work. Something about the message, the recipient or the sender has to change first.
Subject 7
Security or policy
A security or policy decision: spam filtering, authentication, blocklists, permissions.
Detail 5.7.27
Sender address has null MX

Check the rest of your setup

Run your sending domain through the SPF, DKIM & DMARC checker to see which record fails, then follow how to set up SPF, DKIM and DMARC. Paste the headers of a test message into the email header analyzer to confirm all three pass.

Got a different bounce? Paste it into the SMTP error code lookup to decode it.

FAQ

Is 550 5.7.27 a hard bounce or a soft bounce?

550 5.7.27 is a permanent failure (a hard bounce): the receiving server won't accept this message if you send it again unchanged. But the cause is not the recipient's address, so treat it differently from a 'user unknown' bounce.

Should I remove the contact after a 550 5.7.27 bounce?

No. Don't suppress the recipient. Fix SPF and resend; every Gmail recipient will fail the same way until you do.

What does 5.7.27 mean in the error code?

In 5.7.27, the 5 is the class (permanent failure) and the 7 is the subject (security or policy). The detail number 27 is registered in RFC 3463 / the IANA registry as "Sender address has null MX".

Related SMTP codes

See all SMTP error codes

Sources

Try Clement free for 14 days

Clement reads the bounces that land in your Gmail and SMTP inboxes and tells dead addresses apart from policy blocks: it suppresses the first across every campaign and keeps the contact on the second, so you don't have to decode bounces by hand.

Start free trial