Self-hosted email marketing with full source code. Pay once, own forever. Get AcelleMail — $74 →

Authentication · RFC 6376 · Updated May 2026

DKIM

DomainKeys Identified Mail

DKIM (DomainKeys Identified Mail) is a cryptographic email authentication standard (RFC 6376) in which the sender signs each outgoing message with a private key, and the receiver verifies the signature against a public key published in DNS.

§1

Definition

DKIM (DomainKeys Identified Mail) is an email authentication standard defined in RFC 6376. The sending mail system signs each outgoing message with a private cryptographic key; a header named DKIM-Signature carries the signature, the algorithm, and a pointer to the public key. The receiving server fetches the public key from DNS and verifies that the signature matches the message body and listed headers — proving both that the message originated from a server holding the private key, and that the signed portions of the message have not been altered in transit.

§2

Selectors and key rotation

The public key lives at {selector}._domainkey.{domain} as a TXT record. Selectors are arbitrary identifiers — typically s1, s2, mail, or vendor-specific names like amazonses. Selectors enable key rotation: publish a new key under a fresh selector, switch the signer to the new selector, leave the old key in DNS until in-flight signed messages are flushed, then delete the old TXT record. Rotation is a basic hygiene practice — most ESPs rotate at least annually and on any suspected compromise.

§3

How AcelleMail uses DKIM

For vendor-backed sending (Amazon SES, Mailgun, SendGrid, SparkPost — all built-in drivers under app/SendingServers/Drivers/Vendors/), DKIM is signed by the vendor. The operator's job is to publish the vendor-provided CNAME or TXT records on their sending domain. For the generic SMTP driver, DKIM signing is done by the upstream MTA (Postfix's opendkim milter, Postal's built-in signer, etc.) — AcelleMail does not sign DKIM itself.

The full setup walkthrough — what the records look like for the major vendors and how to verify signing — lives in the deliverability pillar guide.

§4

DKIM vs SPF

SPF authenticates the IP address; DKIM authenticates the message itself. A forwarded email that breaks SPF (because it now comes from the forwarder's IPs) typically still passes DKIM (the signature covers the body, not the path). DMARC then aligns one or both signals against the visible From: header. All three layers compose — modern deliverability assumes you publish all three.

Sources

Every claim on this page traces to one of these.

Want to run this in production?

AcelleMail is a one-time-license self-hosted email platform with first-class support for every term in this glossary. No recurring fees, no per-subscriber pricing, full source code.

Get AcelleMail — $74 Try Live Demo