Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

DKIM

Direct answer

DKIM signs outgoing email with the sending domain's private key in a header, and receivers check it against a public key published in DNS, proving the message is authorized and unchanged.

When to use this

Use this when signing outgoing mail so receivers can verify it.

First 30 seconds

1. DKIM signs messages with a domain key.

2. Receivers verify with the DNS public key.

3. 2048-bit keys; rotate selectors.

4. Survives forwarding better than SPF.

5. Sign all outbound mail (including SaaS senders).

Operational verification

sender signs → DKIM header → receiver verifies via DNS

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Keys shorter than 1024 bits (2048 recommended).
  • Mail modified after signing (footers added by gateways) breaking the signature.
  • Selector records with line breaks or quotes copied wrongly into DNS.
  • Signing with a domain that does not align with the From domain, so DMARC still fails.
Platform / version applicability
Security architecture and operations
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformSecurity architecture and operations
Key commanddig +short TXT selector1._domainkey.example.com
Scope / prerequisiteUse this when signing outgoing mail so receivers can verify it.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Checks Verify boundary
dig +short TXT selector1._domainkey.example.com

In a received message, the Authentication-Results header shows dkim=pass header.d=example.com header.s=selector1. Use 2048-bit RSA keys, rotate selectors periodically, and remove keys of services you no longer use.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • DKIM signs with a private key; the public key is in DNS.
  • Every sending service needs its own key/selector.
  • Rotate keys periodically.
Key checks
  • dig TXT <selector>._domainkey.<domain> +short — DKIM public key
  • DKIM-Signature header in sent mail — signing
  • Key length 2048 bits — strength
ReferenceWhy it matters1 section · depth on demand

How DKIM works

The sending server signs selected headers and the body with a private key and adds a DKIM-Signature header with the domain (d=) and selector (s=). Receivers fetch the public key from selector._domainkey.example.com (TXT) and verify.

dig TXT selector1._domainkey.example.com

Use 2048-bit keys, rotate them, and sign with your own domain (not only the provider's default) so DMARC alignment passes.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to outgoing email headers and body. Receivers fetch the public key from DNS (selector._domainkey.example.com) and verify that the message was sent by an authorised system and not altered.

dig +short TXT selector1._domainkey.example.com

Practical points:

AspectRecommendation
Key size2048-bit RSA (or Ed25519 where supported alongside RSA)
Every sending serviceIts own selector (M365, marketing platform, ticket system)
RotationPeriodically, using new selectors
AlignmentDKIM domain should match the From domain for DMARC

DKIM alone does not stop spoofing — DMARC tells receivers what to do when SPF/DKIM do not align.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docSecurity architecture and operations current

Authoritative/upstream documentation reviewed for bounded claims in Email Security → DKIM. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc7489 · confidence 94%
Confirmation

Confirm action

Continue?