Use this when signing outgoing mail so receivers can verify it.
DKIM
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.
sender signs → DKIM header → receiver verifies via DNS
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
dig +short TXT selector1._domainkey.example.comVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
- DKIM signs with a private key; the public key is in DNS.
- Every sending service needs its own key/selector.
- Rotate keys periodically.
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:
| Aspect | Recommendation |
|---|---|
| Key size | 2048-bit RSA (or Ed25519 where supported alongside RSA) |
| Every sending service | Its own selector (M365, marketing platform, ticket system) |
| Rotation | Periodically, using new selectors |
| Alignment | DKIM 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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%