[ Forwarding & ARC ]

Security gateways that modify signed mail

Locate gateway transformations and compare raw signature inputs before attributing DKIM failure or proposing a change to security processing.

By the EmailAuth research team · 6 min read

[ Key points ]

  • Gateway presence alone does not establish that it caused a signature failure.
  • Compare selected header instances and canonicalized body coverage.
  • A later failed signature is not proof that it verified earlier.
  • Trusted ingress results and downstream checks can describe different message versions.
On this page

Find the modification before blaming the gateway

A security gateway can legitimately inspect or transform mail while complicating downstream DKIM verification. URL rewriting, attachment replacement and body warnings are possible examples, but the gateway's presence alone proves nothing about a failed signature. Establish which representation entered the gateway, which left it and where authentication was evaluated.

No gateway account or message stream was accessed for this article. Original evidence gate: Original and modified raw messages, signer placement and a before-and-after verification test. These items remain uncollected. The worked case is fictional. Any operational change must preserve the intended security controls and follow the owner's approved process.

Inventory the exact processing sequence

Draw a sequence from message acceptance through authentication, threat inspection, content modification, signing and onward delivery. A service may combine these functions, and several gateways may appear on one route. Record the version and enabled behavior only when supported by the actual configuration. Do not assume that a product always verifies before rewriting, or that its outgoing connector always signs.

RFC 7960 describes boundary filters that remove harmful content, mark suspected spam or alter URLs. It also explains why evaluating authentication after a filter's modifications can produce different results. These are architectural possibilities, not a verdict about a specific tenant. A message trace and preserved copies are necessary to connect the documented mechanism to an incident. RFC 7960 section 3.2.5

Determine what the failed signature covered

For each DKIM-Signature, preserve the signing domain d=, selector s=, canonicalization c=, header list h= and any l= body-length value. The body hash is computed over the selected canonicalized body input; the signature also covers specified header instances. “The gateway changed a header” is incomplete without knowing whether that instance was selected and whether canonicalization preserved the difference. RFC 6376 sections 3.4–3.5 and 5.4

Relaxed canonicalization tolerates particular whitespace and header-formatting changes. It does not treat arbitrary HTML edits, URL substitutions or attachment changes as equivalent content. Conversely, an added field outside the selected coverage need not invalidate an existing signature. Header duplication and oversigning can complicate that assessment, so compare the selected instances rather than only a list of unique field names. RFC 6376 sections 3.4 and 5.4

Compare raw messages without altering the evidence

Use unchanged raw-message files from approved capture points. Rendered screenshots can hide MIME boundaries, encoding changes and folded headers. Re-saving a message through an editor can itself change line endings or serialization, so keep originals and perform analysis on copies. Record capture time, route position and file hashes to connect each sample to the claimed step.

A later failed signature does not establish that the signature was valid before the gateway. RFC 6376 warns that a verifier cannot generally infer prior validity from an invalid signature. The proposed test therefore includes verification of the preserved input as well as the output, with the relevant key and verifier context retained. Otherwise, a preexisting signing error could be misattributed to the gateway. RFC 6376 section 4.2

Work through a fictional URL replacement

Suppose a fictional author-domain signature verifies on a raw input message and covers its entire body. A gateway then replaces a URL in an HTML MIME part with a threat-protection URL. The corresponding output contains different canonicalized body bytes, and a verification attempt reports body-hash mismatch. These assumptions form an illustrative test outcome; no such test ran here.

That comparison supports the narrow conclusion that the observed replacement affected this signature's covered body. It does not imply that every gateway action breaks every signature or that protection should be turned off. An additional signature from gateway.example can authenticate that domain's handling of the modified message, but it does not reconstruct the original author signature or automatically align with an unrelated author domain. RFC 6376 sections 3.4 and 5.1 RFC 9989 section 5.3

Keep ingress results and downstream verification distinct

An organization may rely on authentication performed at its trusted ingress before internal safety transformations. Preserve the evaluator identity and trust boundary behind that result. A downstream receiver evaluating modified bytes may correctly obtain a different DKIM result. Copying an Authentication-Results field into a message does not by itself make that field trustworthy outside the boundary that produced it. RFC 8601 sections 5 and 7

ARC can carry prior assessments through participating handlers, but chain validation and confidence in those handlers remain different questions. RFC 8617 does not make ARC a mechanism for restoring an old DKIM signature. Its published category is Experimental; the reviewed proposal to move ARC to Historic remains an active draft. Do not promise that enabling ARC makes every downstream receiver accept gateway-modified mail. RFC 8617 sections 5.2 and 9.3 IETF proposal status

Place legitimate signing after the intended changes

For outbound mail authored under a domain the organization controls, a supported design may place the authorized aligned signer after final legitimate content changes. Verify that later steps do not modify covered content again. A gateway cannot legitimately sign as an external author's domain merely because it relays that author's message; the relevant domain authorization and key custody must exist. RFC 6376 section 5.1

The review packet should state which control remains active, which processing order is proposed, and how before-and-after verification will be repeated. Do not use reduced body coverage or blanket authentication bypasses merely to produce a green indicator. A successful authorized test would support only its sampled routes and message forms. Original raw pairs, actual signer placement and a controlled verification result are still absent from this draft.

[ Takeaway ]

Prove both the original verification result and the covered change. Keep threat protection active while reviewing supported processing and signing order.

[ By role ]

What this means for you

Choose your role for practical next steps.

Security gateway owner

Retain the protective purpose

Authentication troubleshooting should explain how protection and modification interact rather than remove the control without evidence.

Next steps

  1. List enabled transformations and their order when verified.
  2. Preserve the original and output samples through approved capture paths.
  3. Review any processing-order proposal with the mail-signing owner.

DKIM verifier maintainer

Identify the selected input

The verifier result should be tied to the signature, public-key context and exact representation being checked.

Next steps

  1. Record each signature's coverage and algorithm parameters.
  2. Establish input validity before attributing later breakage.
  3. Differentiate body-hash mismatch from other verification failures.

Incident coordinator

Bound the repair and its claim

A narrowly supported cause is more useful than a product-wide claim based on one message.

Next steps

  1. Link the observed transformation to the affected signature.
  2. Avoid broad authentication bypasses or reduced coverage as a cosmetic fix.
  3. Require post-change evidence for the routes and message forms actually in scope.

[ FAQs ]

Frequently asked questions

Does every gateway edit break all DKIM signatures?

No. Effects depend on the content selected by each signature and its canonicalization. A tolerated formatting change or an added field outside selected coverage can differ from replacing a covered URL or attachment. Assess signatures independently.

Which DKIM tags belong in a gateway investigation?

Preserve d=, s=, c=, h= and any l= value, alongside the full raw message and verifier result. These identify the signing domain, key selector, canonicalization and relevant coverage; they do not substitute for actually verifying the input.

Can a failed downstream signature prove the gateway broke it?

No. The signature may already have been invalid before processing. A credible attribution needs a preserved input that verifies and an output comparison showing the relevant covered change, with key and verifier context retained.

Why is a screenshot inadequate for comparing gateway changes?

A rendered view can hide MIME structure, content-transfer encoding, line endings and selected header instances. Keep unchanged raw captures at known boundaries and analyze working copies so that the investigation does not alter its own evidence.

Does adding a gateway-domain signature repair the author signature?

No. It creates a separate assertion by the gateway's signing domain. The original signature remains independently evaluable, and DMARC alignment depends on the relation between a valid signing domain and the message's author domain.

Can a trusted ingress pass coexist with an internal verification failure?

Yes, if the two checks assessed different representations before and after a transformation. Record which system produced the original result and why it is trusted. Do not extend that trust automatically to arbitrary copied result headers.

Should ARC be described as a universal gateway fix?

No. ARC supplies assertions that receivers can evaluate under their own trust decisions; it does not restore an original DKIM signature. The reviewed reclassification proposal remains an active Internet-Draft, so status and support should be rechecked before deployment advice.

Which evidence remains missing before a gateway repair can be accepted?

Original and modified raw messages, signer placement and a before-and-after verification test remain uncollected. The fictional URL-replacement example demonstrates the reasoning only. No security setting, gateway account or live message was changed.

[ Sources ]

Sources

  1. IETF Datatracker: Reclassifying ARC as Historic
  2. RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
  3. RFC 7960: Interoperability Issues between DMARC and Indirect Email Flows
  4. RFC 8601: Message Header Field for Indicating Message Authentication Status
  5. RFC 8617: The Authenticated Received Chain (ARC) Protocol
  6. RFC 9989: Domain-based Message Authentication, Reporting, and Conformance (DMARC)

[ Glossary ]

Glossary

Boundary filter
A message-processing component that examines mail against organizational safety policy and may transform content.
Signing boundary
The point at which an authorized signer fixes the selected message representation into a DKIM signature.
Canonicalized input
The header or body representation produced by the signature's specified normalization rules for cryptographic processing.
Selected header instance
A particular occurrence of a header field included through DKIM header selection, including duplicate-field and oversigning considerations.
Gateway assertion
An authentication or signing claim made by a gateway, whose identity and trust scope must be distinguished from the original author's assertion.

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