Topic · Authentication
DKIM
DomainKeys Identified Mail attaches a cryptographic signature to selected email headers and content.
How it works
A sending service signs with a private key and recipients retrieve the public key from DNS.
What can go wrong
A valid DKIM signature can belong to a third-party domain and still fail DMARC alignment.
What to check or do
Sign with your own domain, use strong keys and monitor selector rotation.
Practical scenario
A help-desk platform signs support emails with d=vendor.example, while the visible From address is [email protected]. Verification reports DKIM pass, but the signature does not align for DMARC. When the vendor is configured for custom-domain signing, its d= value can align with company.example.
Verification checklist
- Inspect d= and s= values in a received DKIM-Signature header.
- Query the selector’s public key at s._domainkey.d.
- Separate signature cryptographic validation from DMARC domain alignment.
- Test message forwarding and content modification before changing keys.
How to investigate DKIM
- Signal to investigate
- A message can have a valid cryptographic signature from the wrong signing domain for DMARC alignment.
- Evidence to collect
- Inspect DKIM-Signature d= and s=, then retrieve s._domainkey.d for the relevant DNS public key.
- Common wrong conclusion
- A successful DKIM result does not by itself prove that the message is legitimate or originated from the brand shown to users.
How to interpret the evidence
DKIM signing protects specified headers and a canonicalized representation of the message body. A relay can alter unsigned fields or add a footer, and a legitimate signature from a service provider can still be unaligned with the brand's From domain. Signatures must be interpreted together with the signing identity and verifier result.
What to change and how to verify it
Export a raw message at the recipient and check d=, s=, h=, bh= and verification status. Confirm that the DNS selector matches the production signing key and rotate with overlap for delayed mail. Where a gateway modifies content, change the order of signing or the gateway behavior instead of simply publishing another key.
dig +short TXT selector1._domainkey.example.comEducational example; not validated against your live infrastructure.selector1._domainkey.example.com TXT "v=DKIM1; k=rsa; p=PUBLIC_KEY_HERE"Put this into practice
Run a focused check, then explore protection if your domain needs it.