A DKIM signature proves a domain signed a message, not that the domain meant it for you, so one validly signed message can be resent to millions of recipients and still pass DKIM and DMARC. This is DKIM replay. It turns a reputable sender's signature into a delivery pass for spam and phishing, and when receivers react, the sender's own legitimate mail starts landing in spam folders. This guide explains how replay works, why DMARC cannot stop it, what senders can change in their signing (header over-signing, signature expiry, key and selector practice, outbound abuse controls), what receivers look for, and where the IETF's DKIM2 work stands as of November 2026. It is written for email administrators, deliverability teams and anyone who runs a platform that signs mail for others. It assumes you know the basics in the DMARC, SPF and DKIM Guide.
Key takeaways
- DKIM does not sign the envelope. The SMTP MAIL FROM and RCPT TO addresses are outside the signature, so a signed message can be re-sent to any recipient without breaking it.
- DMARC passes on any aligned DKIM signature. RFC 9989 says a message passes if any DKIM-authenticated identifier aligns with the author domain; there is no check on who the message was sent to.
- The sender pays the reputation cost. Replay volume is attributed to the signing domain, so platforms that sign mail for customers or free accounts are the main targets.
- Sender mitigations narrow the window, they do not close it. Over-signing headers, a short
x=expiry, regular selector rotation and strong outbound abuse controls make replay harder and shorter, but RFC 6376 statesx="is not intended as an anti-replay defense". - The structural fix is DKIM2, still a draft. The IETF DKIM working group's DKIM2 specification binds each signature to the envelope of each hop; it is an Internet-Draft, so plan for it but do not depend on it.
How DKIM replay works
The IETF problem statement (draft-ietf-dkim-replay-problem-00, now expired but still the clearest description) sets out the pattern:
- Get access to a reputable signer: the attacker creates, buys or compromises an account at a provider that DKIM-signs outbound mail, ideally one with high reputation. Compromised mailboxes map to ATT&CK T1586.002 Compromise Accounts: Email Accounts.
- Send one message to a mailbox they control: the provider signs it with its own domain in
d=, exactly as it should. - Keep the signed copy: the received message carries an intact, valid DKIM-Signature header.
- Re-post at volume: the attacker submits the stored message to large recipient lists through infrastructure of their choosing. The draft notes that header fields such as To and Subject can be added if the signature did not cover them.
Two properties make this possible. First, the draft states that DKIM covers some header content but "does not cover the envelope addresses" used to route mail. Second, DKIM is designed to survive relaying, so a valid signature arriving from an unexpected IP address is normal behaviour, not a fault. RFC 6376 itself anticipates part of this in Section 8.6: a spammer can send through a signing MTA "banking on the reputation of the signing domain".
The same weakness applies to ARC. The problem statement notes that ARC (RFC 8617, an Experimental RFC) is built on DKIM and has the same replay issue. See the ARC (Authenticated Received Chain) Guide.
Replay compared with legitimate indirect mail
The problem statement is blunt: an individual replayed message "has no observable differences from a legitimate message", and email authentication "does not distinguish benign re-posting flows from a DKIM Replay Attack". The table shows why.
| Flow | DKIM result | SPF alignment | Recipient differs from original | Volume per signature |
|---|---|---|---|---|
| Direct delivery | Pass | Usually aligned | No | One per recipient set |
| Alias or auto-forward | Pass if unmodified | Usually fails | Yes | Low |
| Mailing list (unmodified) | Pass if unmodified | Fails | Yes | Medium to high |
| DKIM replay | Pass | Usually fails | Yes | Very high |
Why DMARC passes
RFC 9989 (DMARC, Standards Track, May 2026) requires an SPF or DKIM pass on an identifier aligned with the author domain in the From header. For DKIM, the aligned identifier is the d= domain, and alignment is relaxed by default (adkim=r), so a subdomain signature aligns with the organisational domain. A message passes if any DKIM-authenticated identifier aligns. SPF does not have to pass.
In a replay, the From domain and the d= domain are those of the original signer, so DKIM alignment holds and DMARC passes, whatever the policy. A p=reject policy does not help, because nothing fails. DMARC was designed to stop unauthorised use of a domain in the From header; replay is authorised signing reused out of context. The changes in DMARCbis are covered in the DMARCbis Changes Guide.
Two consequences follow for senders:
- Aggregate reports show replay as passing mail: DMARC aggregate reports will list the replaying IP addresses with DKIM pass and SPF fail. A sudden rise in DKIM-pass, SPF-fail volume from unfamiliar sources is a replay signal, not a configuration fault.
- Reputation damage is real: the problem statement notes that as filters react, "Benign mail from the signer's domain then starts to go to the spam folder."
Sender mitigations
None of these stops replay outright. Together they reduce what an attacker can change in a stored message, shorten how long it stays useful, and reduce how often an attacker can get a signature at all.
| Mitigation | What it does | Limit | Source |
|---|---|---|---|
| Over-sign key headers | Stops an attacker adding a second From, To, Subject or other header without breaking the signature | Does not stop resending the message unchanged | RFC 6376 Sections 5.4, 5.4.2, 8.15 |
Short signature expiry (x=) | Verifiers may treat expired signatures as invalid | Optional for verifiers; replays often happen within hours | RFC 6376 Section 3.5; problem statement 5.4 |
| Selector rotation and revocation | Old signatures stop verifying once the key is removed | Rotation periods are long compared with a replay campaign | RFC 6376 Section 6.1.2; M3AAWG key rotation guidance |
Avoid l= | Prevents appended content passing under a valid signature | None: it is a pure gain | RFC 6376 Section 8.2 |
| Separate signing domains by traffic class | Contains the reputation damage to one subdomain or selector | Needs DNS and platform work | Operational practice |
| Outbound abuse controls | Reduces the number of attacker-controlled signed messages | Determined attackers still get some through | RFC 6376 Section 8.6; problem statement 1.1 |
Over-signing headers
RFC 6376 lets a signer list header field names in h= that do not exist when the message is signed; the missing field is treated as null, so adding it later breaks the signature. Section 5.4.2 says that where a field appears more than once, the signer signs from the bottom up, and can list a name more times than it appears. Section 8.15 warns that a verifier "would be incorrect to infer that all instances of a header field are signed just because one is."
- Always over-sign: From, To, Cc, Subject, Date, Reply-To, Message-ID, MIME-Version, Content-Type, Content-Transfer-Encoding. Listing each one more time than it occurs stops an extra copy being inserted above it.
- Sign empty To and Cc: if a message has no Cc, still sign Cc, so a recipient list cannot be added under the original signature.
- Bulk and list headers: List-Unsubscribe and List-Unsubscribe-Post are worth signing on marketing mail so the unsubscribe target cannot be changed.
- Check your MTA: most signing software has a separate setting for over-signed headers. Confirm the generated
h=on a test message rather than trusting the configuration.
Over-signing matters because many replay campaigns change the visible To or Subject so the message fits a new target list. With full over-signing, the attacker is limited to resending the exact original, which is less useful for phishing.
Short signature expiry
The x= tag sets an expiry time, and RFC 6376 says signatures "MAY be considered invalid" after it, using the time the message first reached the verifier's domain where that is known. The specification is explicit that x= is not an anti-replay defence, and the problem statement adds that "bad actors are quite good at taking action very quickly". Still, a short expiry removes the long tail of replays days or weeks later.
- Typical choice: a few days for transactional and person-to-person mail, long enough to cover delayed delivery and retries. Very short values risk failing legitimate mail held in queues.
- Clock discipline: set
t=andx=from NTP-synchronised hosts; skew causes false failures. - Look ahead: the DKIM2 best practices draft suggests verifiers treat a DKIM2 signature timestamp more than 14 days old, or in the future, with suspicion.
Key rotation and selector practice
Removing a key from DNS makes every signature made with it fail; RFC 6376 Section 6.1.2 treats an empty p= as a revoked key. The M3AAWG best practices document on DKIM key length (M3AAWG064, revised 2017) recommends keys of at least 1024 bits and rotation at least twice a year, with revocation by emptying p=. RFC 8301 sets 1024 bits as the minimum for RSA signing keys and recommends 2048. The DKIM2 best practices draft recommends publishing each new key under a new selector and never reusing retired selector names.
- Rotate on a schedule: publish the new selector, switch signing, keep the old key published for the expiry window plus delivery delay, then empty its
p=. - Rotate on incident: during an active replay campaign of a known message, an emergency rotation and revocation of that selector cuts the campaign off, at the cost of failing any of your own in-flight mail signed with it.
- Selector per stream: separate selectors (and ideally signing subdomains) for marketing, transactional, corporate and customer-generated mail let you revoke one stream without touching the rest.
Handling DKIM private keys is a secrets problem as much as a DNS one: the signing key is a machine credential that should live in an HSM or secrets manager, with access limited to the signing service. See the Secrets Management Guide.
Outbound abuse controls
For platforms that sign mail on behalf of users (free mailbox providers, email service providers, SaaS products that send on a customer's behalf), the most effective control is limiting who can get a signature at all.
- Account vetting: rate limits and reputation checks on new accounts before outbound mail is signed with a shared domain.
- Content scanning before signing: outbound spam and phishing filtering, so obvious abuse is never signed.
- Single-recipient tests: watch for accounts that send one message to an external mailbox and then stop, a pattern consistent with harvesting a signature.
- Customer domains: where possible, sign with the customer's own domain rather than the platform's shared domain, so replay damage stays with the account that caused it.
Receiver-side signals
The problem statement concedes there is "no straightforward way to detect DKIM Replay for an individual message", so receivers work on aggregates and heuristics. The draft discusses counting signatures and stripping them at delivery; the other rows are common receiver heuristics with the same weakness, that legitimate indirect mail looks alike:
| Approach | How it works | Limit |
|---|---|---|
| Count repeated signatures | Cache the signature value (b=) and flag those seen above a threshold | Mailing lists and aliases also produce duplicates; cache storage and TTL decisions |
| Recipient not in signed headers | Compare the envelope recipient with signed To and Cc | Bcc, aliases and lists produce the same pattern |
| Strip signatures at mailbox delivery | Remove DKIM-Signature from delivered copies so they cannot be replayed | No effect when the attacker controls the receiving mailbox platform |
| DKIM pass with SPF fail from unknown IPs | Score volume from IPs never seen sending for the signing domain | Legitimate forwarding shows the same result |
| Signature age | Down-weight signatures well past their t= or x= | Verifiers may ignore x=; fast replays are fresh |
For senders, the useful receiver-side data is in your own DMARC aggregate reports and in feedback loops from large mailbox providers. Monitor:
- Volume of DKIM-pass, SPF-fail mail per selector from IP addresses outside your sending ranges.
- Complaint rate and spam-folder placement per signing domain and selector.
- The number of distinct source IPs per selector per day.
- Time from a replay alert to selector revocation.
- Share of outbound mail with full over-signing and a set
x=value.
The DMARC, SPF and DKIM Failure Troubleshooting Guide covers reading aggregate reports in detail.
Standards work (DKIM2)
The IETF DKIM working group is developing DKIM2. As checked on the IETF Datatracker in November 2026, its active working group documents are:
| Document | Version and date | Status |
|---|---|---|
| draft-ietf-dkim-dkim2-spec, DKIM2 Signatures | -09, 1 November 2026 | Working group Internet-Draft |
| draft-ietf-dkim-dkim2-dns, DNS specification for DKIM1 and DKIM2 | -03, 2 November 2026 | Working group Internet-Draft |
| draft-ietf-dkim-dkim2-bcp, DKIM2 Best Practices | -01, 9 September 2026 | Working group Internet-Draft, intended Best Current Practice |
| draft-ietf-dkim-replay-problem, problem statement | -00 | Expired |
The DKIM2 specification draft addresses replay by recording the envelope in each signature: mf= for MAIL FROM and rt= for RCPT TO, with a hop counter i= that each signer increments. A verifier checks that each hop's sender relates to a recipient of the previous hop, so a message re-sent to recipients nobody signed for is not fully verified. Intermediaries that change a message record the change in a Message-Instance header, and bounces must come from a domain that was part of the transmission. The best practices draft recommends signing with both DKIM1 and DKIM2 during transition, warns that a DKIM1-only message from a domain known to sign DKIM2 should be treated as anomalous (a possible downgrade), and leaves DMARC's future role as an open question.
These are drafts and will change. Track the working group, test with your MTA vendor when implementations appear, and keep the DKIM1 mitigations above in place.
Framework mapping
| Framework | Reference | How it applies |
|---|---|---|
| MITRE ATT&CK | T1586.002 Compromise Accounts: Email Accounts | Obtaining a reputable signing account |
| MITRE ATT&CK | T1566 Phishing | Replayed signed messages used to deliver phishing |
| NIST SP 800-53 Rev. 5 | SI-8 Spam Protection; SC-8 Transmission Confidentiality and Integrity | Outbound and inbound spam controls; message integrity |
| NIST CSF 2.0 | PR.DS-02; DE.CM-01 | Integrity of data in transit; monitoring of network services |
| CIS Controls v8.1 | 9.5 Implement DMARC | DMARC is required but does not cover replay on its own |
Common failure patterns
- Treating DMARC enforcement as the end state: a domain at
p=rejectis still fully exposed to replay of its own signed mail. - Minimal
h=lists: signing only From and Subject once, so recipient headers can be added and Subject can be duplicated. - No expiry and no rotation: a single selector unchanged for years, with no
x=, so a signed message harvested long ago still verifies. - One shared domain for every customer: an ESP signing all tenants with its own domain, so one abusive account damages delivery for all.
- Ignoring DKIM-pass, SPF-fail spikes: dismissing them in aggregate reports as forwarding noise.
- Using
l=: letting appended content pass under a valid signature, which RFC 6376 Section 8.2 warns against.
Practitioner checklist
- Over-sign From, To, Cc, Subject, Date, Reply-To, Message-ID and MIME headers, including headers that are absent.
- Remove
l=from every signing configuration. - Set
x=to a few days on transactional and person-to-person mail, from NTP-synchronised hosts. - Use separate selectors, and ideally signing subdomains, per mail stream.
- Rotate selectors at least twice a year with 2048-bit RSA keys, and document an emergency revocation procedure.
- Store DKIM private keys in an HSM or secrets manager with access limited to the signing service.
- Monitor DMARC aggregate reports for DKIM-pass, SPF-fail volume from unknown IP addresses, per selector.
- Apply outbound abuse controls before signing, especially for free or customer-generated mail.
- Track the IETF DKIM working group and plan dual DKIM1 and DKIM2 signing when your MTA supports it.
Standards and references
- IETF: RFC 6376 DomainKeys Identified Mail (DKIM) Signatures
- IETF: RFC 9989 Domain-Based Message Authentication, Reporting, and Conformance (DMARC)
- IETF: DKIM Replay Problem Statement (draft-ietf-dkim-replay-problem-00)
- IETF: DomainKeys Identified Mail Signatures v2 (DKIM2), Internet-Draft
- IETF: DKIM2 Best Practices, Internet-Draft
- IETF: DKIM Working Group documents
- M3AAWG: Best Practices for Implementing DKIM To Avoid Key Length Vulnerability
Related NHI Mgmt Group resources: DMARC, SPF and DKIM Guide · Email Authentication Checklist · Top 10 Email Authentication Mistakes · Email Security Guide