Suped

How do I fix DKIM failing body hash verification?

Matthew Whittaker profile picture
Matthew Whittaker
Co-founder & CTO, Suped
Published 14 Jun 2025
Updated 16 Aug 2025
7 min read
When you encounter a "DKIM failing body hash verification" error, it means the recipient's email server (like Microsoft Outlook) could not verify the integrity of your email's content. DKIM (DomainKeys Identified Mail) uses cryptographic signatures to ensure that an email has not been tampered with in transit. This specific failure indicates that the hash (or digital fingerprint) of the email body calculated by the recipient's server does not match the hash value recorded in the DKIM signature by the sending server. This mismatch signals potential alteration or a misconfiguration, leading to authentication failure and potentially affecting your email's deliverability, often causing it to land in the spam or junk folder.
While DKIM body hash failures can be frustrating, understanding the underlying causes is the first step towards a resolution. These issues directly impact your sender reputation and can lead to emails being blocked or placed on a blacklist (or blocklist). Ensuring proper DKIM authentication is crucial for maintaining good deliverability and avoiding a compromised domain reputation.
This guide outlines the common reasons for DKIM body hash verification failures and provides actionable steps to diagnose and fix them, helping you ensure your emails reach their intended inboxes.
Suped DMARC monitoring
Free forever, no credit card required
Learn more
Trusted by teams securing millions of inboxes
Company logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logo

Common causes of DKIM body hash failures

The "body hash did not verify" error fundamentally means that the email's content changed after it was signed by your server, or that the signing process itself was flawed. This can happen for several reasons, often involving intermediate systems or incorrect configurations.
One of the most frequent culprits is message modification in transit. Email gateways, spam filters, archiving systems, or even email forwarding services can sometimes alter an email's body, even subtly. This includes adding disclaimers, footers, tracking pixels, or re-encoding characters. Even a single character change, like an added newline or a modification to character encoding, will cause the computed hash to differ from the one in the DKIM signature, leading to failure.
Another significant cause is an issue with the sending server's DKIM configuration or the keys themselves. This could be an incorrect private key used for signing, a public key that does not match the private key or is improperly published in DNS, or even issues with how the mail transfer agent (MTA) handles character encoding. If the email is signed with an incorrect key, or if the encoding used during signing differs from the recipient's interpretation, the hash verification will fail.

Common problems

  1. Email gateways: Inserting footers, disclaimers, or modifying content as emails pass through.
  2. Forwarding services: Some services alter email headers or bodies, breaking the signature.
  3. Encoding issues: Inconsistent character encoding (e.g., UTF-8 with BOM) between sender and receiver.
  4. Bounced or forwarded messages: Automated replies or forwarding often modify the original message.

Diagnosing the problem

Diagnosing a DKIM body hash verification failure requires a systematic approach. The first step is to examine the email's raw headers, specifically the Authentication-Results header. This header will explicitly state dkim=fail (body hash did not verify) or dkim=neutral with a similar diagnostic message. You can often access these headers through your email client's view source or show original option.
Next, send identical test emails to various major providers. A good starting point is Google Gmail and Microsoft Outlook. If DKIM passes on one (e.g., Gmail) but fails on another (e.g., Outlook), it might point to a specific encoding or processing difference by the problematic recipient's server. However, if DKIM fails across multiple major providers, it strongly suggests an issue with your sending system's DKIM signing process or your DKIM DNS record.
Finally, verify your DKIM DNS record. Ensure the public key published in your DNS matches the private key your sending server uses to sign emails. Any mismatch, including subtle copy-paste errors or extra spaces in the DNS TXT record, will lead to verification failures. You can use an online email testing tool to check your DKIM record's validity.

Steps to fix body hash verification issues

Once you've diagnosed the likely cause, you can take targeted steps to fix the DKIM body hash verification issue. The specific solution depends on whether the problem lies with your sending system, message transit, or key management.
If you suspect message modification in transit, identify any intermediate systems that process your outbound emails, such as email gateways, spam filters, or archiving solutions. Many of these systems have options to bypass DKIM signing or to sign the email themselves after making modifications. Configure them not to alter the email body or to re-sign the email after any changes. If you are using a third-party email service provider, confirm with them how they handle DKIM signing and whether they introduce any modifications.
For issues related to your sending system or keys, consider regenerating your DKIM public and private key pair. This ensures that you have a fresh, correctly generated set of keys. After regeneration, ensure the new public key is properly published in your domain's DNS as a TXT record. Double-check for any extraneous characters or incorrect formatting during the DNS update. Also, review your mail server's configuration (e.g., Postfix with OpenDKIM) to ensure it's signing emails correctly and using the right canonicalization methods.

Solving key and content issues

  1. Regenerate keys: Generate a new DKIM public and private key pair for your domain.
  2. Update DNS: Publish the new public key as a TXT record in your DNS.
  3. Check encoding: Ensure consistent character encoding (e.g., UTF-8 without BOM) in your email content and sending system.
  4. Review MTA configuration: Confirm your mail server signs emails correctly and doesn't alter the body post-signing.

Preventing future issues

Preventing future DKIM body hash failures is about maintaining a robust email sending infrastructure and adhering to best practices. Regular monitoring of your email authentication results, particularly for DKIM, is essential. This can be done through DMARC reports, which provide aggregate data on DKIM authentication success and failure rates. Consistent monitoring helps you catch issues early, before they significantly impact deliverability or lead to your domain being put on a blocklist.
Another crucial preventative measure is to minimize any post-signing modifications to your email content. Review all systems in your email sending chain, from your application to your MTA and any intermediate gateways (e.g., Mimecast), to ensure they do not introduce changes after the DKIM signature is applied. If modifications are unavoidable, configure these systems to re-sign the email with DKIM after their alterations. This ensures the final message matches the signature.
Finally, ensure your email sending infrastructure uses consistent and widely supported character encodings, such as UTF-8, and avoids features that might lead to subtle changes (like Byte Order Marks or non-standard line endings). Keeping your mail servers and email sending applications updated also helps, as newer versions often include improvements in DKIM handling and compliance with email standards.

Aspect

Best practice for DKIM integrity

Email content
Avoid dynamic content, tracking pixels, or disclaimers that modify the body after initial signing.
MTA configuration
Ensure your MTA is configured to sign emails consistently and correctly, using standard canonicalization.
Intermediate systems
Configure email gateways or filters not to alter the body or to re-sign emails after modifications.
DNS records
Regularly verify your DKIM DNS TXT record for accuracy and propagation.

Views from the trenches

Best practices
Ensure your email sending system is using a consistent and standard character encoding, preferably UTF-8.
Regularly monitor your DMARC reports to identify any ongoing DKIM authentication failures.
Before deploying changes, test your email sending flow with a controlled environment to catch issues.
If using third-party email gateways or services, confirm their impact on DKIM signing.
Common pitfalls
Forgetting to regenerate and update the public DNS record when changing DKIM private keys.
Ignoring subtle alterations by intermediate email processing systems, such as footers or disclaimers.
Assuming DKIM is correctly configured simply because the DNS record exists, without testing.
Using non-standard or inconsistent character encodings across your email campaigns.
Expert tips
If DKIM fails at Microsoft but passes at Gmail, the issue is likely text encoding or Microsoft's system.
If DKIM fails at both Gmail and Outlook, your DKIM signer is likely broken or the message modified in transit.
Always regenerate your public/private key pair as a first troubleshooting step for signing issues.
Use Google as a benchmark for correct email authentication results, as their system is robust.
Expert view
Expert from Email Geeks says if a message passes DKIM at Gmail but not Outlook, the problem is likely with the text encoding in the message and how Microsoft's system processes the body hash. This requires adjusting the encoding at the outbound MTA.
2022-11-18 - Email Geeks
Expert view
Expert from Email Geeks says if DKIM body hash verification fails for both Gmail and Outlook, it indicates that the DKIM signer is broken or the message is being modified in transit before reaching the recipient.
2022-11-18 - Email Geeks

Conclusion

Resolving DKIM failing body hash verification is essential for maintaining email deliverability and sender reputation. This error, signifying a mismatch between the email body's signed hash and the recipient's calculated hash, often stems from message modifications in transit or issues with the DKIM keys or signing process.
By diligently checking your email headers, testing across different email providers (especially gmail.com logoGmail), and ensuring your DKIM records are accurately published, you can pinpoint the root cause. Implementing solutions like regenerating keys, adjusting MTA configurations, and configuring intermediate systems to avoid post-signing alterations are critical. Consistent monitoring of email authentication reports will help prevent these issues from recurring, ensuring your emails reach the inbox reliably.

Frequently asked questions

DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard

What you'll get with Suped

Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing