DKIM (DomainKeys Identified Mail)

DKIM (DomainKeys Identified Mail) is an email security standard that adds a digital signature to outgoing messages, letting receiving servers check, using a public key in DNS, that the email really came from the domain and wasn't altered.

IntermediateCategory: Network and internet security

Also called: DomainKeys Identified Mail, DKIM signature, DKIM record, DKIM key

What is DKIM?

DKIM attaches a tamper-evident seal to every email you send. Your mail system signs each message with a private key, and publishes the matching public key in DNS. Any receiving server can use that public key to confirm the message came from a server authorized by your domain and hasn't been changed on the way. The standard is RFC 6376.

How does DKIM work?

  1. Your email provider generates a key pair and gives you a DNS record to publish, named with a "selector", such as `google._domainkey.example.com`.
  2. Outgoing messages get a `DKIM-Signature` header covering the body and key headers.
  3. The receiving server fetches the public key from DNS and checks the signature. If anything was altered, or the signature is missing or wrong, it fails.

Setting up DKIM

  • Turn on DKIM signing in Microsoft 365, Google Workspace and every other service that sends mail for your domain, such as newsletter or invoicing tools. Each gives you its own selector record.
  • Use 2048-bit keys where supported and rotate them periodically.
  • Check that messages pass DKIM by viewing an email's headers or using a free checker.

DKIM, SPF and DMARC

DKIM survives forwarding, where SPF often breaks. DMARC then checks that the DKIM signing domain matches the visible From address and tells receivers to quarantine or reject failures. CISA requires all three on federal domains, and major mailbox providers expect them from senders.

Related terms

Sources

  1. RFC 6376: DomainKeys Identified Mail (DKIM) Signatures (IETF)
  2. BOD 18-01: Enhance Email and Web Security (CISA)
  3. Email sender guidelines (Google)

Drafted with AI assistance, then edited and fact-checked by a person. How we use AI.