How DKIM works
Your mail server signs outgoing mail with a private key and writes the signature into the DKIM-Signature header. It names the domain (d=) and the selector (s=). Together they give the name of the DNS entry that holds the public key.
dkim._domainkey.example.org. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A…"
Recommendations
- Use RSA keys with 2048 bits. 1024 bits are still valid, Gmail and others recommend 2048.
- Sign with rsa-sha256. rsa-sha1 is deprecated by RFC 8301.
- The signing domain (d=) should match the visible From domain so DKIM counts for DMARC.
- Rotate keys now and then and publish a new selector for it.
Common mistakes
- The key is missing in DNS or sits under another selector than the signature names.
- The record holds several TXT entries, an empty p= (a revoked key), or line breaks and quotes that were copied along when pasting into the DNS panel.
- The content changed after signing, for example through a footer, a disclaimer or a mailing list. The body hash no longer matches.
- The l= tag (body length) allows content to be appended and strict verifiers reject it.
How to check it
Send a test mail to sender.report. The report names the selector, the domain and the DNS name it queried, and says whether the record is missing, malformed or the DNS server did not answer. After a DNS change you query everything again with one click.