CertaDNS
Skip to lesson

Why Email Spoofing Works · lesson 3 of 3

Reading the Authentication-Results header

After this lesson you can

Read an Authentication-Results header and say what the receiver checked, what it concluded, and whose word you are taking.

Assumes you have read Why spoofing works at all.

When a receiving server finishes its checks, it records what it found in a header. Being able to read that header is the single most useful diagnostic skill in this course, because it turns "the message went to spam" into a specific, nameable failure.

Authentication-Results: mx.recipient.org;
    spf=pass (recipient.org: domain of bounces@example.com
        designates 203.0.113.25 as permitted sender)
        smtp.mailfrom=bounces@example.com;
    dkim=pass header.i=@example.com header.s=sel1;
    dmarc=fail (p=REJECT sp=NONE dis=NONE) header.from=example.com
Constructed to show every field in one place. Real headers vary in layout between providers but carry the same content.

Reading it left to right:

  • mx.recipient.org — the authserv-id: which system performed these checks. This matters more than it looks. See below.
  • spf=pass ... smtp.mailfrom=bounces@example.com — SPF passed, and crucially it tells you which identity it passed for. That is the envelope sender.
  • dkim=pass header.i=@example.com header.s=sel1 — a valid signature from the domain example.com using selector sel1.
  • dmarc=fail ... header.from=example.com — despite both of the above passing, DMARC failed. The next several modules explain how that is possible.

This header is only trustworthy inside the system that wrote it

Anyone can add an Authentication-Results header to a message before sending it. A receiving system is expected to strip headers bearing its own authserv-id on arrival, precisely to prevent an attacker forging a pass — RFC 8601 §5 is explicit about this. So the authserv-id is not a decoration: it is how you know whether the header was written by the system you trust or by whoever sent the message.

The results that matter

ResultMeansUsually indicates
passThe check succeeded.
failThe check ran and the message did not satisfy it.A real configuration problem, or a forgery
softfailSPF only: not authorised, but the domain is not asking for rejection.A ~all record and a sender you forgot
neutralThe domain explicitly declined to assert anything.A ?all record, which asserts nothing at all
noneThere was nothing to check — no record published.The control is simply not deployed
temperrorA transient failure, usually DNS.Retry-able. Not a configuration error
permerrorThe record is unusable.Malformed syntax, two SPF records, or the lookup limit exceeded

The distinction worth internalising now is none versus fail. A result of none means the domain published nothing, so the receiver learned nothing. A result of fail means the domain published something and this message contradicted it. The first is an absence of evidence; the second is evidence.

Getting at it

Every major client can show full headers, though all of them hide the option somewhere different. In Gmail it is "Show original"; in Outlook, "View message source"; in Apple Mail, View → Message → All Headers. Send yourself a message from an outside account and read the result — you will get more from the rest of this course if you have seen one real header before the protocols are explained.

Knowledge check

A message arrives with spf=none and dkim=pass. What have you learned about the sending domain?

Last reviewed