
How to Verify SPF, DKIM, and DMARC With a Test Inbox
Need a disposable inbox right now?
Spin up a temporary email address in seconds — no signup, no spam, no trace.
SPF, DKIM, and DMARC records look correct in the DNS panel and still fail in production. The gap between "the record exists" and "the record actually authenticates your mail" is where most deliverability incidents start — and most teams only find it after Gmail or Outlook starts folding their transactional email into spam. Here's how to check the real, delivered headers instead of trusting a DNS lookup tool that never touches your sending pipeline.
Why a DNS checker isn't enough
Third-party SPF/DKIM/DMARC lookup tools read your DNS records and tell you they're syntactically valid. That's a different question from whether your mail server is actually signing outbound mail, whether the signing key matches what's published, or whether your `Return-Path` domain lines up with what SPF expects. A syntactically perfect DMARC record does nothing if your sending service silently fell back to an unsigned relay last Tuesday.
The only way to know your authentication setup works is to send a real message through your real pipeline and read the headers a receiving mail server actually attached. That means you need a real inbox on the receiving end — not a validator, a mailbox.
What each header is actually telling you
Three headers matter, and they answer three different questions:
Received-SPF — did the message come from an IP address your domain's SPF record authorizes to send on its behalf? A `pass` here means the sending IP matched; `softfail` or `fail` means it didn't, even if your DNS record looks fine.
DKIM-Signature plus Authentication-Results — was the message cryptographically signed with a private key that matches the public key published at your `selector._domainkey` DNS entry? This is the one that silently breaks when a sending service rotates keys and your DNS didn't get updated, or when someone forwards a message and strips the signature.
DMARC result — did SPF or DKIM pass and align with the domain in the visible `From` address? Alignment is the part people miss: SPF can pass against a completely different domain than the one your recipient sees, and DMARC will still fail.
All three show up in the raw headers of the delivered message, under `Authentication-Results`. Most email clients hide this by default. You need raw access.
Set up a receiving inbox you control
Generate a throwaway address at cybertemp.xyz — something like [email protected] — and send a real transactional message to it through the exact pipeline you're validating: your signup confirmation, your password reset, your marketing platform's test send. Not a contact form. The actual pipeline, because that's where the SPF/DKIM configuration you care about actually gets exercised.
A disposable inbox is the right tool here for a specific reason: you want a mailbox with no history, no existing filter rules, and no risk of polluting your own segment data or triggering your ESP's engagement scoring. Point every authentication test at a fresh address, and rotate to a new one for each pipeline you check — one for signup mail, one for billing receipts, one for the marketing platform, so a bad result in one doesn't get confused with another.
Pull the raw headers and read the result
If you're scripting this rather than checking by hand, CyberTemp's API returns full message data including headers for anything that lands in an inbox tied to your key:
import httpx, time
API_KEY = "tk_..."
HEADERS = {"X-API-Key": API_KEY}
BASE = "https://api.cybertemp.xyz"
ADDRESS = "[email protected]"
def wait_for_message(timeout=120, interval=3):
deadline = time.time() + timeout
while time.time() < deadline:
r = httpx.get(f"{BASE}/getMail", headers=HEADERS, params={"email": ADDRESS})
r.raise_for_status()
messages = r.json()
if messages:
return messages[0]
time.sleep(interval)
raise TimeoutError("no message arrived")
msg = wait_for_message()
raw_headers = msg.get("headers", "")
for line in raw_headers.splitlines():
if line.lower().startswith(("received-spf", "authentication-results", "dkim-signature")):
print(line)
Trigger your pipeline's send, poll the inbox until the message lands, then grep the headers for the three lines that matter. You're looking for `spf=pass`, `dkim=pass`, and `dmarc=pass` in the `Authentication-Results` line, plus a matching domain in each. A `dkim=neutral` or a domain mismatch in the alignment check tells you exactly which part of the chain broke — DNS record, signing key, or the sending domain itself.
Where this actually catches problems
This check earns its keep at three specific moments, not as a one-time setup verification:
After switching or adding an ESP. Adding a second sending service (a transactional provider alongside a marketing platform) is the single most common way SPF breaks — the new provider's IPs aren't in your record yet, or you exceed SPF's 10-lookup limit and the whole record starts failing silently for everyone.
After a DKIM key rotation. Providers rotate signing keys on their own schedule. If the DNS TXT record update lags the key rotation by even a few hours, every message signed in that window fails DKIM.
Before a domain-wide DMARC policy change. Moving from `p=none` to `p=quarantine` or `p=reject` without first confirming every sending source passes alignment is how legitimate transactional mail starts getting rejected outright. Test every pipeline against a real inbox before tightening the policy.
Run the same check after any DNS change, any new sending integration, or on a schedule if you're managing multiple sending domains. Catching a broken DKIM signature in a five-minute test beats finding out because support tickets started piling up about missing password reset emails.
Building this into CI
The script above is close to CI-ready as is: generate a fresh address per test run, trigger the send from whatever service or environment you're validating, poll for the message, and assert on the `Authentication-Results` header instead of just asserting the message arrived. A signup test that only checks "did an email show up" misses a DKIM failure completely, since most receiving servers still deliver a failed-authentication message to the inbox — they just also flag it, and eventually start routing similar mail to spam without telling you why.
Add the header assertion once and it runs on every deploy that touches your mail configuration, catching regressions the same week they're introduced instead of the week deliverability drops and someone has to reconstruct what changed.
For one-off checks, generating an inbox at cybertemp.xyz and reading the delivered headers by hand takes less time than running a DNS lookup and hoping it's telling the whole story. If you're wiring this into CI or checking multiple sending domains on a schedule, the paid tiers raise the concurrent-inbox and request limits past what one-off browser checks need — CORE and ELITE are built for exactly this kind of recurring, scripted verification. Sign up if that's the workflow you're running.