1. The three controls answer different questions
SPF, DKIM and DMARC are related, but they are not interchangeable.
SPF authorizes hosts to use a domain in the SMTP envelope identity, principally the MAIL FROM identity. The domain publishes one SPF policy in DNS TXT form. A receiver evaluates whether the connecting sender is authorized by that policy.
DKIM adds a cryptographic signature to the message. The signature identifies a signing domain with the d= tag and a selector with s=. The verifier retrieves the public key from DNS and checks whether signed message content still validates.
DMARC connects authentication to the domain that a person actually sees in the message's From: header. A DMARC pass requires an SPF or DKIM authentication result whose authenticated domain is aligned with the Author Domain. DMARC also lets a domain publish handling policy and request reports.
This distinction matters because “SPF passed” does not automatically mean “DMARC passed.” A third-party sender can pass SPF for its own bounce domain while the visible From domain is different and unaligned.
2. Inventory senders before touching DNS
The most common operational mistake is publishing an authentication record before identifying every legitimate sender. Build an inventory that includes:
For each sender, record the visible From: domain, envelope/Return-Path domain, DKIM signing domain and selector, sending IP ownership, and whether the vendor supports custom aligned domains.
Do not “fix” deliverability by adding arbitrary IP ranges from old documentation. Ask each provider for its current SPF/DKIM configuration and understand whether an include: delegates trust to infrastructure that can change.
- primary mailbox provider;
- ticketing/helpdesk;
- CRM and marketing service;
- invoicing/accounting platform;
- website transactional mail;
- monitoring/alerting service;
- scanners, NAS appliances or line-of-business applications;
- outsourced services that send using the organization's From domain.
3. Build one SPF policy and respect the lookup limit
A simplified example:
example.com. TXT "v=spf1 include:_spf.example-provider.test -all"RFC 7208 defines SPF and limits terms that cause DNS lookups during evaluation. Deep chains of include, a, mx, redirect and related mechanisms can make an otherwise sensible-looking record exceed the evaluation limit and return a permanent error.
Do not publish multiple independent v=spf1 records at the same owner name. Consolidate legitimate senders into one policy.
Be deliberate with the final qualifier. -all is a strong assertion that non-matching hosts are not authorized. ~all is weaker. The right transition depends on whether the inventory is complete and how downstream systems use the result. Changing the qualifier does not repair alignment or DKIM.
SPF forwarding is another reason not to rely on SPF alone: a forwarder may retransmit a message from an IP not authorized by the original domain.
4. Configure DKIM with provider-generated keys and controlled selectors
DKIM typically publishes a public key below a selector:
selector1._domainkey.example.comThe sending system signs with the corresponding private key. The exact DNS value and key rotation process are provider-specific; do not generate a record from a blog example and assume it matches the sender.
Prefer modern key sizes supported by the provider. Google currently requires at least 1024-bit DKIM for messages sent to personal Gmail accounts and recommends 2048-bit keys when the provider supports them. Keep selectors documented so an old key can be retired without guessing which service still uses it.
A DKIM pass proves that the signature validates for the signing domain; it does not by itself prove the visible From domain is authorized. DMARC alignment is the bridge.
5. DMARC changed: use the current RFC, not an old template
As of May 2026, RFC 9989 is the current standards-track DMARC specification and obsoletes RFC 7489 and RFC 9091. It retains the central concept: DMARC evaluates whether an authenticated SPF or DKIM identifier aligns with the message's Author Domain.
A monitoring-oriented record may look conceptually like:
_dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:[email protected]"That is a pattern, not a production record. The reporting mailbox must exist and be able to handle aggregate reports safely. RFC 9989 also works with the current aggregate-reporting specification RFC 9990.
Start by observing legitimate sources. If reports show unknown senders, investigate them instead of immediately authorizing them. The objective is to reduce unauthorized use while preserving known business mail.
Move from monitoring toward enforcement only after legitimate systems consistently align. A p=reject policy is not a magic anti-spam switch and should not be used as compensation for an incomplete sender inventory.
6. Understand alignment before changing policy
DMARC can pass through aligned SPF or aligned DKIM.
For SPF, DMARC uses the authenticated MAIL FROM domain and compares it with the Author Domain. For DKIM, it compares the validated d= signing domain with the Author Domain. Relaxed alignment generally allows the same organizational domain; strict alignment requires a closer exact-domain relationship according to the specification.
This is why a hosted platform that signs d=vendor.example and uses its own Return-Path may authenticate successfully yet fail DMARC for From: [email protected]. The provider needs a supported custom/aligned configuration or another valid aligned authentication path.
7. Verify with real message headers, not DNS alone
DNS confirms what policy is published; it does not prove a sender uses it correctly. Send controlled test messages through each legitimate path, then inspect the received Authentication-Results, DKIM-Signature, Return-Path and From headers.
Record:
Do not paste production messages containing personal data or tokens into random online analyzers. Use receiver-native headers or approved diagnostic tooling.
- SPF result and evaluated domain;
- DKIM result, selector and d= domain;
- DMARC result and alignment;
- receiving service;
- timestamp;
- exact sending system.
8. Gmail requirements are an operational floor, not the whole design
Google's current sender guidelines require all senders to Gmail to use SPF or DKIM, along with other infrastructure requirements. Senders of more than 5,000 messages per day to Gmail accounts must use SPF, DKIM and DMARC and satisfy additional requirements such as alignment for direct mail and one-click unsubscribe for applicable subscribed/marketing messages.
Even a small organization benefits from deploying all three controls correctly. The goal is not merely to pass one provider's threshold; it is to make domain use explicit, observable and harder to spoof.
Change plan
- Inventory every legitimate sender and owner.
- Export current DNS TXT records and mail-provider settings.
- Consolidate and validate SPF.
- Enable DKIM per provider and verify selectors.
- Publish DMARC monitoring with a controlled reporting destination.
- Test every sender path and inspect received headers.
- Analyze aggregate reports; remove stale/unauthorized sources.
- Advance enforcement only with rollback and owner approval.
- Re-test after changing ESP, helpdesk, CRM or marketing systems.
- Keep a living sender register rather than treating DNS as a one-time project.
Worked authentication trace: SPF/DKIM pass while DMARC fails (synthetic)
SYNTHETIC HEADER EXAMPLE, NOT A DELIVERED EMAIL: A message carries From: [email protected] and Return-Path: <[email protected]>. An illustrative receiver-generated Authentication-Results value is: mx.receiver.example; spf=pass smtp.mailfrom=vendor.test; dkim=pass header.d=vendor.test; dmarc=fail header.from=example.com. The SPF identity and DKIM signing domain authenticate vendor.test, but neither aligns with the example.com Author Domain. A valid SPF or DKIM result alone does not satisfy DMARC when the domains are unaligned.
SECOND SYNTHETIC CASE: The same visible From remains [email protected], the envelope SPF result still authenticates vendor.test, but the provider now produces a genuinely VALID DKIM signature with d=example.com. An illustrative Authentication-Results record then contains dkim=pass header.d=example.com and dmarc=pass header.from=example.com. This is a hypothetical receiver outcome, not proof that simply editing a text header or DNS record makes a signature valid. The actual signing key, selector, DNS record and received message must all be checked.
OPERATIONAL DECISION: If third-party mail unexpectedly fails DMARC, first inspect the provider-supported custom DKIM identity or aligned return-path domain, and examine real receiver headers with authorized tooling. Do not whitelist a broad vendor IP range or immediately move p=none to p=reject just to make a report look tidy. RFC 9989 defines alignment around authenticated identifiers and the Author Domain; relaxed and strict modes can yield different outcomes.
- Expected: vendor.test SPF pass plus vendor.test DKIM pass still yields DMARC fail for From example.com when neither identifier aligns.
- Expected: verified DKIM pass with d=example.com may yield DMARC pass even if unaligned SPF is still pass, because one aligned authentication path suffices.
- Negative check: a DKIM header saying d=example.com is NOT sufficient when the cryptographic signature fails; do not treat a mock header as a trust decision.
- Capture real-world evidence only from a message the organization is authorized to test; redact recipients, tokens, routing metadata and customer content from public examples.
Related guides
Primary sources & further reading
- RFC 7208 — SPF ↗
- RFC 6376 / STD 76 — DKIM ↗
- RFC 9989 — DMARC (May 2026; obsoletes RFC 7489 and 9091) ↗
- RFC 9990 — DMARC Aggregate Reporting ↗
- Google — Email sender guidelines ↗
Sources are credited for verification, not reproduced. Linked pages may change after publication.