Email Authentication Guide
Email Authentication: SPF, DKIM, DMARC, and BIMI Explained
The technical foundation of email deliverability: how SPF, DKIM, DMARC, and BIMI work, how to set each one up, and how to reach full enforcement without breaking legitimate mail.
MailAdept team
Email deliverability guide
- SPF, DKIM, DMARC, and BIMI
- How alignment works
- DMARC enforcement roadmap
- Common setup mistakes
Why Email Authentication Matters
Every major inbox provider checks it before deciding where your mail lands.
Inbox placement
Authentication is a primary spam signal. Failing SPF or DKIM pushes mail toward spam before content is evaluated.
Domain protection
Without DMARC enforcement, anyone can send email as your domain and spoof your brand.
Provider requirements
Google and Yahoo require DMARC for bulk senders. Without it, mail may be rejected or filtered.
Sender reputation
Failures erode reputation; consistent passes build trust.
The Email Authentication Stack
Four standards at four layers. They work together, not as alternatives.
| Standard | What it does | Layer |
|---|---|---|
| SPF | Declares authorized senders | Envelope |
| DKIM | Signs message content | Message |
| DMARC | Enforces alignment and policy | Policy |
| BIMI | Displays brand logo in inbox | Trust |
Sender Policy Framework
SPF is a DNS TXT record listing who may send email for your domain. Receivers check the sending IP against it.
Common SPF mechanisms
| ip4: | Authorize an IPv4 address or range |
| ip6: | Authorize an IPv6 address or range |
| include: | Include another domain's SPF record (e.g. a sending service) |
| a: | Authorize a domain's A record |
| mx: | Authorize a domain's MX servers |
| ~all | Softfail: treat unauthorized senders as suspicious |
| -all | Hardfail: reject unauthorized senders |
Example record
v=spf1 include:sendgrid.net include:_spf.google.com ip4:203.0.113.5 -allCommon SPF issues
Multiple SPF records
Publish exactly one SPF TXT record. Multiple records fail evaluation, so merge them.
Exceeding the 10-lookup limit
Each include: and other DNS-lookup mechanism counts toward a hard limit of 10. Exceeding it returns PermError, which many providers treat as a fail.
Missing authorized senders
A legitimate sending service left out of SPF can fail authentication.
Overly permissive policy
+all or ?all authorize every sender. End with ~all or -all.
DomainKeys Identified Mail
DKIM cryptographically signs every outgoing email. Receivers verify it with the public key in your DNS, proving the message is authorized and unaltered.
How DKIM works
Key pair generated
Your provider creates a public/private key pair. The private key stays on the sending server; the public key goes in DNS.
Message signed
The sending server signs the message headers and body with the private key.
Signature added
The signature travels in a DKIM-Signature header.
Receiving server verifies
The receiver fetches the public key via the domain and selector in that header, then checks the signature.
Pass or fail
A matching signature passes. A message modified in transit, or a wrong key, fails.
DKIM best practices
- Use 2048-bit keys; 1024-bit is considered weak
- Configure DKIM on every domain and subdomain you send from
- Rotate keys periodically to limit exposure
- Use a unique selector per sending service
- Confirm DKIM passes before applying a strict DMARC policy
DNS record format
selector._domainkey.yourdomain.com TXT "v=DKIM1; k=rsa; p=<public key>"Domain-based Message Authentication
DMARC is the enforcement layer. It ties SPF and DKIM to your From domain and tells receivers what to do when they fail.
DMARC policy levels
p=none- Monitor onlyUse when
Starting out. Collect reports without affecting delivery.
Risk
No protection. Anyone can still spoof your domain.
p=quarantine- Move to spamUse when
SPF and DKIM pass for all legitimate senders.
Risk
Legitimate mail from unauthenticated streams can land in spam.
p=reject- Reject the messageUse when
All legitimate sending is authenticated and reports show no unexplained failures.
Risk
Mail from misconfigured senders is rejected, unseen by recipients.
DMARC record tags
| Tag | Required | Description |
|---|---|---|
| p= | Required | Policy for the organizational domain (none / quarantine / reject) |
| sp= | Optional | Policy for subdomains (inherits p= if omitted) |
| rua= | Optional | Address for aggregate reports (daily XML summaries) |
| ruf= | Optional | Address for forensic reports (per-failure detail) |
| pct= | Optional | Percentage of messages the policy applies to (default 100) |
| adkim= | Optional | DKIM alignment mode: r (relaxed, default) or s (strict) |
| aspf= | Optional | SPF alignment mode: r (relaxed, default) or s (strict) |
DMARC enforcement roadmap
Publish p=none with rua=
Collect aggregate reports without affecting delivery, using a dedicated address or a DMARC report processor.
Analyze reports for 2–4 weeks
Find every sending source and confirm SPF and DKIM pass for each legitimate one.
Fix authentication gaps
Add missing senders to SPF, configure DKIM where it fails, and resolve alignment issues.
Move to p=quarantine
Once reports are clean, switch and watch for unexpected failures.
Move to p=reject
After a clean period at quarantine, switch to reject for full DMARC enforcement.
DMARC Alignment Explained
Passing is not aligning. SPF or DKIM can pass and still fail DMARC if its domain does not align with the From header domain.
| Scenario | DMARC result |
|---|---|
| SPF passes, DKIM passes, both aligned | DMARC pass |
| SPF passes, DKIM passes, neither aligned | DMARC fail |
| SPF fails, DKIM passes and aligned | DMARC pass |
| SPF passes and aligned, DKIM fails | DMARC pass |
| SPF fails, DKIM fails | DMARC fail |
Brand Indicators for Message Identification
BIMI is an optional standard that displays your brand logo in the inbox. It builds on DMARC enforcement.
Requirements
- DMARC at p=quarantine or p=reject (p=none is not enough)
- A Verified Mark Certificate (VMC), required by Gmail and Yahoo
- A square SVG logo in SVG Tiny PS format
- The SVG hosted at a stable, public HTTPS URL
- A BIMI TXT record at default._bimi.yourdomain.com
Benefits
- Logo shown before the email is opened
- A visible trust signal that increases open rates
- Signals strong authentication (requires enforced DMARC)
- Stands out in crowded inboxes
DNS record format
default._bimi.yourdomain.com TXT "v=BIMI1; l=https://yourdomain.com/logo.svg; a=https://yourdomain.com/vmc.pem"Common Authentication Mistakes
Configuring authentication on the main domain only
Each sending domain and subdomain, like mail.yourdomain.com or outreach.yourdomain.com, needs its own SPF, DKIM, and DMARC.
Moving to p=reject too quickly
Skipping p=none monitoring hides failing streams, so a premature p=reject can silently drop legitimate mail.
Not setting up rua= reporting
Without aggregate reports, you cannot see what passes or fails. Set rua= from day one.
SPF with too many DNS lookups
Nested include: records quickly exceed the 10-lookup limit. Count lookups before publishing.
Weak DKIM key length
Many older ESP setups still default to 1024-bit keys. Check yours and use 2048-bit.
Ignoring DKIM alignment
DKIM can pass yet fail DMARC if the signature's d= domain doesn't align with the From domain.
Free Authentication Checkers
FAQ
Email Authentication FAQ
What is email authentication?
Do I need all three: SPF, DKIM, and DMARC?
What is DMARC alignment?
What is the difference between relaxed and strict DMARC alignment?
When should I move from p=none to p=reject?
What is BIMI and do I need it?
Why is my DKIM passing but DMARC failing?
Does email authentication guarantee inbox placement?
Get Your Authentication Setup Right
Missing or misconfigured SPF, DKIM, or DMARC is the most common root cause of deliverability problems, and the easiest to fix.
MailAdept audits your authentication stack, finds alignment gaps, and builds the fix plan with you.
Want this checked for you, every day?
MailAdept's AI agent watches your domains, tells you what to fix first and drafts the fix for your approval.