Free trial The cheapest email marketing platform: try Moosend free for 30 days, no credit card. Don't miss your seat. The cheapest email marketing platform Start free trial →
BLACK FRIDAY 2026ONE-TIME OFFER Lifetime deal. Pay once. Credits refilled every year, for life. From $99. ENDS IN   Claim yours →

RFC 6376: DomainKeys Identified Mail (DKIM) Signatures

Cryptographic signature standard that lets receiving MTAs verify a message was authorised by the sending domain.

Alaa Touil
Email infrastructure specialist, 8+ years in SMTP and deliverability
12 min read Updated Nov 9, 2026 467 views
RFC 6376 DomainKeys Identified Mail (DKIM) Signatures - SMTPedia reference
RFC 6376
DomainKeys Identified Mail (DKIM) Signatures

Current standard

Domain
Authentication
Published
September 2011
Obsoletes
RFC 4871
SMTP relevance
foundational

↗ Read on rfc-editor.org

What this RFC defines

RFC 6376 defines DKIM (DomainKeys Identified Mail), a cryptographic signature standard that lets receiving MTAs verify that a message was authorised by the sending domain. The sending server signs outgoing messages using a private key; the receiving server retrieves the matching public key from DNS and verifies the signature.

Where you see it in practice

The DKIM-Signature: header in every email you send is defined by this RFC. When Gmail shows “signed by yourdomain.com” in the message details panel, it is reporting a successful DKIM verification per RFC 6376. A DKIM failure (signature mismatch or missing key) causes DMARC alignment to fail and can push mail into spam folders at major mailbox providers.

The current DKIM standard

RFC 6376 is the current DKIM standard, published in September 2011 and obsoleting RFC 4871. It specifies how a sending domain adds a cryptographic signature to outgoing messages (the DKIM-Signature header) and how receiving domains verify it against a public key published in DNS. The signature covers a set of headers (declared in the h= field) and the message body (with hash in bh=), signed with the private key corresponding to a specific selector under the domain.

What DKIM proves and does not prove

DKIM proves that the message was authorized by the signing domain and has not been modified in transit (within the scope of the signed headers and body). It does not prove that the RFC 5322 From header matches the signing domain; that is the alignment check performed by DMARC (RFC 7489). A message signed by mailgun.org can pass DKIM even if it claims From: alice@example.com, which is why DMARC alignment is required for effective spoofing protection.

Implementation across major providers

Every major mailbox provider verifies DKIM on inbound mail: Gmail, Outlook.com, Yahoo, iCloud, ProtonMail, Fastmail, and every enterprise Exchange or O365 deployment. On the outbound side, ESPs like SendGrid, Mailgun, Amazon SES, and Postmark sign every outbound message with the sender domain DKIM key (when configured). Since 2024 DKIM is no longer optional for volume senders: Gmail and Yahoo require bulk senders to sign with DKIM and publish DMARC (February 2024), and Microsoft applied the same rule to Outlook.com, Hotmail and Live addresses in May 2025 (see who requires DKIM today).

Quick Reference

RFC 6376 (September 2011, updated by RFC 8301, RFC 8463) defines DomainKeys Identified Mail (DKIM): a cryptographic signature mechanism that lets a domain claim responsibility for an email. The sender publishes a public key in DNS; the sending MTA signs outgoing messages with the paired private key; receiving MTAs verify the signature to confirm the message was not modified in transit and originated from someone controlling the signing domain. Obsoletes RFC 4871. Combined with SPF (RFC 7208) and DMARC (RFC 7489), DKIM is one of the three pillars of modern email authentication.

RFC 6376 at a glance

AspectDetail
PurposeCryptographic proof that an email was sent by (or through) an authorized signer
Signature locationDKIM-Signature header field added by signing MTA
Key storagePublic key in DNS TXT record at [selector]._domainkey.[domain]
AlgorithmsRSA-SHA256 (default), Ed25519 (per RFC 8463)
VerificationReceiving MTA fetches public key from DNS, verifies signature against message body and selected headers
Result surfaced inAuthentication-Results header per RFC 8601
PublishedSeptember 2011 (obsoletes RFC 4871)
UpdatesRFC 8301 (rsa-sha1 must no longer be used; signing keys of at least 1024 bits, 2048 recommended), RFC 8463 (Ed25519 support)

The DKIM-Signature header dissected

Real-world DKIM-Signature header
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=sender.com; s=mail-2026; t=1721654400;
bh=fUxD9K1o7Xr2SgD1RfP4CqZKMYE4mNvHhX0eB3sT8mA=;
h=From:To:Subject:Date:Message-ID:MIME-Version;
b=Hf3+2LzKQ8YB1XmC7pDNwR5jT9Kh4nSf6QgW2mPvY1uE0aXcVbNhI3
dFsL4rMkT6yWjBpNhX7qE8cRoS4tPfZmU2vDgL9jQrKh1sF5mBnWyE
…
TagPurposeExample
vDKIM version (always 1)v=1
aSigning algorithmrsa-sha256 or ed25519-sha256
cCanonicalization: header/bodyrelaxed/relaxed (recommended); alternatives simple/simple, relaxed/simple
dSigning domain (the d= identity used for DMARC alignment)d=sender.com
sSelector: identifies which key at [selector]._domainkey.[d]s=mail-2026
tSignature timestamp (Unix seconds)t=1721654400
xSignature expiration (optional)x=1724246400
hColon-separated list of headers included in signatureh=From:To:Subject:Date
bhBody hash (base64)bh=fUxD9K1o7...
bThe signature itself (base64)b=Hf3+2LzKQ...
iSigning identity (optional, refines d)i=@marketing.sender.com
lLength of signed body content (deprecated, security risk)Should not be used

The DKIM DNS record

Public key published at mail-2026._domainkey.sender.com
mail-2026._domainkey.sender.com. IN TXT (
“v=DKIM1; k=rsa; ”
“p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…”
“…5NnHl3xZgW9BdF+2Cu0YE7…QIDAQAB”
)

Tag reference:
v Version (DKIM1)
k Key type: rsa (default), ed25519
p Public key material (base64); empty p= means revoked
h Acceptable hash algorithms (usually sha256)
s Service type (email); usually omitted
t Flags: y=testing, s=strict (no subdomain use)
n Notes for administrator (ignored by verifiers)

Header and body canonicalization

DKIM signs a canonical form of the message so that trivial modifications (whitespace normalization, line-ending changes) do not break the signature. The c tag selects header/body canonicalization independently.

CanonicalizationEffect on headersEffect on bodyRecommendation
simpleNo modification (strict, brittle)Only trailing empty lines removedLegacy; avoid for headers
relaxedLowercase names, unfold, reduce whitespaceReduce whitespace, remove trailing empty linesRecommended for both

Who requires DKIM today

RFC 6376 makes DKIM optional. The large mailbox providers no longer do, at least for volume senders.

Mailbox providerSinceWho it applies toWhat is required
GmailFebruary 2024Bulk senders (around 5,000+ messages a day to Gmail accounts)SPF and DKIM, a DMARC record (p=none at minimum), alignment of the From domain, one-click unsubscribe for marketing mail
YahooFebruary 2024Bulk sendersSame set: SPF, DKIM, DMARC, one-click unsubscribe
Microsoft (Outlook.com, Hotmail, Live)May 2025Domains sending more than 5,000 messages a day to these addressesSPF, DKIM and DMARC (p=none at minimum) aligned with the sending domain

The full rules and how to check them are in our Gmail, Yahoo and Microsoft sender requirements guide.

Why DKIM fails in practice

A DKIM result is always visible in the Authentication-Results header of the received message (in Gmail: three-dot menu, “Show original”). These are the failures we see most often, what they look like, and what fixes them.

What you seeUsual causeFix
dkim=pass but dmarc=failThe message is signed, but with the sending service’s domain (d=amazonses.com, d=sendgrid.net…) instead of yours, so nothing aligns with the From domainAuthenticate your own domain in the sending service (CNAME or TXT records it gives you) so it signs with d=yourdomain.com
dkim=fail, often with “body hash did not verify”The body was changed after signing: a mailing list footer, an antivirus banner, a gateway that rewrites links or line endingsSign last, after any footer is added; use relaxed/relaxed; rely on ARC for mailing lists
dkim=permerror (no key found)The selector in s= has no record in DNS: typo, record never published, or record published under the wrong name (for example selector._domainkey.example.com.example.com)Look up [selector]._domainkey.[domain] and publish exactly what the provider gives you
Key published but verification still failsCloudflare proxy enabled on a DKIM CNAME, or a 2048-bit key pasted as one TXT string longer than 255 characters by a DNS editor that does not split itSet DKIM CNAMEs to “DNS only”; let the DNS host split long keys into several quoted strings
dkim=temperrorThe receiver could not reach your DNS at that momentUsually transient; if it repeats, check your DNS provider’s availability and TTLs
Seen on smtpedia.com. Our own double opt-in emails went to spam in November 2026 for the first reason in this table. Amazon SES was sending as contact@smtpedia.com, but only the address was verified in SES, not the domain, so SES never signed with d=smtpedia.com. With a strict DMARC policy (p=quarantine, adkim=s), every message failed DMARC. Creating a domain identity with Easy DKIM and publishing its three CNAME records (DNS only) fixed it within minutes.

Common DKIM implementation mistakes

Publishing a key shorter than 1024 bits. RFC 8301 requires signers to use at least 1024-bit RSA keys and recommends 2048-bit. Keys shorter than 1024 bits (still found on legacy configurations) are breakable, and verifiers that follow RFC 8301 are not required to accept them, so the signature can simply be ignored. Rotate to 2048-bit keys with a new selector; leave the old key in DNS for a grace period during rotation.
Signing the wrong d= domain for DMARC alignment. For DKIM to align with DMARC, the d= in the DKIM signature must match (or be a parent of, in relaxed alignment) the From header domain. Signing with your ESP’s domain (like d=sendgrid.net) does not produce DMARC alignment; you must configure ESP-provided authenticated sending or CNAME-based key delegation so the signature uses your own domain.
Modifying signed content in transit. Anti-virus scanners that add “Scanned by X” footers, mailing lists that add unsubscribe footers, and even some MTAs that rewrite line endings break the DKIM signature. The result is a verification failure at the destination. Fixes include: sign with relaxed canonicalization (tolerant of minor whitespace changes), avoid content-modifying middleboxes, or use ARC (RFC 8617) to preserve authentication results across intermediaries.
Not rotating keys. DKIM keys should rotate at least annually per operational best practice. Old keys can be compromised through incidents you may not detect. Rotation strategy: publish new selector with new key, wait 48 hours for propagation, switch signer to new selector, wait 30 days for in-flight messages, delete old key from DNS.
Using the deprecated l tag. The l tag limits how much of the body is signed. Attackers can append arbitrary content past the signed length and the signature still verifies. RFC 6376 itself warns about this risk (section 8.2), and the safe practice is simply to never set l.

What comes after RFC 6376: DKIM2

The IETF DKIM working group is designing DKIM2, a successor meant to fix what DKIM1 cannot: signatures that break when a message is forwarded or modified, replayed messages, and bounces sent to people who never handled the message. Each server that handles a message would add its own signature, creating a verifiable chain of custody. As of late 2026, DKIM2 exists only as working group Internet-Drafts (a core specification, a DNS document and a best practices document). It is not an RFC, and no mailbox provider requires it.

What it means for you today. Nothing changes: keep signing with RFC 6376 DKIM using a 2048-bit key aligned with your From domain, and keep DMARC reports flowing. Mailing list and forwarding problems are still handled by ARC until DKIM2 is published and deployed.
DKIM ecosystem RFCs

  • RFC 4871: Legacy DKIM (obsoleted by RFC 6376)
  • RFC 8301: cryptographic algorithm and key usage update (no more rsa-sha1, minimum 1024-bit keys)
  • RFC 8463: Ed25519 signature support for DKIM
  • RFC 5863: DKIM Deployment, Operations, and Considerations
  • RFC 5518: Vouch By Reference (uses DKIM signing)
  • RFC 8617: ARC (preserves DKIM verdicts across forwarders)
Authentication stack RFCs

  • RFC 7208: SPF (Sender Policy Framework)
  • RFC 7489: DMARC (aligns SPF and DKIM identities against From header)
  • RFC 8601: Authentication-Results header (surfaces DKIM verdict)
  • RFC 5322: Message Format (defines the From header DKIM aligns against)
SMTPedia companion guides

Frequently asked questions

What is the difference between the DKIM signing domain and the From domain?

The signing domain is the value of d= in the DKIM-Signature header; it identifies the domain that owns the key used to sign. The From domain is the visible sender in the From header per RFC 5322. These can differ. For example, if you send through SendGrid without CNAME setup, the signature might have d=sendgrid.net while your From is @yourbrand.com. This produces a valid DKIM signature but does not align with DMARC. Configure your ESP for authenticated sending (CNAME delegation of the DKIM selector to your own domain) so d= matches your From domain.

Can a message have multiple DKIM signatures?

Yes. RFC 6376 explicitly allows multiple DKIM-Signature headers. Common patterns: sender signs with their domain, then an ESP or gateway adds a second signature with a different d=. Verifiers check each signature independently; DMARC alignment succeeds if any DKIM signature aligns with the From domain. Adding signatures does not invalidate existing ones (unlike modifying content).

What key size should I use in 2026?

2048-bit RSA is the current best practice. RFC 8301 sets 1024 bits as the minimum and recommends 2048; Google also recommends 2048-bit keys. 1024-bit keys still verify, but there is no reason to create new ones. Ed25519 (per RFC 8463) offers equivalent security with much shorter keys and signatures but is not universally supported by verifiers; deploy alongside RSA rather than replacing it. Do not publish keys shorter than 1024 bits.

Why does my DKIM verification fail after forwarding?

Mailing lists and some forwarders modify the message body (adding footers, unsubscribe links) or headers (rewriting Subject, adding List-Id) after signing. Any modification to signed content invalidates the signature. Fixes: sign with relaxed canonicalization (survives whitespace changes but not content changes), or use ARC which allows intermediaries to attest to the pre-modification authentication results. Mailing list operators should adopt ARC signing.

Does DKIM prove the sender identity?

DKIM proves that someone controlling the DKIM key signed the message. It does not prove who authored the message content. For example, if you delegate DKIM signing to an ESP, the ESP holds the private key; anyone who compromises the ESP can send authenticated mail as your domain. DKIM is a domain-level authentication, not user-level. User identity requires end-to-end signing (S/MIME, OpenPGP) which is separate from DKIM.

Did this guide save you time?

SMTPedia is free and independent. A coffee helps keep every guide accurate.

Buy SMTPedia a coffee

See SMTPedia first on Google

Add us as a preferred source in Top Stories.

Add as preferred source

About the Author

Alaa - SMTPedia author

Alaa · LinkedIn

Email infrastructure specialist with 8+ years of hands-on experience in SMTP, deliverability, and email verification. I’ve configured and troubleshot mail systems across Postfix, Exchange, and cloud relays, managed IP reputation and warmup campaigns, and built verification pipelines processing millions of addresses. My work spans DNS authentication (SPF, DKIM, DMARC, BIMI), bounce handling, blocklist monitoring, and compliance frameworks including CAN-SPAM and GDPR. I write every article on SMTPedia to give email professionals, developers, and marketers the accurate, RFC-grounded reference they need.


About SMTPedia

SMTPedia is an independent email industry reference covering SMTP, IMAP, POP3, email deliverability, marketing platforms, DNS authentication, and email verification. Every article is researched from official provider documentation, IETF RFCs, and industry best practices. Settings and configurations are verified quarterly.

We are cited as a source by ChatGPT, Microsoft Copilot, and thousands of email professionals worldwide. Learn more about our editorial process.