ReplyDak

Gmail 5.7.27 and 5.7.30: bulk mail blocked for failing SPF or DKIM

Updated 10 November 2026 · 5 min read

Short answer

Gmail returns 4.7.27 (rate limited) or 5.7.27 (blocked) when bulk mail didn't pass SPF, and 4.7.30 or 5.7.30 when it didn't pass DKIM. Google requires bulk senders to pass both. For 5.7.27, make sure the IP that sent the message is covered by the SPF record of the Return-Path domain; for 5.7.30, make sure the message carries a valid DKIM signature whose key is published at selector._domainkey.

The codes

CodeMeaning (Google's wording, paraphrased)Temporary?
4.7.27Rate limited because SPF authentication didn't passYes, retried
5.7.27Blocked because it didn't pass SPF authenticationNo
4.7.30Rate limited because DKIM authentication didn't passYes
5.7.30Blocked because it didn't pass DKIM authenticationNo
4.7.24 / 5.7.24The sending domain's SPF record has suspicious entries4.x yes, 5.x no

Fixing 5.7.27 (SPF)

  1. 1

    Find the Return-Path domain

    SPF is checked on the envelope sender, not the From. In a delivered copy, read the Return-Path header.

  2. 2

    Find the sending IP

    From the bounce or the Received headers.

  3. 3

    Check that domain's SPF covers that IP

    If a new tool sends with your domain as Return-Path, its include or IPs must be in your SPF record.

  4. 4

    Rule out permerror

    Two SPF records, too many lookups or a dead include make SPF fail for everything. See too many lookups.

Fixing 5.7.30 (DKIM)

  1. 1

    Is the message signed at all?

    Look for a DKIM-Signature header. If missing, DKIM signing isn't switched on (Google Workspace needs Start authentication; Microsoft 365 needs the toggle).

  2. 2

    Does the key exist?

    dig TXT <s>._domainkey.<d> using the s= and d= from the signature. Missing key → publish it.

  3. 3

    Does it verify?

    A body hash mismatch means something changed the message after signing; see body hash did not verify.

Why both, when DMARC needs only one

DMARC passes with SPF *or* DKIM aligned. Gmail's bulk-sender rules go further and expect both SPF and DKIM to pass, which is why these codes can appear even when DMARC passes. A message with DKIM but failing SPF can get 4.7.27 while still showing dmarc=pass.

Check the result

Fix the record, then let the 4.x rate-limited mail retry; 5.x mail must be re-sent. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.

More setups and errors: SPF, DKIM and DMARC by provider, DNS host and error.

FAQ

What does Gmail 5.7.27 mean?

A bulk message was blocked because it didn't pass SPF authentication.

What does Gmail 5.7.30 mean?

A bulk message was blocked because it didn't pass DKIM authentication.

Will rate-limited 4.7.27 mail be delivered?

4.x codes are temporary; your server retries. Fix SPF quickly so retries pass.

Sources

Related

Microsoft 365 mailboxes are coming soon. Until then, new orders use Google Workspace mailboxes.