Gmail Is Rejecting Mail It Used to Deliver: SPF, DKIM, DMARC and the 10-Lookup Trap
The worst email failure is the one nobody reports. An invoice or a password reset goes out, and the customer simply never sees it. Nobody on your side gets an error message. Sales assumes the lead went cold, and support
The worst email failure is the one nobody reports. An invoice or a password reset goes out, and the customer simply never sees it. Nobody on your side gets an error message. Sales assumes the lead went cold, and support assumes the customer is ignoring them.
For most of the last decade a sloppy email setup cost you some spam-folder placement. Since 2024 the big mailbox providers have been turning that into hard rules with rejections attached, and I think a lot of companies are still configured for the old world without knowing it.
What the providers now require
Google set the pattern. From February 2024, anyone sending 5,000 or more messages a day to personal Gmail accounts has to authenticate mail with both SPF and DKIM, publish a DMARC record, make the visible From domain align with one of those, offer one-click unsubscribe on marketing mail, and keep the spam rate reported in Postmaster Tools below 0.3 percent, ideally under 0.10 percent (Gmail sender guidelines). Yahoo published matching requirements for bulk senders, including a DMARC policy of at least p=none and honouring unsubscribes within two days (Yahoo Sender Hub).
Microsoft followed on 5 May 2025 for Outlook.com, Hotmail and Live. A domain sending 5,000 or more messages to those services has to pass SPF and DKIM and publish an aligned DMARC record, and mail that fails can bounce with 550 5.7.515 Access denied, sending domain does not meet the required authentication level (Microsoft Support).
Then the tone changed. In November 2025 Google added a line to its FAQ saying Gmail "is ramping up its enforcement on non-compliant traffic" and that failing messages "will experience disruptions, including temporary and permanent rejections" (Gmail FAQ; Spam Resource). Al Iverson of Spam Resource read it as the end of piecemeal enforcement, and that matches the wording.
You are probably a bulk sender
Plenty of companies read "5,000 a day" and decide this is a newsletter problem. Two details in Google's FAQ make that risky.
First, Google counts every message sent from the same primary domain, subdomains included. Your newsletter, invoicing tool, help desk, CRM sequences and app notifications all add up to one number if they share your domain. Second, Google says senders who cross the threshold even once "are permanently considered bulk senders" (Gmail FAQ). One product launch or one end-of-year reminder blast is enough.
So the question isn't whether your marketing team sends a lot. It's whether every system that sends as your domain is set up correctly, because they share the consequences.
Alignment, briefly
SPF lets your domain publish which servers may send for it, checked against the hidden envelope address. DKIM puts a cryptographic signature on each message, tied to a domain. DMARC asks one more question: does the domain that passed SPF or DKIM match the domain in the From line the reader sees?
That last check is where SaaS tools trip people up. A help desk can send mail that passes SPF and DKIM perfectly well, for its own domain. Your customer sees your name in the From line, the authentication belongs to someone else, and DMARC fails. The fix is nearly always in the vendor's settings under a heading like "authenticate your domain", where they give you DNS records to publish so their signatures carry your domain.
The 10-lookup trap
SPF has a hard limit that most people learn about by breaking it. Evaluating a record may take no more than 10 DNS lookups, counting every include, a, mx, exists and redirect, including the ones nested inside a vendor's own record. Go over and the result is a permanent error, so SPF fails for every message (RFC 7208, section 4.6.4).
Every new tool asks you to add one more include. Nobody removes the old ones.
To see how close real companies run, I wrote a small checker and pointed it at a few large domains. GitHub's SPF record on 4 December 2026 has eight includes, and two of those vendors' records do a further lookup each. The total is exactly 10:
### github.com
SPF v=spf1 ip4:192.30.252.0/22 ... include:spf.protection.outlook.com include:_netblocks.google.com include:_netblocks2.google.com include:mail.zendesk.com include:_spf.salesforce.com include:servers.mcsv.net include:mktomail.com include:sendgrid.net ... ~all
10 DNS lookups (limit is 10)
DMARC v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1
policy=quarantine reports=yes
DKIM found selector(s): google, selector1, k1, s1, s2
### shopify.com
SPF v=spf1 include:_spf.google.com include:mail.zendesk.com include:sendgrid.net ~all
4 DNS lookups (limit is 10)
DMARC v=DMARC1; p=reject; pct=100; fo=1; rua=mailto:[email protected];ruf=mailto:[email protected]
policy=reject reports=yes
DKIM found selector(s): google, mail
I'm not saying GitHub has a problem. Ten is allowed, a team that size presumably watches it, and an aligned DKIM signature can carry DMARC on its own, though Microsoft's rules ask for SPF and DKIM to both pass. The point is how little headroom a well-run company has. One more marketing tool, or a vendor adding a nested include to its own record without telling anyone, and SPF fails. My guess is that plenty of smaller companies with nobody watching are already at 11 or 12.
Start by removing includes for tools you no longer use. If that isn't enough, move marketing mail to its own subdomain, such as mail.yourdomain.com, with a separate SPF record. It still counts toward Google's 5,000, but it gets its own lookup budget. Either way, make sure every vendor signs with DKIM for your domain so you aren't relying on SPF alone.
p=none is the floor, not the goal
All three providers accept a DMARC policy of p=none. That record asks receivers to report failures and do nothing else, so anyone can still send mail claiming to be from your exact domain.
That matters because invoice and payment fraud often arrives by email. The FBI's 2025 Internet Crime Report lists $3,046,598,558 in reported business email compromise losses for the year (FBI IC3). DMARC at quarantine or reject stops exact-domain spoofing. It does nothing about lookalike domains or a genuinely compromised mailbox, so treat it as one control among several.
The way up is the reports. Add rua=mailto: to your record and receivers send you daily aggregate reports listing every server that sent as your domain and whether it passed. Read them for a few weeks, find each legitimate sender, fix its alignment, then move to p=quarantine and later p=reject.
The DMARC standard itself was updated this year. In May 2026 the IETF published RFC 9989, 9990 and 9991, which replace the old specification, deprecate the pct= tag and add an np= tag for subdomains that don't exist (dmarc.org). Existing records still work. If you're editing yours anyway, pct= is a tag you can drop.
Check your own domain
The checker is about forty lines of Python with no dependencies. It looks up your SPF record over Google's public DNS-over-HTTPS service and counts lookups recursively, reads your DMARC policy and whether reports are on, and tries common DKIM selector names. Run it as python3 mailauth.py yourdomain.com. If your provider uses an unusual DKIM selector, pass it as an extra argument, because a "not found" there often means only that the guess was wrong.
Without the script, two DNS queries show most of it:
dig +short TXT yourdomain.com | grep spf1
dig +short TXT _dmarc.yourdomain.com
Count the include, a, mx, exists and redirect terms in the first result, then repeat for each included domain, and you have your lookup total.
You can also check a real message. In Gmail, open a message you sent to yourself at a personal Gmail address, choose "Show original", and look for SPF: PASS, DKIM: PASS and DMARC: PASS. Do it once for every system that sends as your domain, not only your own mailbox.
A worked example
An invented case with a realistic shape. A 30-person B2B company sends a monthly newsletter of 12,000 emails in one morning, about half to Gmail addresses, so it crossed Google's threshold the first time and is now a permanent bulk sender there. Its SPF record has eleven lookups after someone added a webinar tool in the spring. Its help desk sends with the vendor's own DKIM signature. DMARC is p=none with no reporting address, so nobody has seen any of this.
The fix takes about a week of calendar time and a few hours of work. They remove two includes for tools cancelled last year, which brings SPF to eight lookups. They publish the help desk's DKIM records, add rua= and read two weeks of reports, which turn up one forgotten survey tool sending as the domain. Once every legitimate sender passes, they move to p=quarantine.
What to do this week
- Run the checker or any free SPF and DMARC lookup on every domain you send from, and write down the lookup count and DMARC policy.
- List every system that sends email as your domain. Ask marketing, sales, support, finance and engineering, because each team tends to own at least one.
- Send a test from each to a personal Gmail address and confirm SPF, DKIM and DMARC all pass in "Show original".
- For any vendor that fails alignment, find its domain authentication settings and publish the DKIM records it gives you.
- If SPF is near or over 10 lookups, remove dead includes and consider a separate subdomain for marketing mail.
- Add a
rua=address to your DMARC record today, and set a reminder to read the reports in two weeks and decide when to move toquarantine.
If you'd like help reading the DMARC reports or untangling an SPF record that has grown for years, I'm happy to look.
Michael, ArkNet Digital (https://www.arknet.digital)
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.