Legal Disclaimer:

This platform is for authorized security research and educational purposes ONLY. Scanning assets without explicit permission is illegal.

Back to Email Security Tool
SMTP Header Authentication & Compliance

Email Authentication: DKIM (DomainKeys Identified Mail) Errors

Technical diagnostics, syntax checks, common SPF/DKIM/DMARC resolution steps, and phishing mitigation guidelines.

BEC & Phishing Exposure: Critical

Without aligned and valid SPF, DKIM, and DMARC enforcement records, mail providers will mark your outbound messages as spam, and attackers can spoof your corporate headers to target clients.

Audit Email Security Settings

What is DKIM?

DomainKeys Identified Mail (DKIM) is an email authentication protocol that adds a cryptographic signature to the header of outbound email messages. The sending mail server signs the message using its private key, and the receiving mail server verifies the signature using the sender's public key published as a DNS TXT record at a specific subdomain location called a "selector".

Common DKIM Errors and Implementation Failures

  • Selector Mismatches: If the sending server signs the email using selector 's1' but the DNS public key is published under selector 's2', the receiver cannot locate the public key, causing DKIM validation to fail.
  • Weak Cryptographic Keys (512 or 1024-bit): Threat actors can crack 512-bit and 1024-bit RSA keys using public cloud resources. Modern email standards require at least 2048-bit keys to pass security audits.
  • Body Hash Mismatches: This occurs if intermediate mail relays, auto-forwarders, or spam filters alter the email's body layout, line endings, or headers in transit, invalidating the signature.
  • Syntax Errors in DNS Records: Missing or incorrect tags in the public key TXT record (such as incorrect k=rsa or p= values).

Security Consequences of DKIM Vulnerabilities

  • Tampering in Transit: Lacking DKIM makes it easy for attackers to alter email contents or inject malicious attachments in transit without the recipient knowing.
  • Phishing Susceptibility: Without DKIM validation, receivers cannot confirm the integrity of the email header, making it easier for spoofed emails to pass basic spam checks.

How to Fix DKIM Failures

1. Upgrade to 2048-bit Keys: Generate new DKIM key pairs with 2048-bit length. Update your DNS TXT records and configure your sending mail server to use the new keys.

2. Review DKIM Selectors: Match the selector specified in your email headers (e.g., s=selectorName) with the DNS subdomain name (e.g., selectorName._domainkey.example.com).

3. Configure Canonicalization Policies: Use 'relaxed' canonicalization headers (e.g., c=relaxed/relaxed) to allow minor header formatting changes in transit without breaking the cryptographic signature.

Frequently Asked Questions

What is a DKIM selector?

A unique string used to identify the specific public key in a domain's DNS records, allowing organizations to use multiple mail providers.

Why does my DKIM fail check despite having a DNS record?

Common causes include selector mismatches, key typos, or modifications to the email body by intermediate relays.

What is the recommended key length for DKIM?

Strong security standards require 2048-bit keys. 1024-bit keys are increasingly vulnerable to factorization, and 512-bit keys are deprecated.

How do I check if my outbound emails are DKIM signed?

You can send an email to a test service or check the email's raw headers for the `DKIM-Signature` block.

Does DKIM check the sender IP address?

No. Unlike SPF, DKIM does not check the sender IP address. It relies entirely on cryptographic signature verification.