Skip to content
iBlockSpam
SMTP error code · Gmail / Google Workspace

550 5.7.27: Gmail blocked a message that didn't pass SPF

550 5.7.27 Permanent failure (5xx): the message bounced
By iBlockSpam Team Checked against sources 4 sources How we check our content
What it means

Gmail blocked (550) or rate limited (421 4.7.27) your message because it didn't pass SPF authentication, which Gmail requires from bulk email senders.

What the bounce says
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.

Start of the 5.7.27 message in Google's Gmail SMTP errors and codes reference; it continues with the SPF result for the sending IP.

What 550 5.7.27 means

Google lists two versions of this error. 421 4.7.27 says your email has been rate limited because SPF authentication didn't pass, and that Gmail requires all bulk email senders to authenticate with SPF. 550 5.7.27 says the message was blocked for the same reason. Both include an "Authentication results" line showing the SPF result for your sending IP, which is the fastest clue to the cause.

SPF passes when the sending IP is authorized by the SPF record of the envelope sender (MAIL FROM) domain. It fails when that server isn't in the record, when the record is missing, or when the record can't be evaluated, for example because of a syntax error or too many DNS lookups. A frequent cause is a newly added service, such as a newsletter tool, CRM or help desk, that sends as your domain but was never added to SPF.

Google's sender guidelines require all senders to use SPF or DKIM, and senders of more than 5,000 messages a day to Gmail accounts to use SPF, DKIM and DMARC. One registry quirk: the IANA registry assigns X.7.27 to "Sender address has null MX" (RFC 7505). Gmail uses 5.7.27 for SPF, so go by Gmail's text, not the registry name.

Likely causes

  • The sending server or service isn't listed in the SPF record of the envelope sender's domain.
  • The domain has no SPF record, or more than one.
  • The SPF record has a syntax error or needs more than 10 DNS lookups.
  • Mail is sent from a new IP address or provider that was never added to SPF.

How to fix it

If you sent the message

  1. Read the authentication results line in the bounce to see which IP failed SPF and for which domain.
  2. Add every service that sends as your domain to one SPF record, using each provider's documented include or IP ranges.
  3. Check the record for syntax errors and for the 10-lookup limit.
  4. Also sign with DKIM and publish DMARC: bulk senders to Gmail need SPF, DKIM and DMARC.

If you're the recipient or their admin

  1. No action needed at Gmail: the sender has to fix their SPF record.

Frequently asked questions

What's the difference between Gmail's 421 4.7.27 and 550 5.7.27?

Both mean SPF didn't pass. With 421 4.7.27, Gmail rate limits the message and your server retries later. With 550 5.7.27, Gmail blocks it and it bounces. Fix SPF either way, because retries keep failing until the record is right.

My SPF record exists, so why does Gmail say 5.7.27?

Having a record isn't enough: the IP that sent the message must be authorized in the SPF record of the envelope sender domain, and the record must evaluate without errors. Check which IP and domain the bounce names, then compare them with your record.

Sources

  1. Gmail SMTP errors and codes (Google Workspace Admin Help)
  2. Email sender guidelines (Gmail Help)
  3. IANA: SMTP Enhanced Status Codes registry
  4. RFC 7208: Sender Policy Framework (SPF)

Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.