emailverifier.dev
Posts

How to Read Authentication-Results Headers Without Trusting a Forged Pass

| 6 min read | Usama Ejaz
Stacked authentication header records meet a receiver trust boundary, where a forged result is rejected and trusted SPF, DKIM, and DMARC evidence continues.

An Authentication-Results header is trustworthy only when you know which receiver added it and that the header crossed into your system through a controlled trust boundary. A line that says spf=pass, dkim=pass, or dmarc=pass is not self-authenticating.

This matters when you inspect a suspicious message or turn mail headers into an automated signal. The sender can add its own header before transmission. Your receiving mail system has to remove conflicting claims at the edge and add a result that downstream filters can attribute to a known authentication service. I use a four-coordinate check: who wrote the result, where it entered the trusted path, which mechanism ran, and which identity that mechanism evaluated. The word pass comes last.

Start with the boundary, not the pass

Here is a deliberately hypothetical header trace. The domains use the reserved .example namespace.

Authentication-Results: mx.inbox.example;
  spf=pass smtp.mailfrom=bounce.vendor.example;
  dkim=pass header.d=vendor.example header.s=mail2026;
  dmarc=fail header.from=billing.example.com
Received: from outbound.vendor.example (outbound.vendor.example [192.0.2.40])
  by mx.inbox.example with ESMTPS id A17F2
  for <reader@inbox.example>; Mon, 2 Nov 2026 08:41:16 +0500
Authentication-Results: mx.inbox.example;
  spf=pass smtp.mailfrom=billing.example.com;
  dkim=pass header.d=billing.example.com;
  dmarc=pass header.from=billing.example.com
From: Billing <receipts@billing.example.com>
To: Reader <reader@inbox.example>
Subject: Hypothetical invoice

The upper result sits above the Received field added by mx.inbox.example. That placement is consistent with the receiving MTA adding both fields. The lower result arrived with the message body and claims the same authentication service identifier. It is sender-controlled input.

RFC 8601 defines Authentication-Results for use inside a trust environment. It does not add an integrity check to the field itself. At the boundary, a conforming receiver must delete a header that claims its own authserv-id but did not come from a trusted internal MTA. In this example, the lower header should not survive normal ingress processing.

If it does survive, header position is a useful warning, not cryptographic proof. An application reading a downloaded .eml file cannot repair a broken receiver boundary after the fact.

Read the authserv-id as provenance

The first token after the colon is the authentication service identifier:

Authentication-Results: mx.inbox.example; ...
                        ^^^^^^^^^^^^^^^^ authserv-id

authserv-id names the administrative mail system or authentication engine that produced the result. It is not necessarily the same hostname shown in the nearest Received line, and treating it as a DNS name you can independently verify misses the point. Your mail operator defines which identifiers its downstream consumers may trust.

For an internal filter, I would start with an empty allowlist and add only identifiers documented by the receiving service. I would also bind each identifier to an expected ingress path or trusted upstream MTA. A sender can copy a permitted string, so string matching without a controlled boundary is not enough.

The existing guide to reading Received headers explains how to mark that route boundary. Here the route is supporting evidence for the result's provenance, not a substitute for it.

Then trace each method to its identity

Once the result is inside your trust boundary, read each method and its property together.

  1. SPF: spf=pass smtp.mailfrom=bounce.vendor.example says the receiver evaluated the connecting IP against the SMTP envelope identity and got a pass. If the reverse path is empty, a receiver can report the HELO identity instead. SPF does not directly test the visible From: address.
  2. DKIM: dkim=pass header.d=vendor.example header.s=mail2026 says a signature validated for the signing domain in d= using the selector in s=. A message can have multiple DKIM signatures, so more than one DKIM result is normal.
  3. DMARC: dmarc=fail header.from=billing.example.com reports the visible author domain and the alignment result. DMARC passes when at least one passing SPF or DKIM identifier aligns with that author domain under the published policy's alignment mode.

That makes the upper trace internally consistent. SPF passed for vendor.example. DKIM passed for vendor.example. Neither identity aligns with billing.example.com, so DMARC failed. The SPF, DKIM, and DMARC walkthrough follows that alignment calculation in detail.

Authentication results are scoped facts, not a score. dkim=pass does not cancel dmarc=fail, and a DMARC pass does not certify the message content as harmless.

Why the topmost result is not always the answer

The strongest fair objection is simple: if receiving systems prepend headers, why not always trust the first Authentication-Results field?

Because a real delivery path can contain an edge MTA, a filtering service, an internal relay, and a final mailbox server. Each can add a result. A trusted external service may also use a different authserv-id. Header order tells you sequence, but it does not tell your application which administrative domains it is allowed to trust.

A safe consumer policy needs both pieces:

function mayUseAuthenticationResult(result, context) {
  const expectedIngress = context.trustedIngressByAuthservId.get(
    result.authservId
  );

  return expectedIngress !== undefined
    && expectedIngress === result.receivedFromMta
    && result.insideLocalTrustBoundary === true;
}

This is policy logic, not a complete RFC 8601 parser. The important part is the default: unknown identifier, unexpected MTA, or unknown boundary means “do not use for an automated trust decision.” It does not mean the message is malicious.

Do not split a folded header on semicolons and call the parser finished. RFC 8601 has formal syntax, comments, optional reason data, registered methods, and extension properties. Use a mail parser that preserves repeated fields and folding, then map the parsed result into your local trust policy.

ARC results are upstream testimony, not your local verdict

A forwarded message may also carry ARC-Authentication-Results. ARC packages an earlier handler's authentication assessment into a verifiable chain. That can help a later receiver understand why SPF or DKIM changed during forwarding.

It does not turn every upstream pass into a local pass. RFC 8617 describes ARC evidence as an assertion by a verifiable party. The chain can validate while your policy still decides that the sealer is unknown or unsuitable for an override. Keep these states separate:

  • the local receiver's Authentication-Results;
  • whether the ARC chain validates;
  • whether local policy trusts a specific ARC sealer;
  • the final spam, phishing, or delivery decision.

The forwarding guide shows where SPF, SRS, DKIM, and ARC act along that path.

Build one fixture that should fail closed

Before an application filters on these headers, give it the hypothetical trace above. The test should select the receiver-generated failure, reject the lower forged pass, and retain the three evaluated identities separately.

Then change one coordinate at a time:

  • use an unknown authserv-id;
  • keep the allowed identifier but move it outside the trusted ingress path;
  • add a second valid DKIM signature;
  • remove smtp.mailfrom and report smtp.helo for an empty reverse path;
  • add a valid ARC chain from a sealer that local policy does not trust.

Every variation should produce an explicit evidence state. “Untrusted result” and “authentication failed” are different outcomes.

The same boundary applies outside sender authentication. A verification result concerns a recipient address and available mail evidence; it does not prove who wrote a message. A sender-authentication pass concerns domains and message transport; it does not prove inbox ownership or guaranteed delivery. Keeping those claims separate is less convenient than one green badge, but it is the only model that survives a forged header.

Continue reading