Why is Mimecast causing DKIM body hash failures?

Summary

Mimecast DKIM body hash failures are caused by a confluence of factors. Predominantly, Mimecast's content modification practices, including URL rewriting, adding footers/disclaimers, HTML to plain text conversion, and security scanning, invalidate DKIM signatures. Encoding discrepancies (MIME, character sets), potential issues with Mimecast's DKIM library, and incorrect Mimecast settings (DKIM verification, quarantine) also contribute. Proper signing practices and issues with ARC handling are other considerations. Thorough testing, configuration review, and contacting Mimecast support are recommended.

Key findings

  • Content Modification: Mimecast's content alterations (URL rewriting, footers, etc.) break DKIM signatures.
  • Encoding Issues: MIME and character encoding differences between sender and Mimecast cause DKIM failures.
  • Configuration: Incorrect Mimecast configuration settings (DKIM, quarantine) cause false positives.
  • Signing Practices: Incorrect signing process or early signing can affect the outcome.
  • DKIM Library: Potentially flawed DKIM Library may cause failures

Key considerations

  • Minimize Content Changes: Configure Mimecast to reduce alterations to email content post-DKIM signing.
  • Encoding Consistency: Ensure sender and Mimecast use consistent MIME and character encoding.
  • Configuration Review: Verify correct Mimecast settings for DKIM verification, quarantine, and policies.
  • Testing & Support: Test thoroughly and engage Mimecast support for specific troubleshooting.
  • Signing Best Practices: Sign message last to avoid tampering.

What email marketers say
10Marketer opinions

Mimecast DKIM body hash failures often stem from Mimecast altering email content after the DKIM signature has been applied. This can occur due to various factors, including MIME encoding differences, URL rewriting for tracking, addition of footers or disclaimers, incorrect character encoding conversions (e.g., UTF-8 to ASCII), issues with ARC signature handling, content modification for security scanning, and misconfigured DKIM verification settings. Addressing these issues requires careful configuration, testing, and collaboration with Mimecast support.

Key opinions

  • Content Alteration: Mimecast modifies email content (URL rewriting, footers, disclaimers, content conversion), invalidating the DKIM signature.
  • Encoding Issues: MIME encoding differences (line endings, character sets) between the sender and Mimecast can alter the body hash.
  • Configuration Problems: Incorrect Mimecast settings (DKIM verification, quarantine, policies) can lead to DKIM failures.
  • Security Scanning: Content manipulation for phishing/malware scanning can inadvertently break DKIM.
  • ARC Handling: Improper handling of ARC signatures during forwarding can impact DKIM verification.

Key considerations

  • Configuration Review: Carefully review and adjust Mimecast's configuration settings to minimize content alteration and ensure proper DKIM verification.
  • Encoding Standardization: Ensure consistent MIME encoding (character sets, line endings) between your systems and Mimecast.
  • Testing: Thoroughly test email flows with Mimecast enabled to identify specific causes of DKIM failures.
  • Mimecast Support: Collaborate with Mimecast support to troubleshoot issues and obtain guidance on best practices.
  • Quarantine Review: Monitor and adjust Mimecast's quarantine settings to prevent false positives due to DKIM failures.
Marketer view

Email marketer from MXToolbox suggests that Mimecast's handling of ARC (Authenticated Received Chain) signatures, when forwarding mail can sometimes cause problems. If Mimecast isn't properly preserving ARC signatures, it can impact DKIM verification.

July 2023 - MXToolbox
Marketer view

Email marketer from Stack Overflow suggests that differences in MIME encoding between the sender and Mimecast could lead to DKIM failures. Specifically, different line endings or character encodings can alter the body hash.

December 2023 - Stack Overflow
Marketer view

Email marketer from Email Testing Blog advises contacting Mimecast support to perform thorough testing and troubleshooting. They can help identify the specific causes of DKIM failures and provide guidance on resolving the issue.

August 2022 - Email Testing Blog
Marketer view

Email marketer from Reddit suggests that Mimecast's URL rewriting feature, which replaces original URLs with Mimecast's tracking URLs, might be the cause of DKIM failures. This is because rewriting the URL changes the email body, thus invalidating the DKIM signature.

January 2025 - Reddit
Marketer view

Email marketer from Email Deliverability Blog states that Mimecast, like many security appliances, may modify email content for security purposes. Actions like adding disclaimers, converting HTML to plain text, or removing active content can alter the message body, thus causing DKIM to fail. It's crucial to understand these potential changes and configure Mimecast to minimize impact on DKIM.

January 2022 - Email Deliverability Blog
Marketer view

Email marketer from Super User explains that incorrect character encoding by Mimecast can alter the email body and cause DKIM failures. Specifically, if an email is sent in UTF-8 and Mimecast converts it to ASCII, this can break the DKIM signature.

December 2023 - Super User
Marketer view

Email marketer from Email Security Tips recommends reviewing Mimecast's quarantine settings to ensure that legitimate emails are not being quarantined due to DKIM failures. Incorrect quarantine settings can lead to false positives and impact email delivery.

June 2021 - Email Security Tips
Marketer view

Email marketer from EmailGeeks Forum mentions that Mimecast sometimes adds footers to emails for branding or compliance purposes. If these footers are added after the DKIM signature is calculated, it will cause a DKIM failure.

February 2023 - EmailGeeks Forum
Marketer view

Email marketer from Email Marketing Community mentions that Mimecast could be manipulating the email content to scan for phishing attempts or malware, inadvertently causing DKIM failures. This is often due to how the content is altered during the scanning process.

June 2024 - Email Marketing Community
Marketer view

Email marketer from Tech Support Forum advises checking Mimecast's configuration settings to ensure that DKIM verification is properly enabled and configured. Incorrect settings or misconfigured policies can lead to DKIM failures, even if the email is properly signed by the sender.

March 2021 - Tech Support Forum

What the experts say
3Expert opinions

Mimecast DKIM body hash failures are often caused by Mimecast modifying email content. This can be due to URL rewriting, adding footers/disclaimers, or converting HTML to plain text, which invalidates the DKIM signature. It's also possible Mimecast uses the same DKIM library with inherent flaws causing failures.

Key opinions

  • Content Modification: Mimecast modifies email content (URL rewriting, footers, disclaimers, HTML conversion), leading to DKIM signature invalidation.
  • Shared DKIM Library: Mimecast may be using a DKIM library with internal failures that are causing generic DKIM failures

Key considerations

  • Minimize Content Changes: Configure Mimecast to minimize changes to email content to preserve the DKIM signature.
  • DKIM Library Investigation: Investigate the potential impact of the DKIM library being used and whether there is a different option.
Expert view

Expert from Word to the Wise, Laura Atkins, explains that Mimecast, being a security service, often modifies email content, which can inadvertently cause DKIM body hash failures. This includes actions such as URL rewriting, adding footers or disclaimers, or converting HTML to plain text. These alterations change the message body, invalidating the DKIM signature.

May 2021 - Word to the Wise
Expert view

Expert from Word to the Wise, Laura Atkins, explains that the most likely cause of a DKIM failure is because the body hash did not verify because the email was altered. Mimecast will at times alter the body of an email and this will lead to DKIM failure.

December 2024 - Word to the Wise
Expert view

Expert from Email Geeks shares that their internal tool was showing a lot of DKIM failures recently, even on generic mail. They ended up switching DKIM libraries which could be the cause of Mimecast's issues if they are using the same library.

May 2022 - Email Geeks

What the documentation says
5Technical articles

DKIM failures in Mimecast are primarily due to content modifications occurring after the DKIM signature is applied. These modifications, which include adding disclaimers, removing attachments, converting formats, or altering whitespace and character encoding, invalidate the original signature. Different DKIM implementations handling body hash calculations differently can also contribute to these failures. Ensuring messages are signed as the final step, after all processing is complete, is crucial to prevent tampering and maintain DKIM validity.

Key findings

  • Content Modification Invalidation: Any modification to the email body after DKIM signing will cause the DKIM verification to fail. This includes changes to whitespace, line endings, or character encoding.
  • Implementation Differences: Different DKIM implementations handle body hash calculations differently, leading to potential verification issues between sender and receiver.
  • Post-Processing Changes: Actions like adding disclaimers, removing attachments, or converting formats after signing invalidate the signature.
  • Signing Order: Signing messages as the last step ensures integrity.

Key considerations

  • Minimize Content Alterations: Configure systems, including Mimecast, to minimize changes to email content after DKIM signing.
  • Standardize Implementations: Ensure consistent DKIM implementations across sender and receiver to reduce hashing discrepancies.
  • Signing Last: Message should be signed as the last step to avoid tampered data.
Technical article

Documentation from OpenDKIM explains that different DKIM implementations might handle body hash calculations differently (e.g., using different canonicalization algorithms or handling whitespace in different ways). This can lead to DKIM failures if the sender and Mimecast are using different implementations.

March 2022 - OpenDKIM.org
Technical article

Documentation from Mimecast explains that if Mimecast modifies the content of an email during processing (e.g., adding a disclaimer, removing attachments, or converting the format), it can cause the DKIM signature to fail verification. This is because the DKIM signature is calculated based on the original content of the email, and any changes will invalidate the signature.

March 2022 - Mimecast
Technical article

Documentation from RFC 6376 (DKIM specification) clarifies that any modification to the email body after DKIM signing will cause the DKIM verification to fail. This includes changes to whitespace, line endings, or character encoding.

July 2024 - RFC Editor
Technical article

Documentation from DKIM.org explains DKIM signatures are based on the email header and body, which can be broken if the body is changed in transit. Any modifications to the body will result in a DKIM verification failure.

September 2022 - DKIM.org
Technical article

Documentation from Authlogic explains message signing practices, by making sure that message signing is done as one of the last steps to avoid tampering.

May 2021 - Authlogic