What DKIM is and how it works
Key generation and DNS publishing
Key rotation and maintenance
Key Takeaways
TL;DR
DKIM cryptographically signs emails to prove authenticity and message integrity.
Most email providers (M365, Google Workspace) make DKIM setup straightforward.
Use 2048-bit keys minimum and rotate them at least annually.
Each third-party email service needs its own DKIM configuration.
Cyber Defense Agent verifies DKIM is properly configured during every scan.
Official Sources
FAQ
Frequently asked questions
How do I set up DKIM in Microsoft 365?
In the Microsoft 365 Defender portal, go to Email & collaboration > Policies & rules > Threat policies > DKIM. Select your domain and click "Enable." Microsoft will provide CNAME records to add to your DNS. After DNS propagation, Microsoft 365 will automatically sign all outgoing emails with DKIM.
What key size should I use for DKIM?
Use 2048-bit keys. While 1024-bit keys are still technically valid, they are increasingly vulnerable to brute-force attacks. Most modern email providers generate 2048-bit keys by default. If your DNS provider doesn't support long TXT records, you may need to split the key across multiple strings.
How often should DKIM keys be rotated?
Rotate DKIM keys at least annually. Some security frameworks recommend quarterly rotation. Always rotate immediately if you suspect a key compromise. Use a new selector name for each rotation to ensure a smooth transition without disrupting email delivery.
Does DKIM work with forwarded emails?
Yes, this is a key advantage of DKIM over SPF. When an email is forwarded, the DKIM signature remains intact because it's part of the message headers. SPF often fails for forwarded emails because the forwarding server's IP isn't in the original sender's SPF record. This is why both DKIM and SPF are needed, and why DMARC checks either-or.
Related Guides
Continue reading
Get your Cyber Defense Score™ in 60 seconds.
100 tools. No installation. No credit card. Real evidence.