[ Forwarding & ARC ]

DKIM and forwarding: identify message modifications

Locate the transformation that invalidates DKIM, separating canonicalization, body coverage and signer placement.

By the EmailAuth research team · 4 min read

[ Key points ]

  • Compare raw signed bytes and signature parameters before blaming a transformation.
  • Relaxed canonicalization does not permit arbitrary content edits.
  • Prefer correct signing order over weakened signature coverage.
On this page

A message that verifies before forwarding and fails afterward calls for a comparison of the signed bytes and signature context. Do not assume that every added header breaks DKIM or that relaxed canonicalization permits arbitrary editing. The signature identifies the protected header fields, canonicalization and body hash. Reconstruct those choices before deciding which transformation matters.

Preserve comparable artifacts

References: RFC 6376 §3.5, RFC 6376 §3.7.

Retain the raw original and final message without opening and resaving through a client that may normalize line endings or re-encode MIME. Record the signer domain, selector, algorithm, signed-header list, canonicalization and any body-length limit. Keep the verifier output and DNS key observation with the timestamp. A visually identical message can have different encoded bytes.

Find the signer in the processing chain. A footer added before the final signature is part of the signed content; the same footer appended after signing may invalidate the body hash. Inventory list software, gateways, disclaimer engines, antivirus rewriters and archival paths as possible transformation points. Only evidence from the actual route can identify which one acted.

Understand what canonicalization allows

References: RFC 6376 §3.4, RFC 6376 §5.4, RFC 6376 §8.2.

RFC 6376, section 3.4, defines simple and relaxed canonicalization. Relaxed body processing normalizes specified whitespace and trailing empty lines. It does not make an added paragraph or changed amount disappear. Header canonicalization has its own rules and should not be replaced by body rules.

A Subject prefix affects a signature that covers the relevant Subject field. Merely adding an unrelated unsigned header is a different case. Duplicate signed fields and header selection require the verifier's rules, not a casual visual diff. Where a signature includes a body-length limit, understand the uncovered-content risk; do not introduce that option as a convenient way to make arbitrary footers safe.

Run a real body hash comparison

References: RFC 6376 §3.4.4.

The local fixture applies relaxed body canonicalization to three synthetic bodies. It computes SHA-256 and base64 for the original, a whitespace-only variation and a footer-appended version. The original and whitespace cases match; the footer case differs. The generated original and modified .eml files preserve the illustrative body bytes for inspection.

This is an observed hash transformation, not a DKIM signature verification. No private signing key, DNS key lookup, header signature or trusted receiving service is involved. The expected effect on a full signature remains conditional on the actual signature covering the changed bytes. The retained evidence below records historical local signing and before-and-after verification; production-route evidence remains uncollected.

Fix ordering before weakening coverage

References: RFC 9989 §4.4.1, RFC 9989 §5.3.5.

Where possible, apply required transformations before the legitimate domain's final signing step. For an intermediary that cannot sign for the original author, preserving the original signed content may retain an aligned pass. A replacement signature from the intermediary authenticates its own domain and is not automatically aligned with the original From address. RFC 9989 supplies that separate comparison.

Retest the same transformation with the full verifier and representative MIME content. Include attachments, multipart alternatives and non-ASCII messages if they are in scope. Preserve negative controls so a test cannot succeed simply because the signature disappeared. Closure should say which transformation changed, which signature now validates and whether that signature provides aligned authentication at the final receiver.

Retained laboratory evidence

References: RFC 6376 §6.

In the 7 November 2026 capture, a temporary 2048-bit RSA key signed the original bytes with dkimpy before forwarding. The key's public DNS record is retained and the private key is deleted after execution. dkimpy verifies the original and preserved-forwarding messages and rejects the footer-appended body. The list case applies attribution and footer changes before creating its list-domain signature, which verifies. These are genuine complete DKIM signature tests, not supplied boolean results. The relaxed-body helper also now handles empty input as zero octets.

The retained runner and 7 November 2026 capture were inspected; no network experiment was rerun for this review. The original experiment used loopback only and sent no Internet mail. Its receiver creates Authentication-Results from its own checks, giving those fields known laboratory provenance. Authentication outcome and disposition remain separate: all six SMTP samples receive 250 under an explicit capture policy, including failing samples. The trust boundary is this controlled laboratory, not a production mailbox provider. The DNS adapter supplies retained fixture answers rather than querying public DNS, and the DMARC evaluator uses strict domain equality only. Full organizational-domain discovery, production policy parsing and live deployment outcomes remain untested.

[ Takeaway ]

Prefer correct signing order over weakened signature coverage.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Compare signed data

Visual similarity is insufficient.

Next steps

  1. Preserve raw bytes.
  2. Inspect h= and c=.
  3. Run full verification after repair.

CISO / SecOps

Avoid weakened coverage

Authentication should protect meaningful content.

Next steps

  1. Review body-length exceptions.
  2. Retain negative tests.
  3. Verify aligned signer authority.

Founder / Non-technical

Fund the correct repair

Processing order often crosses team boundaries.

Next steps

  1. Identify transformation owners.
  2. Prioritize critical message types.
  3. Require a comparable retest.

[ FAQs ]

Frequently asked questions

Does every added header break DKIM?

No. The protected fields and header selection rules matter.

RFC 6376 §5.4

Can relaxed mode tolerate a footer?

Not generally. It normalizes specified formatting, not arbitrary new content.

RFC 6376 §3.4.4

Why preserve raw bytes?

Client reserialization can alter the very data being investigated.

RFC 6376 §3.4

Does signer placement matter?

Yes. A change before signing differs from the same change afterward.

RFC 6376 §3.7

Does the fixture verify DKIM?

The original body-hash fixture does not verify DKIM. The retained 7 November 2026 SMTP lab performed real dkimpy signature verification; this review rechecks the retained signatures offline without repeating SMTP delivery.

Should l= be used as a quick fix?

Not reflexively. Uncovered appended content introduces security considerations.

RFC 6376 §8.2

Does a forwarder signature restore author alignment?

Only if its authenticated domain actually aligns; a different forwarder domain does not.

RFC 9989 §4.4.1

What is a useful negative control?

A known signed-content change that the full verifier correctly rejects.

[ Sources ]

Sources

  1. RFC 6376

    Sections §3.4 · §3.4.4 · §3.5 · §3.7 · §5.4 · §6 · §8.2

  2. RFC 9989

    Sections §4.4.1 · §5.3.5

[ Glossary ]

Glossary

Canonicalization
Specified normalization applied before signing or verifying.
Body hash
Digest of the canonicalized covered message body.
Signer placement
The point in message processing where a signature is created.

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base