MailAdept

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.

StandardWhat it does
SPFDeclares authorized senders
DKIMSigns message content
DMARCEnforces alignment and policy
BIMIDisplays brand logo in inbox
SPF

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
~allSoftfail: treat unauthorized senders as suspicious
-allHardfail: reject unauthorized senders

Example record

v=spf1 include:sendgrid.net include:_spf.google.com ip4:203.0.113.5 -all

Common 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.

DKIM

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

1

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.

2

Message signed

The sending server signs the message headers and body with the private key.

3

Signature added

The signature travels in a DKIM-Signature header.

4

Receiving server verifies

The receiver fetches the public key via the domain and selector in that header, then checks the signature.

5

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>"
DMARC

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 only

Use when

Starting out. Collect reports without affecting delivery.

Risk

No protection. Anyone can still spoof your domain.

p=quarantine- Move to spam

Use when

SPF and DKIM pass for all legitimate senders.

Risk

Legitimate mail from unauthenticated streams can land in spam.

p=reject- Reject the message

Use 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

TagRequired
p=Required
sp=Optional
rua=Optional
ruf=Optional
pct=Optional
adkim=Optional
aspf=Optional

DMARC enforcement roadmap

1

Publish p=none with rua=

Collect aggregate reports without affecting delivery, using a dedicated address or a DMARC report processor.

2

Analyze reports for 2–4 weeks

Find every sending source and confirm SPF and DKIM pass for each legitimate one.

3

Fix authentication gaps

Add missing senders to SPF, configure DKIM where it fails, and resolve alignment issues.

4

Move to p=quarantine

Once reports are clean, switch and watch for unexpected failures.

5

Move to p=reject

After a clean period at quarantine, switch to reject for full DMARC enforcement.

Check your DMARC record →

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.

ScenarioDMARC result
SPF passes, DKIM passes, both alignedDMARC pass
SPF passes, DKIM passes, neither alignedDMARC fail
SPF fails, DKIM passes and alignedDMARC pass
SPF passes and aligned, DKIM failsDMARC pass
SPF fails, DKIM failsDMARC fail
BIMI

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.

FAQ

Email Authentication FAQ

What is email authentication?

Email authentication is a set of technical standards (SPF, DKIM, and DMARC) that allow receiving mail servers to verify that an email was sent by an authorized source and has not been tampered with in transit. Without authentication, anyone can send email that appears to come from your domain.

Do I need all three: SPF, DKIM, and DMARC?

Yes. SPF and DKIM each do different jobs, and DMARC requires at least one of them to pass and align with your From domain. Without DMARC, SPF and DKIM provide authentication but no enforcement, meaning your domain can still be spoofed. All three together form a complete authentication setup.

What is DMARC alignment?

Alignment means the domain in the From header matches the domain used by SPF or DKIM. SPF alignment requires the Return-Path domain to match the From domain. DKIM alignment requires the d= domain in the DKIM signature to match the From domain. DMARC requires at least one to align because even if SPF and DKIM both pass technically, DMARC fails if neither aligns.

What is the difference between relaxed and strict DMARC alignment?

Relaxed alignment (the default) allows subdomains to satisfy alignment so mail.yourdomain.com can satisfy alignment for yourdomain.com. Strict alignment requires an exact match where only yourdomain.com itself satisfies alignment for yourdomain.com. Most organizations use relaxed alignment for SPF and DKIM.

When should I move from p=none to p=reject?

Move to p=quarantine after reviewing DMARC aggregate reports for 2–4 weeks and confirming all legitimate sending is authenticated. Move to p=reject after a clean period at p=quarantine with no unexplained failures. Rushing to p=reject without this process risks silently rejecting legitimate mail.

What is BIMI and do I need it?

BIMI (Brand Indicators for Message Identification) is an optional standard that displays your brand logo in the inbox before the email is opened. It requires DMARC at enforcement level (p=quarantine or p=reject) and a Verified Mark Certificate (VMC). It is not required for deliverability but provides a visible trust signal and increases open rates.

Why is my DKIM passing but DMARC failing?

The most common reason is alignment. DKIM can pass cryptographically while failing DMARC alignment if the d= domain in the DKIM-Signature header does not match (or align with) the From domain. Check that the signing domain matches the domain in your From address, not just the domain of the sending service.

Does email authentication guarantee inbox placement?

No. Authentication is necessary but not sufficient for inbox placement. Passing SPF, DKIM, and DMARC removes a major blocker, but inbox placement is also determined by sender reputation, list quality, engagement rates, spam complaint rate, and content signals. Authentication is the foundation while reputation is the ongoing factor.

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.

Start free trial

14-day free trial.