Skip to content
All field notes

DKIM Replay Attacks: What Senders Can Do Before DKIM2

How a DKIM replay attack reuses one validly signed message at scale, how it shows up in DMARC reports, and what signers can change today while DKIM2 is drafted.

PlatOps Security TeamSecurity7 min read
The short version
In a DKIM replay, an attacker gets one message signed by your domain, then resends it unchanged to thousands of new recipients. The signature still verifies, so the copies pass DKIM and, when the d= domain is aligned, DMARC too.
DKIM signs the message, not the SMTP envelope. A replayed copy is identical to the original, which is why the IETF problem statement calls replay impossible to detect with current standards.
Signers can narrow the attack: filter mail before signing it, oversign key header fields, never use l=, set a short x= expiry, and keep mail that untrusted users can trigger on its own selector so the key can be revoked.
In DMARC aggregate reports, replay looks like high-volume DKIM passes for your domain from source IPs that are not yours.

A DKIM signature proves that a domain handled a message and that the signed parts have not changed since. It says nothing about who the message was meant for. A DKIM replay attack is built on that gap: one legitimately signed message, sent again to people its signer never addressed.

The attacker does not need your private key. They need one message your systems will sign, and a way to send copies of it. Your domain's reputation does the rest, until receivers notice the volume and that reputation starts to slide for your real mail too.

How a replay works

The IETF DKIM working group's replay problem statement lays out the sequence. The draft expired without becoming an RFC, but its description of the attack is still the reference text:

  1. The attacker creates, buys, or compromises an account at an organization that signs outgoing mail with DKIM.
  2. They send one message from that account to a mailbox they control outside it.
  3. That message arrives with a valid DKIM signature.
  4. They send the same message, byte for byte in the signed parts, to a large list of new recipients.

Step 4 is the attack. The copies leave from the attacker's own servers, with their own envelope sender. SPF for your domain fails or does not apply. DKIM still passes, because the headers and body it covers are untouched. If the signing domain in d= is the domain in the From header, DMARC passes too.

RFC 6376, section 8.6 described this pattern in 2011 under "Replay/Spam Attacks." The problem statement explains why it is still open: DKIM "does not cover the envelope addresses," so "an individual, replayed message has no observable differences from a legitimate message."

What it looks like in your DMARC reports

Replay does not show up as failures. It shows up as passes you did not send. In an aggregate report it looks like this:

<record>
  <row>
    <source_ip>203.0.113.45</source_ip>
    <count>48211</count>
    <policy_evaluated>
      <disposition>none</disposition>
      <dkim>pass</dkim>
      <spf>fail</spf>
    </policy_evaluated>
  </row>
  <identifiers>
    <header_from>example.com</header_from>
  </identifiers>
  <auth_results>
    <dkim>
      <domain>example.com</domain>
      <selector>s1</selector>
      <result>pass</result>
    </dkim>
    <spf>
      <domain>bulk-sender.example.net</domain>
      <result>pass</result>
    </spf>
  </auth_results>
</record>

Three things together point to replay: a source IP that is not in your sender list, an aligned DKIM pass, and a count far above what that selector normally signs in a day. Forwarding produces a similar row, but forwarded volume tracks your own mail and comes from known forwarders and mailing list hosts. Reading DMARC aggregate reports covers the rest of the XML.

The selector field tells you which key was replayed, which tells you which system signed the original. That matters for the fixes below.

Why there is no clean fix in DKIM today

The problem statement goes through the options and finds each one partial. Putting the SMTP recipient in the signature catches replay but also breaks ordinary forwarding. Counting identical signatures at the receiver flags mailing lists as false positives. Stripping signatures at mailbox delivery does nothing when the attacker runs the receiving mailbox. Its conclusion: "DKIM Replay is impossible to detect or prevent with current standards and practices."

So the work on the sending side is about narrowing the attack: fewer messages worth replaying, fewer ways to alter them, and shorter lives for the signatures that do leak.

What signers can do now

Filter before you sign

RFC 6376 section 8.6 puts the first defense with the signer: the spammer needs your system to sign their message. If your platform lets anyone sign up and send, such as a SaaS product with invites, a help desk, or a form-to-email feature, outbound mail needs the same spam scanning and rate limits on new accounts that you would apply to inbound mail. A message that never gets signed cannot be replayed.

Oversign the header fields that matter

A replayer can add header fields your signature does not cover, for example a second Subject or a second To that a mail client may display. RFC 6376, section 5.4.2 lets a signer list a field name in h= more times than it appears, and section 8.15 explains that an added instance then breaks the signature:

h=from:from:to:to:cc:cc:subject:subject:date:date:reply-to:reply-to:message-id:message-id

Each name appears once for the real field and once more to sign its absence, which is usually called oversigning. Signing software and hosted senders each choose their own list, so open the DKIM-Signature header of a message you sent and check which fields its h= covers.

Be precise about what this buys. Oversigning stops a replayer from changing what the recipient sees. It does not stop the unchanged message from being resent, because the visible To header still shows the original recipient and no receiver rejects mail for that.

Never use l=

The l= tag signs only the first part of the body. Section 8.2 warns that it lets an intermediary append content, which turns a replay of a harmless message into a replay of the attacker's text. Check that no signature from your systems carries an l= tag.

Set a short x= expiry

The x= tag sets a time after which the signature may be treated as invalid. Section 3.5 is explicit that verifiers "MAY" honor it and that x= "is not intended as an anti-replay defense." It still helps: a signature that expires in two to three days covers normal queueing and retries, and is worth less to someone collecting messages for a campaign next month. Do not set it shorter than your longest retry window, or slow deliveries arrive with expired signatures.

Give risky mail its own selector, and rotate

When a selector is replayed, removing its key from DNS makes every captured signature fail, and the problem statement lists this among the options. You can only do that if the key does not also sign your invoices and password resets. Put mail that untrusted users can trigger on its own selector, or its own subdomain, so you can revoke one key without touching the rest.

Rotation helps the same way on a schedule. M3AAWG's key rotation practices recommend rotating keys at least every six months; old signatures stop verifying once the retired key is revoked. The 2048-bit rotation guide has the procedure.

What to watch for

Replay is visible only in aggregate. DDMARC builds a sender inventory from your DMARC reports, every newly discovered sending source starts as Unknown, and a New sender detected alert can email you when one appears. An Unknown sender with a high aligned DKIM pass count is the row to open first. If it is a replay, revoke the selector, find the account that sent the original, and close it.

What DKIM2 changes

The DKIM working group's DKIM2 specification (draft 09, November 1, 2026, still a working group draft) addresses replay directly. Each DKIM2 signature records the SMTP envelope: mf= for MAIL FROM and rt= for the RCPT TO addresses. A verifier checks that each hop's sender matches a recipient of the hop before it, so a message signed for one recipient and resent to another breaks the chain of custody. What is DKIM2 covers the rest of the proposal.

Until DKIM2 is published and deployed by both senders and receivers, the measures above are what a signer controls.

Questions we get asked

An attacker obtains one message that carries a valid DKIM signature for your domain, usually by sending it from an account on your platform to an address they control, then resends that exact message to a large list of recipients. Because the signed content has not changed, every copy verifies and inherits your domain's reputation.

Field notes, twice a month.

When a mailbox provider changes the rules, you hear it here with the record you need to change. No digest, no roundup, no product news.

Field Notes, our DMARC newsletter, twice a month, from PlatOps Security, LLC (Gaithersburg, MD). We use your address only to send it. Unsubscribe with one click in any issue. Privacy policy.