DMARC SPF DKIM Check: How to Verify Any Sender's Setup

Joe WhyteNovember 19, 20267 min read
DMARC SPF DKIM Check: How to Verify Any Sender's Setup

A DMARC SPF DKIM check shows whether a domain is configured to prove that its email really comes from it. As a side effect, it often shows which tools the domain uses to send. You can run one on your own domain, a vendor, a partner or a competitor, using only DNS lookups and the headers of an email you have already received.

This guide walks through each lookup, shows how to read the results, and explains what you can and cannot conclude from them.

Why check another sender's authentication

Most people check authentication when their own mail lands in spam. There are other good reasons to look at someone else's setup:

  • Competitive research. Authentication records hint at which email service providers (ESPs) a company uses and whether it separates marketing mail from transactional mail.
  • Vendor and partner vetting. If a partner will send on your behalf or co-send campaigns, you want to know their domain is not wide open to spoofing.
  • Spotting lookalikes. A suspicious email claiming to be from a brand often fails checks that the real brand passes.
  • Benchmarking. Comparing your policy with peers shows whether you are ahead or behind on DMARC enforcement.

What SPF, DKIM and DMARC each verify

The three standards answer different questions, and DMARC depends on the other two.

ProtocolQuestion it answersWhere it lives in DNSWhat to look for
SPFIs this server allowed to send for the envelope (Return-Path) domain?TXT record on the domain, starting with v=spf1Authorized include: entries and the final qualifier (-all, ~all)
DKIMWas the message signed by the domain, and is it unaltered?TXT or CNAME at selector._domainkey.domainA valid public key (p=) for the selector in the email
DMARCDo SPF or DKIM pass and align with the visible From domain? What should receivers do if not?TXT at _dmarc.domainPolicy (p=), reporting addresses (rua=), subdomain policy (sp=)

Alignment is the part people miss. SPF can pass for a vendor's bounce domain, and DKIM can pass for the vendor's own signing domain, yet DMARC still fails because neither domain matches the From address. A proper DMARC SPF DKIM check looks at pass/fail and at which domains passed.

How to run a DMARC SPF DKIM check with DNS lookups

The commands below use dig, which is available on macOS and Linux. On Windows, nslookup -type=TXT works the same way, and many free web lookup tools run the same queries. The domain example.com is a placeholder.

Step 1: Find the domain that actually sends

Open a real email from the sender and note three domains: the From address, the Return-Path (the envelope sender), and the d= value in the DKIM-Signature header. Marketing email is frequently sent from a subdomain such as news.example.com or mail.example.com, which can have different records than the root domain. Check both the subdomain and the root.

Step 2: Check SPF

dig +short TXT example.com

Find the line starting with v=spf1. A typical record looks like this:

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

Read it from left to right:

  • include: entries list services allowed to send for the domain. These are your best clue to the tools in use.
  • The ending matters. -all means fail anything not listed, ~all means soft fail, and ?all or no ending means the record sets no real restriction.
  • More than one v=spf1 record on the same name is an error and can cause SPF to fail entirely.
  • SPF allows a maximum of 10 DNS lookups (includes, redirects and similar mechanisms). Records that exceed it produce a permanent error.

Also run the query against the Return-Path domain, since SPF is evaluated against that one, not the From address.

Step 3: Check DMARC

dig +short TXT _dmarc.example.com

A response might read:

"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; pct=100; sp=reject"
  • p= is the policy for the domain: none (monitor only), quarantine or reject.
  • sp= sets the policy for subdomains. If it is missing, subdomains inherit p=.
  • pct= is the share of failing mail the policy applies to. If absent, it is 100.
  • rua= is where aggregate reports go. An address at a different domain often points to a DMARC monitoring service.

If the lookup on a subdomain returns nothing, receivers fall back to the organizational domain's record. Query _dmarc. on the root before concluding there is no policy.

Step 4: Check DKIM

DKIM is the awkward one because the record name includes a selector you cannot guess reliably. Take it from the s= tag in the email's DKIM-Signature header:

DKIM-Signature: v=1; a=rsa-sha256; d=news.example.com; s=s1; ...

Then query:

dig +short TXT s1._domainkey.news.example.com

You should see a record containing v=DKIM1 and a long p= public key. Many ESPs publish DKIM as a CNAME pointing to their own infrastructure, so you may get a CNAME answer first and the key after it. An empty p= means the key has been revoked.

Read the Authentication-Results header

DNS shows what a domain has published. The receiving server's verdict on a specific message is in the Authentication-Results header. In Gmail, open the message menu and choose "Show original"; other clients have a "view source" or "view headers" option. A hypothetical example:

Authentication-Results: mx.example.net;
 dkim=pass header.i=@news.example.com header.s=s1;
 spf=pass smtp.mailfrom=bounce.news.example.com;
 dmarc=pass (p=QUARANTINE) header.from=example.com

Check these points:

  1. All three say pass. If DMARC passes, at least one of SPF or DKIM passed and aligned.
  2. Which domain passed. Compare header.i (DKIM) and smtp.mailfrom (SPF) with header.from. Here both are subdomains of the From domain, which counts as aligned under the default relaxed mode.
  3. Signs of a vendor domain. If DKIM passes for the ESP's domain rather than the sender's, DMARC may be relying on SPF alone, a weaker setup.

What the results can and cannot tell you

Treat the output as evidence, not proof.

What you can reasonably infer:

  • Policy maturity. A p=none record usually means the company is still monitoring. quarantine or reject suggests they have worked through their legitimate sending sources.
  • Tooling. SPF includes, Return-Path hostnames and DKIM CNAME targets often point to a specific ESP. Hypothetically, a DKIM selector that resolves via CNAME to an ESP's domain and a Return-Path on a branded bounce subdomain would suggest that ESP handles the marketing stream.
  • Stream separation. Different records for news. and the root domain suggest marketing and corporate mail are isolated, which is common practice for protecting reputation.

What you cannot infer:

  • The root SPF record lists every authorized service, including support desks, CRMs and billing tools. It does not tell you which one sends campaigns. The headers of an actual campaign email are more reliable.
  • Authentication does not equal deliverability. A fully aligned domain can still land in spam because of content or sender reputation.
  • You cannot see the sender's DMARC reports, so you do not know how much failing mail they receive.

Common mistakes when checking someone else's setup

  • Checking only the root domain. The mail may come from a subdomain with its own SPF and DKIM.
  • Looking up SPF on the From domain instead of the Return-Path domain. SPF is evaluated against the envelope sender.
  • Guessing DKIM selectors. A failed guess proves nothing. Use the selector from a real message.
  • Judging from one email. Different campaigns or automations can go out through different systems. Compare several messages.
  • Treating a stale lookup as current. Companies change ESPs and tighten policies. A record you checked last year may be wrong today.

Checking many senders without repeating the work

Manual lookups are fine for one or two domains. They get tedious when you follow a dozen competitors and want to notice when one changes ESPs or moves to a stricter policy. CompetitorInbox gives each competitor a unique tracking address, collects their emails in a searchable dashboard, and runs SPF, DKIM and DMARC checks and ESP detection on what arrives, next to send-time, frequency and subject line data. The free plan is enough to try it on a few competitors, and the knowledge base covers setup.

If you work by hand, keep a simple sheet: sender domain, Return-Path domain, DKIM selector and signing domain, SPF ending, DMARC policy, and the date checked. Rechecking quarterly is a reasonable cadence for most teams.

Frequently asked questions

Can I run a DMARC SPF DKIM check without an email from the sender?

SPF and DMARC, yes: they are published at predictable DNS names. DKIM needs a selector, which is normally only visible in a message header. You can try common selectors, but a missing record does not mean DKIM is absent.

Does DMARC p=none mean the sender is insecure?

Not exactly. It means receivers are told not to act on failures, so spoofed mail may still be delivered. Many organizations start there to collect reports before enforcing, but staying on it indefinitely leaves the domain more exposed.

What is the difference between -all and ~all in SPF?

-all tells receivers to treat unlisted senders as failures, while ~all marks them as soft fails. With DMARC enforcement in place, the practical gap narrows, but -all is the stricter statement.

Why does DMARC fail when SPF and DKIM both pass?

Because passing is not enough; the passing domain must align with the From domain. If a vendor signs with its own domain and uses its own bounce domain, both checks can pass while neither aligns, so DMARC fails.

Start tracking your competitors today

Get instant intelligence on competitor email campaigns — free trial, no credit card required.

Start Free Trial →