Skip to content
Cybersecurity

DKIM

DKIM (DomainKeys Identified Mail) is an email authentication method using digital signatures. The sending server signs messages with a private key, and the recipient verifies the signature using a public key in DNS. DKIM confirms message integrity and sender authenticity.

DKIM Definition

DKIM (DomainKeys Identified Mail) is an email authentication standard that uses cryptographic signatures to confirm that a message was actually sent by the domain’s authorized server and wasn’t modified in transit. DKIM is one of three fundamental email security mechanisms alongside SPF and DMARC.

How Does DKIM Work?

Sending:

  1. Mail server generates message hash
  2. Signs hash with domain private key
  3. Adds DKIM-Signature header

Receiving:

  1. Recipient server reads DKIM header
  2. Retrieves public key from DNS
  3. Verifies signature
  4. Confirms message integrity

DKIM Signature

Example DKIM header:

DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=selector;
    h=from:to:subject:date; bh=base64hash; b=signature
  • v: Version
  • a: Algorithm (rsa-sha256)
  • d: Signing domain
  • s: Selector (key identifier)
  • h: Signed headers
  • bh: Body hash
  • b: Signature

DKIM DNS Record

selector._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIGfMA0G..."
  • selector: Key identifier (enables rotation)
  • k: Key type
  • p: Public key

DKIM vs SPF

AspectDKIMSPF
What it checksSignatureSender IP
IntegrityConfirms no modificationNo
ForwardingWorks when forwardedBreaks
ConfigurationMore complexSimpler

DKIM Benefits

  • Integrity: Confirmation of no modification
  • Authenticity: Proof of origin
  • Forwarding support: Works when forwarded (unlike SPF)
  • Reputation: Better deliverability
  • DMARC foundation: Required for full DMARC

DKIM Implementation

  1. Key generation: Private/public key pair
  2. DNS configuration: Adding TXT record with public key
  3. Server configuration: Signing outgoing messages
  4. Testing: Verifying signature correctness
  5. Rotation: Periodic key changes

DKIM Best Practices

  • Key length: Minimum 2048 bits
  • Regular rotation: Periodically change keys
  • Multiple selectors: For different services
  • Monitoring: Tracking verification failures

DKIM is an essential email security element that, combined with SPF and DMARC, provides comprehensive protection against spoofing.

Explore our services

Want to Reduce IT Risk and Costs?

Book a free consultation - we respond within 24h

Response in 24h Free quote No obligations