What is DKIM (DomainKeys Identified Mail)?

Last updated: April 17, 2026

Definition

DKIM is an email authentication method that validates a domain's responsibility for a message by attaching a cryptographic signature to outgoing emails. Receiving mail servers verify the signature using a public key published in the sending domain's DNS records, confirming the message originated from an authorized source and has not been altered in transit. Email administrators use DKIM alongside SPF and DMARC to prevent spoofing, phishing, and business email compromise.

Key Facts

  • Also known as: DomainKeys Identified Mail
  • Category: Cybersecurity / Email Security
  • Related standards: RFC 6376 (September 2011), RFC 8301, 8463, 8553, 8616; IETF standards-track specification
  • Common signing algorithms: RSA-SHA-256, ed25519 (elliptic curve, added in RFC 8463)
  • Key implementations: Microsoft 365, Google Workspace, OpenDKIM, Postfix, Sendmail
  • Origin: 2004 (merged from Yahoo's DomainKeys and Cisco's Identified Internet Mail)

How DKIM Works

DKIM operates through public key cryptography using two critical components. The sending organization publishes a public key in its DNS records as a TXT entry at a specialized subdomain following the format [selector]._domainkey.[domain]. The selector allows multiple keys per domain, enabling different mail servers or third-party services to sign with distinct keys.

When an email leaves the sending server, DKIM creates a digital signature from selected header fields (From, To, Subject, with From being mandatory), a hash of the message body, and metadata including the signing algorithm, domain, selector, timestamp, and expiration. The signature is computed by hashing these elements, encrypting the combined hash with the private key, and encoding the result as Base64 in the DKIM-Signature header's b= tag.

Receiving servers extract the domain (d=) and selector (s=) values from the DKIM-Signature header, retrieve the corresponding public key from DNS, decrypt the signature, recompute hashes from the received message content, and compare results. Matching hashes prove the message was signed by the indicated domain and has not been tampered with in transit. DKIM passes DMARC validation only when the signing domain aligns with the From address domain, preventing attackers from signing with their own domain while spoofing a different sender.

Why DKIM Matters

Without DKIM authentication, organizations remain vulnerable to email spoofing attacks where threat actors impersonate executives or trusted partners to steal credentials or redirect payments. Major email providers now use DKIM signatures as a primary factor in domain reputation scoring. Emails failing DKIM checks are flagged as spam or rejected entirely, directly impacting deliverability for legitimate business communications.

The OpenDKIM Project found that 92.3 percent of DKIM signatures verified successfully, though mailing list traffic saw slightly lower rates at 90.5 percent due to content modification by intermediate mail servers (OpenDKIM Project). This 7 to 10 percent signature breakage highlights a persistent technical limitation, but the protocol remains essential for comprehensive cybersecurity infrastructure.

Google and Yahoo began requiring DKIM authentication for bulk senders in February 2024, making implementation mandatory rather than optional for organizations sending high-volume email. For IT teams managing email infrastructure, DKIM provides non-repudiation capabilities that prove message authenticity when investigating breaches or validating whether leaked emails actually originated from the organization, strengthening defenses with security monitoring and threat detection.

DKIM vs. SPF

AspectDKIMSPF
Primary functionValidates message integrity through cryptographic signaturesValidates sending server authorization through IP address
ScopeMessage content (headers and body hash)SMTP envelope (server IP address)
Used byEmail administrators implementing authentication layersEmail administrators validating sender infrastructure
Key differenceConfirms message unchanged in transitConfirms message sent from authorized server
When to useWhen content authenticity and tamper detection requiredWhen validating authorized mail server IP addresses

The key difference is that DKIM verifies message content has not been modified after signing, while SPF verifies the sending server's IP address appears on the domain's authorized sender list. Both protocols work together under DMARC policies to prevent email spoofing.

Common Misconceptions

DKIM is not a spam filter. The protocol authenticates that an email was authorized by the signing domain and has not been altered, but it does not evaluate message content for spam characteristics or malicious intent.

DKIM signatures do not prevent all spoofing attacks. Attackers can send DKIM-signed emails from their own domains while spoofing the visible From address, which is why DMARC alignment checks are required to verify the signing domain matches the From address domain.

Frequently Asked Questions