[ DKIM ]

Place DKIM correctly after an outbound security or signature service

Design and test a final signing boundary after authorized outbound content processing.

By the EmailAuth research team

[ Key points ]

  • Map content changes before choosing the final signer.
  • Inspect each passing identity and its DMARC alignment.
  • Preserve required inspection and test actual business routes.
On this page

An outbound security gateway or corporate signature service can inspect and modify mail after the application has already signed it. A stable DKIM design places the final authorized signing step after required content changes and verifies the whole route. The important question is which component emits the final message, not which product first displays an enabled DKIM setting.

Draw the actual processing order

Map submission, content inspection, disclaimer or signature insertion, MIME serialization, DKIM signing and external delivery. Include alternate routes used by applications and emergency failover. Do not assume employee mailbox mail and application mail take the same path.

For each component, record whether it changes the body, selected headers, envelope identity or only routing metadata. A corporate email signature block is body content; it is unrelated to the cryptographic DKIM-Signature header despite the shared word “signature.” URL rewriting, attachment handling and HTML rebuilding can also affect covered content.

RFC 6376 §5.3 and RFC 6376 §5.5 require the signer to operate on the intended transmitted representation and modifying re-signers to make changes before re-signing. The design should make that sequencing visible and testable.

Choose the domain and key owner

A gateway may add a valid signature under its own domain. That does not automatically satisfy DKIM alignment for your Author Domain under RFC 9989 §4.4.1. If the required design uses custom-domain signing, verify the product's documented capability, generated DNS values and custody of the private key. Do not invent selector names or copy another tenant's configuration.

Decide who can change signing configuration, rotate keys and alter the final content pipeline. Protect private keys from export into incident notes or test bundles. Publishing a public key is only one part of setup; real outgoing messages must carry a matching signature created after final processing.

Test the pipeline with two controls

Illustrative design A signs first and then appends a corporate contact block. The original full-body signature can fail. Design B inserts the block, completes MIME serialization and then signs with an authorized aligned domain. The intended signature can survive if later processing leaves covered data intact. These are test expectations, not a claim about a named vendor.

Send plain text, HTML, non-ASCII content and an attachment through the intended route. Include application-generated messages and a supported failover route where relevant. Capture the message after the last processor and at a trusted external receiver. Associate each result with d and s rather than accepting an undifferentiated pass label.

Keep security controls in the design

Moving signing later should not silently move inspection outside the protected workflow or bypass required scanning. If the final signer cannot run after a mandatory rewriting service, evaluate supported integrations or a different authorized signing boundary. Avoid using l to exclude later content merely to produce a pass count; RFC 6376 §8.2 explains unsigned-content risks.

A downstream new signature can coexist with an earlier failed one. Confirm which signature provides the intended alignment and how the receiving service reports it. Do not delete evidence of the earlier failure from test records.

Operate the boundary as a change-controlled service

Retain the route diagram, responsible owners, key-retention plan and format test suite. Re-test after gateway upgrades, branding-template changes, routing changes and failover activation. Success requires the intended content, a valid aligned authentication path and correct delivery, with human approval still separate from the technical result.

Record the next decision

For a hypothetical message, record processor order, expected content changes, each d/s pair, receiver verdict and alignment. If the gateway signs only as an unrelated vendor domain, mark aligned DKIM unresolved even if its signature passes. If moving the signer would bypass inspection, stop that design change and seek a supported integration. These are planning criteria, not executed route tests.

[ Takeaway ]

Map content changes before choosing the final signer. Inspect each passing identity and its DMARC alignment. Preserve required inspection and test actual business routes.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Sign the emitted representation

Place final signing after content processing and confirm real receiver results.

Next steps

  1. Verify d and s.
  2. Retain a format regression suite.

CISO / SecOps

Control authority at the last modifier

The final signer and content processor define an important trust boundary.

Next steps

  1. Review key custody.
  2. Preserve mandatory inspection.

Founder / Non-technical

Own the full business route

A DKIM toggle does not prove every application follows the correct pipeline.

Next steps

  1. Name application-mail owners.
  2. Approve failover tests.

[ FAQs ]

Frequently asked questions

Is a corporate signature block a DKIM signature?

No. The corporate block is message content; DKIM-Signature is a cryptographic authentication header.

RFC 6376 §3.5

Where should final signing occur?

After required content changes and final serialization, before transmission that preserves the covered representation.

RFC 6376 §5.3 RFC 6376 §5.5

Does a vendor-domain signature satisfy DMARC?

Only if its signing domain aligns with the final visible From domain; an unrelated vendor domain does not automatically align.

RFC 9989 §4.4.1

Can we reuse another tenant’s selector values?

No. Use the service’s documented, tenant-specific generated values and verify real outgoing signatures.

Should scanning be bypassed to preserve DKIM?

Do not make that a silent repair. Choose a supported design that preserves required inspection and final signing.

Why test application mail separately?

It may bypass the employee-mail route or use a different gateway, identity or signer.

Can old and new signatures coexist?

Yes. Evaluate each independently and identify the passing aligned path rather than assuming the old signature was repaired.

RFC 6376 §4.2 RFC 9989 §4.4.1

What changes trigger a retest?

Gateway upgrades, content templates, serialization, routing, keys and failover changes can all affect the final boundary.

[ Sources ]

Sources

  1. RFC 6376

    Sections §1 · §3.1 · §3.5 · §4.2 · §5.3 · §5.5 · §8.2 · §8.3

  2. RFC 9989

    Sections §4.4 · §4.4.1

  3. RFC 8601

    Sections §1.2 · §7.1

[ Glossary ]

Glossary

DKIM
A domain-associated signature over selected message content verified using public-key data.

RFC 6376 §1

Selector
The s value used with the d signing domain to locate verification data.

RFC 6376 §3.1 RFC 6376 §3.5

DMARC alignment
The required relationship between an authenticated identifier and the Author Domain.

RFC 9989 §4.4

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