Founder price · 100 spots leftReserve

[ Guide ]

SPF, DKIM and DMARC explained, with examples

What SPF, DKIM and DMARC each check, how alignment works, what changed with DMARCbis (RFC 9989), and the records to publish, step by step.

· 7 min read

[ In short ]

  • SPF lists the servers allowed to send for a domain; it checks the hidden envelope sender, not the From address people see.
  • DKIM signs each message with a key published in DNS, so the receiver can tell it came from the domain and was not changed.
  • DMARC passes when SPF or DKIM passes for a domain that matches the From address, and tells receivers what to do when neither does.
  • DMARC is now RFC 9989 (May 2026): pct is gone, t=y marks test mode, and existing v=DMARC1 records keep working.

01SPF, DKIM and DMARC in one minute

SPF, DKIM and DMARC are three DNS records that let a receiving server decide whether a message really comes from the domain it claims. SPF says which servers may send. DKIM adds a signature that proves the domain sent the message unchanged. DMARC ties both to the From address and says what to do when they fail.

None of them is new, but since 2024 they stopped being optional. Gmail and Yahoo require SPF or DKIM from every sender and all three from bulk senders; Outlook.com rejects high-volume mail without them since May 2025. Even if you send a few dozen messages a day, a domain without them looks like a domain anyone can forge.

Try a case
SPF result
Envelope sender domain
DKIM result
DKIM signing domain (d=)
Alignment (adkim / aspf)
DMARC policy (p=)

From: ana@example.com · MAIL FROM: bounces@esp-mail.net · DKIM d=example.com

  1. Passes: SPF pass

    The receiver looks up the SPF record of esp-mail.net, the envelope sender, and checks the connecting IP against it. The From header plays no part.

  2. Passes: DKIM pass

    It fetches the public key from s1._domainkey.example.com and verifies the signature over the headers and body.

  3. Passes: Aligned with the From domain (relaxed)

    SPF: passed for esp-mail.net, not aligned. DKIM: passed for example.com, aligned. Relaxed: any name under the same organizational domain counts.

  4. Passes: DMARC pass

    One aligned pass is enough: DKIM carries it.

Result

Delivered

The receiver applies its usual spam filtering and delivers the message.

What a receiving server checks. Change the results, the domains and the policy to see when DMARC passes.

02SPF: which servers may send for your domain

SPF (RFC 7208) is one TXT record at your domain that lists the hosts allowed to send mail with your domain as the envelope sender, the address in the SMTP MAIL FROM command where bounces go. The receiver takes the connecting IP address and checks whether your record allows it.

SPF record
example.com.  3600  IN  TXT  "v=spf1 include:_spf.google.com include:spf.provider.example ~all"
PartMeaning
v=spf1Marks the record as SPF. Exactly one such record per domain.
include:…Also allow whatever that domain’s SPF record allows. One per sending service.
ip4:… ip6:…Allow an address or range directly. Costs no DNS lookups.
~allSoftfail everything else: suspicious, not proof of forgery.
-allFail everything else. Stricter; matters little once DMARC is enforced.

The two rules that break SPF most often

  • One record only. Two v=spf1 records at the same name give a permanent error (RFC 7208 §3.2). When you add a service, merge its include into the record you have.
  • At most 10 DNS lookups. include, a, mx, ptr, exists and redirect each cost one, nested includes count too, and the 11th makes SPF fail (§4.6.4). Remove services you no longer use.

SPF has a blind spot: it checks the envelope sender, which the recipient never sees, so on its own it does not stop someone forging your From address. It also breaks when mail is forwarded, because the forwarder’s IP is not in your record. The SPF record generator builds a valid record and counts the lookups for you.

03DKIM: a signature on every message

With DKIM (RFC 6376) the sending server signs selected headers and the body of each message with a private key, and adds a DKIM-Signature header. The receiver reads the domain (d=) and selector (s=) from that header, fetches the public key from DNS and checks the signature.

Signature header (shortened)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=s1;
  h=from:to:subject:date:message-id; bh=…; b=…
DKIM public key
; either the key itself…
s1._domainkey.example.com.  3600  IN  TXT    "v=DKIM1; k=rsa; p=MIIBIjANBgkqh…"
; …or a CNAME to a key your provider publishes and rotates
s1._domainkey.example.com.  3600  IN  CNAME  s1.dkim.provider.example.
  • Use 2048-bit RSA keys. RFC 8301 requires at least 1024 bits and recommends 2048, and forbids signing with SHA-1.
  • Sign with your own domain. Many services sign with their domain by default. That passes DKIM but does not help your DMARC. Turn on custom-domain DKIM in each service.
  • Prefer CNAME delegation. The provider can rotate keys without you touching DNS, and you avoid pasting a key longer than 255 characters into a dashboard that mangles it.

DKIM survives forwarding as long as nobody changes the message. Mailing lists that add a footer or rewrite the subject break it, which is why DMARC needs care on domains whose people post to lists.

04DMARC: alignment, policy and reports

DMARC adds what SPF and DKIM lack: a link to the From address people see. A message passes DMARC when SPF or DKIM passes and the domain that passed is aligned with the From domain. The record lives at _dmarc under your domain.

DMARC record
_dmarc.example.com.  3600  IN  TXT  "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"
TagWhat it does
p=Policy for failing mail: none (only report), quarantine (spam folder) or reject.
sp= / np=Policy for subdomains, and (new) for subdomains that do not exist.
adkim= / aspf=Alignment: r relaxed (default), s strict.
rua=Where receivers send daily aggregate reports (XML).
ruf= / fo=Failure reports and when to send them; few large receivers send them.
t=yTest mode (new): receivers apply one level less than p asks.
psd=For public suffix operators: marks where an organization’s domain begins.

Alignment, relaxed or strict

Relaxed alignment (the default) accepts any domain under the same organizational domain: a DKIM signature with d=mail.example.com aligns with From example.com. Strict alignment needs the exact same name. Most senders should stay relaxed.

The usual setup at an email provider shows why DKIM carries most of the weight: SPF passes for the provider’s own bounce domain, which does not align with yours, while DKIM signs with your domain and aligns. DMARC passes on DKIM alone, and one aligned pass is enough.

What changed with DMARCbis (RFC 9989)

  • RFC 9989, published in May 2026 as a Proposed Standard, replaces RFC 7489 (which was only Informational). Reporting moved to RFC 9990 (aggregate) and RFC 9991 (failure).
  • The organizational domain is now found with a DNS tree walk instead of the Public Suffix List, and the psd= tag lets registries mark the boundary.
  • pct, rf and ri were removed; t=y replaces the old trick of pct=0. np= was added.
  • The version tag stays v=DMARC1, so existing records keep working.
  • Domains whose users post to mailing lists should not publish p=reject, and receivers must not reject on that policy alone (§7.4).

05How to roll out DMARC without losing mail

  1. Publish p=none with a rua address. Nothing changes for delivery; you start getting reports.
  2. Read the reports for two to four weeks. List every service that sends as your domain: the mail host, the CRM, invoicing, the newsletter, the website’s contact form.
  3. Fix each one: add its SPF include or, better, turn on DKIM with your domain.
  4. Move to p=quarantine (or p=quarantine; t=y first, to test). Watch the reports for another few weeks.
  5. Move to p=reject only if nobody at the domain posts to mailing lists and the reports stay clean.

p=none is enough to meet the Gmail, Yahoo and Outlook.com rules. Enforcement is about stopping others from using your name.

The DMARC record generator writes the record for each stage. If a report points to an address on another domain, that domain must publish an authorization record (example.com._report._dmarc.reports-domain with v=DMARC1), or receivers will not send to it.

06How to check if a message passed

Open a message you sent to a Gmail or Outlook account and view the original (Gmail: Show original). The receiving server records its verdict in an Authentication-Results header:

Authentication-Results
Authentication-Results: mx.google.com;
  dkim=pass header.i=@example.com header.s=s1;
  spf=pass smtp.mailfrom=bounces.provider.example;
  dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=example.com

Here SPF passed for the provider’s domain and DKIM for yours; DMARC passed through DKIM. If you see dmarc=fail, compare the header.from domain with header.i and smtp.mailfrom: at least one must be under your domain and pass. Only trust the header your receiving server added; anything above it can be written by the sender.

When you connect a domain, Skein writes these records for you on supported DNS providers; anywhere else you paste a few lines. More on the full setup in business email on your own domain.

Questions

Do I need SPF, DKIM and DMARC, or is one enough?
Set up all three. Gmail and Yahoo accept SPF or DKIM from small senders, but bulk senders need all three, and DMARC is what links them to your From address. Without DMARC, anyone can still send mail that looks like yours.
Can I have two SPF records?
No. RFC 7208 allows one SPF record per domain; with two, SPF returns a permanent error and fails for every message. Merge the includes into a single record and keep it under 10 DNS lookups.
Why does DMARC fail when SPF and DKIM both pass?
Because neither passing domain aligns with the From address. A service that sends from its own bounce domain and signs with its own DKIM key passes both checks for its domain, not yours. Turn on custom-domain DKIM in that service.
Is p=none safe?
It is safe for delivery: receivers treat failing mail as they would without DMARC and send you reports. It does not protect your domain from spoofing, so plan to move to quarantine once the reports show every legitimate sender passing.
What is DMARCbis?
The IETF revision of DMARC, published in May 2026 as RFC 9989, with reporting in RFC 9990 and RFC 9991. It makes DMARC a standards-track protocol, removes pct, rf and ri, adds np, psd and t, and keeps v=DMARC1.

See Skein follow up for you

Business email on your own domain with an agent that follows up on every conversation. Hosted in the EU. Try the demo with sample mail, nothing to install.

[ Sources ]

  1. 01RFC 7208: Sender Policy Framework (SPF)
  2. 02RFC 6376: DomainKeys Identified Mail (DKIM)
  3. 03RFC 8301: Cryptographic algorithm and key usage update to DKIM
  4. 04RFC 9989: Domain-based Message Authentication, Reporting, and Conformance (DMARC)
  5. 05RFC 9990: DMARC aggregate reporting
  6. 06RFC 9991: DMARC failure reporting
  7. 07RFC 7489: DMARC (obsoleted by RFC 9989)
  8. 08RFC 8601: Authentication-Results header
  9. 09Google: Email sender guidelines

Facts about other products were checked on 5 Oct 2026; prices and plans change.

[ Read next ]

  • Guide

    Business email on your own domain: how to set it up

    How to get email at your own domain: pick a provider, add MX, SPF, DKIM and DMARC records, create mailboxes and test, with real DNS examples.

    7 min read

  • Guide

    Gmail, Yahoo and Outlook sender requirements, explained

    What Gmail, Yahoo and Outlook.com require from senders in 2026: SPF, DKIM, DMARC, one-click unsubscribe and spam-rate limits, and who counts as bulk.

    6 min read

  • Guide

    Email deliverability checklist for small teams

    A practical deliverability checklist: authentication, list hygiene, content and monitoring, with the bounce codes that tell you what went wrong.

    6 min read

  • Free tool

    SPF record generator

    Build a valid SPF record for your domain: pick Google Workspace, Microsoft 365 and other senders, count DNS lookups, and copy one TXT record.

    5 min read

  • Free tool

    DMARC record generator

    Build a DMARC record for your domain under the current standard (RFC 9989): policy, test mode, reports and alignment, with a safe path from none to reject.

    5 min read