Sub topic 15
Enforcement behavior and diagnosing failures
This chapter assumes you can read raw headers and SMTP bounce text. It also assumes you have already published SPF, DKIM, and DMARC records for your sending domain.
How enforcement looks in practice
Providers enforce gradually. A typical sequence has three stages:
- Mail that fails a requirement is delivered to the spam folder.
- The provider returns temporary (4xx) deferrals, which are meant to give you time to fix the problem.
- The provider returns permanent (5xx) rejections.
Timing and wording differ by provider, so read the bounce text instead of relying on the code alone.
| Signal | Typical meaning |
|---|---|
| 421 / 4.7.x deferral | Temporary. Often rate limiting or an alignment problem. Your mail server retries. |
| 550 5.7.26 (Gmail) | Authentication failure. SPF and DKIM both fail, or the sender is unauthenticated. |
| 550 5.7.515 (Microsoft) | The sending domain does not meet the required authentication level. |
| Delivered to junk | Passed the checks but reputation, complaints, or content cost you the inbox. |
Always read the human-readable text after the code. It usually names the failed check and links to a help page.
Diagnose from headers
Start with a delivered message and open its Authentication-Results header. Check three things:
- Whether SPF, DKIM, and DMARC each say
pass. - Whether the passing domain matches the From domain (alignment).
- Whether
header.dis your domain or your ESP's shared domain.
Authentication-Results: mx.example.net;
spf=pass smtp.mailfrom=bounce.example.com;
dkim=pass header.d=esp.example.net header.s=s1;
dmarc=fail (p=NONE) header.from=example.comHere SPF and DKIM both pass, but neither domain matches example.com. DMARC fails because of alignment, not because of a broken signature. The fix is to configure your ESP to sign with your own domain (a custom DKIM selector or a custom return-path).
A diagnostic path
Verify DNS before blaming the provider
Many failures come from records that are missing, duplicated, or published on the wrong name. Re-run the lookups from the setup chapters:
dig +short TXT example.com
dig +short TXT mail1._domainkey.example.com
dig +short TXT _dmarc.example.com
dig +short -x 203.0.113.25Look for these common faults:
- More than one SPF record on the same name.
- A DKIM selector in the signature that differs from the one published.
- More than 10 DNS lookups in your SPF record.
- A sending IP with no reverse DNS entry.
Common mistakes
- Testing only one message path. Marketing mail, transactional mail, and mail from your CRM often use different signing domains.
- Treating a 4xx deferral as harmless. Persistent deferrals usually become rejections.
- Assuming a pass in one provider's header means the others agree. Each receiver evaluates independently.
Exercise
A message shows spf=pass, dkim=pass, and dmarc=fail. What is the most likely cause, and what do you check next?
Show answer
Alignment. The SPF domain (smtp.mailfrom) and the DKIM domain (header.d) probably differ from the visible From domain. Compare both with header.from, then configure your ESP to sign with your own domain or use a return-path on your domain.