Blazalek.com

DKIM body hash mismatch after forwarding: a worked example

When an email relay forwards a message and appends a footer, an original DKIM pass turns into a body hash mismatch. Here is a walkthrough tracking one message across two hops to show how SPF, DKIM, DMARC, and ARC evaluate it, and what evidence you need before assigning blame.

By

On this page

A DKIM body hash mismatch after forwarding means the verifier’s calculated hash does not match the hash in the signature. On its own, it doesn’t establish whether the content was changed, let alone who changed it or where. Before blaming forwarding, compare the receiving hops, envelope identities, and the original DKIM signature across each boundary. This walkthrough separates hard facts from unverified assumptions and outlines the evidence you need next.

In production troubleshooting, preserve the full message source, identify the receiving MTA, and request verified upstream copies or server logs. An Authentication-Results header is only what an upstream server claims happened. A familiar hostname, or a header in the expected place, does not mean you can trust it. Confirm how the header reached the destination before trusting its verdict, as RFC 8601 explains under authentication result trust.

One message, two possible outcomes

The examples below use synthetic domains and IP addresses to trace the hops and protocol results. Every identity, body excerpt and reported outcome below is invented and reconstructed by hand; it isn’t a complete .eml and it isn’t a verifiable signature. No live DNS queries or cryptographic operations were executed.

Take a message leaving IP 192.0.2.46, passing through relay.example.net, which forwards it from 198.51.100.73 to mx.archive.example.org. The visible header remains From: Mira <mira@dispatch.example>. The envelope return path is explicit: MAIL FROM:<returns@dispatch.example>. The sender domain publishes a DMARC policy requiring strict alignment for both SPF and DKIM. No other aligned passing DKIM signature exists, and all DNS lookups succeed.

The original signature declares d=dispatch.example; s=notice; c=relaxed/relaxed; h=from:to:subject:date:message-id with no l= tag. Only these tags are shown; the raw cryptographic values are left out. The tags specify the signer, selector, and signed headers, while omitting l= covers the entire canonicalized body (DKIM signature tags). To see what each tag does, review the anatomy of a DKIM-Signature header in the deliverability guide.

Assume authenticated server logs verify the provenance of both MTAs and link their diagnostic records to this message. The intermediate gateway relay.example.net reports the assessment on arrival; mx.archive.example.org reports each of the two final results: one for the unchanged message, one for the version with a footer. The sender’s SPF record authorizes 192.0.2.46 and returns fail for 198.51.100.73.

Receiving point and versionPeer IPReported SPF for dispatch.exampleReported original DKIMReported DMARC
relay.example.net, incoming192.0.2.46passpasspass
mx.archive.example.org, unchanged content198.51.100.73failpasspass
mx.archive.example.org, footer appended198.51.100.73failfail, body hash mismatchfail

SPF evaluates the connecting client’s IP against the envelope identity. Here the peer IP changes from the initial host to the relay while MAIL FROM stays unchanged. Appending a footer has no bearing on SPF calculation. Forwarding does not universally cause an SPF failure; it fails here because the forwarding peer is not listed in the sender’s SPF record (SPF inputs). The general case appears in the guide section on the forwarding and mailing-list problem.

With unchanged content, the signing domain matches the From domain. DMARC requires only one aligned passing mechanism, so surviving DKIM provides a DMARC pass despite the SPF failure. In the footer version, neither SPF nor DKIM supplies an aligned passing identifier, causing DMARC to fail. Both conclusions follow the formal DMARC result calculation in RFC 9989.

Had the relay rewritten the envelope to returns@relay.example.net, SPF could produce a pass for that relay domain if authorized. RFC 7208 describes these forwarder envelope choices. Yet strict alignment with dispatch.example still fails because the domains differ (strict alignment).

The relay appends a footer after its incoming assessment, leaving signed headers untouched. The excerpts below show plain-text lines, each representing a CRLF-terminated line.

Before:

The archive appointment is Thursday at 14:10.
Bring the blue folder.

After:

The archive appointment is Thursday at 14:10.
Bring the blue folder.

Forwarded by the records desk.

The added nonempty line changes the relaxed canonicalized body. Unlike trailing blank lines or whitespace variations discarded by the algorithm, added text is preserved (relaxed body canonicalization). This example explicitly reports a body hash mismatch. A generic dkim=fail string does not identify this cause, because verifying the body hash and checking the header signature are separate steps (DKIM verification steps).

In production investigations, seeing an earlier pass followed by a downstream failure merely narrows the window when the result changed. A visible footer by itself never proves who added it. Compare the raw message source against the original signature using identical canonicalization; eyeballing rendered text in a mail client won’t show you byte-level differences (DKIM hashing inputs).

Reading ARC at the right processing point

For the footer version, assume one ARC set from relay.example.net with all three fields at index i=1. The AAR records the relay’s incoming pass results, the AMS covers the modified message it sends onward, and the AS publishes d=relay.example.net; cv=none. Downstream, the receiver reports an arc=pass assessment. Seeing these ARC tokens in the headers isn’t the same as cryptographically verifying them.

The AAR records the assessment made on arrival (AAR timing), and message modifications occur before sealing (sealing order). The AMS cryptographically signs the message content, while the AS binds the ARC fields rather than the body (AMS role, seal role).

A real validator checks that the sets are complete and numbered in order, that instance 1 has cv=none and every later instance cv=pass, and it verifies the newest AMS and every AS. Checking older AMS headers is optional. The cv values alone prove nothing without cryptographic checks (ARC validation).

A valid ARC chain does not establish that assertions were accurate, that the sealer is trustworthy, or that the message is safe (assertion accuracy, sealer trust, message safety). ARC records participating handlers; missing ARC headers never prove a direct route (ARC participation).

Say what the evidence supports, and no more

Summarize what happened plainly: under the assumptions of this example, the relay’s appended footer explains the original DKIM body-hash failure, SPF separately fails for the changed peer, and ARC preserves the relay’s earlier assertion. Without corroborating copies, treat attribution as a hypothesis and state the missing evidence clearly.

If provenance, the matching signature, raw before/after content or the failure reason is missing, stop short of a definitive attribution and request that specific evidence from the responsible administrator. Investigate the documented modification or envelope change. Never broaden SPF records or relax DMARC policies in an attempt to mask forwarding issues.

After an authorized correction, inspect fresh evidence across the same path. Preserved aligned DKIM can carry a DMARC pass despite SPF failure. A receiver may instead use ARC to make a local handling exception, as RFC 8617 describes under ARC policy use; that exception leaves dmarc=fail in place because authentication and message handling are separate things. Confirm delivery and placement independently; until the expected evidence turns up, recovery remains unproven (DMARC handling).

To review the concepts, read the ARC guide. For mailbox-specific forwarding issues, use the forwarded-mail incident.

Standards checked 14 September 2026: the current DMARC RFC 9989 and the Experimental ARC RFC 8617. Publication does not establish receiver adoption.

Frequently asked questions

Does forwarding always make SPF fail?

No. SPF evaluates the connecting client’s IP against the envelope identity, and forwarding doesn’t universally produce an SPF failure. In this example the peer changes while MAIL FROM stays the same.

Can DMARC still pass when SPF fails after forwarding?

Yes. DMARC requires only one aligned, authenticated mechanism to pass. An intact, aligned DKIM signature preserves a DMARC pass even when an intermediary IP fails SPF evaluation.

Added text alters the canonicalized body bytes that feed the cryptographic hash. Because standard relaxed canonicalization discards only trailing blank lines and whitespace variations, any new text changes the computed body hash.

Does a valid ARC chain prove the message is safe?

No. A valid chain doesn’t establish that the assertions are accurate, that the sealer is trustworthy or that the message is safe.

Does arc=pass change the DMARC result?

No. An ARC pass cannot alter the underlying cryptographic DMARC calculation. A receiver may use a valid ARC chain to grant a local handling exception, but the protocol verdict itself remains a failure.

Email deliverability consultant

Get a second opinion on your email setup

Tell me what your customers are seeing or what you’re planning to change. In 30 minutes, we’ll work out what your team can check first and whether a deliverability audit would help.

I led deliverability at GetResponse, designed a dedicated newsletter system for Easy.Tools and helped Youmoney migrate its automated emails in stages. Read the case studies

Book free call

Email deliverability audit

See what I check and read a sample report with recommendations for your team.