Why does Gmail show DKIM failing when it actually passes?

Summary

Gmail may incorrectly show DKIM as failing even when it passes due to various factors. A key issue is DKIM alignment, where the DKIM signing domain doesn't perfectly match the 'From' domain, crucial for DMARC. Gmail's reporting interface can also be buggy, incorrectly indicating failures. Modifications by intermediate servers after DKIM signing can invalidate signatures. Temporary DNS issues, subdomain misconfigurations, and forwarding practices can also lead to false negatives. Even with valid DKIM, Gmail considers sender reputation, SPF configuration, and applies additional filters based on content and user feedback. In some instances, it could be a temporary Google issue.

Key findings

  • DKIM Alignment: Mismatch between DKIM signing domain and 'From' domain causes DMARC failures and can trigger false negatives in Gmail's DKIM reporting.
  • Gmail Reporting Bugs: Gmail's summary table may incorrectly report DKIM failures due to internal bugs or imperfect PSL-based alignment checks.
  • Message Alteration: Intermediate servers rewriting email content after DKIM signing invalidate the signature.
  • DNS Resolution Issues: Temporary inability to resolve DNS records for the DKIM signing domain causes intermittent failures.
  • Subdomain Misconfiguration: DKIM records set on subdomains, when the email is sent from the main domain, causes DKIM failures.
  • Reputation Matters: Even with valid DKIM, poor sender reputation can lead to Gmail flagging the email.
  • Google Blips: Sometimes, the issue is a temporary bug on Google's end which is resolved with time.

Key considerations

  • Check Alignment: Verify DKIM signing domain aligns closely with 'From' domain for DMARC compliance.
  • Inspect Headers: Examine Authentication-Results header to understand if its an alignment issue or true DKIM failure.
  • Monitor Servers: Investigate if any intermediate servers modify email content after DKIM signing.
  • Verify DNS: Ensure DNS resolution for DKIM records is consistent and reliable.
  • Review SPF: Ensure SPF configuration is correctly implemented as it can affect DKIM scrutiny.
  • Manage Reputation: Maintain a positive sender reputation through responsible email marketing practices.
  • Acknowledge Bugs: If no technical issues are identified, it's possible it is a Google error which will eventually be resolved.

What email marketers say
11Marketer opinions

Gmail may show DKIM as failing even when the DKIM check itself passes due to several reasons. These include alignment issues where the DKIM signing domain doesn't match the 'From' domain, intermediate servers modifying the message after signing, temporary DNS resolution problems, incorrect subdomain configurations, and DMARC policy settings. Additionally, even with passing DKIM, Gmail might still flag the email based on sender reputation, SPF configuration, or internal Gmail checks.

Key opinions

  • Alignment Issues: Gmail may show DKIM failures if the DKIM signing domain does not align with the 'From' domain, even if the DKIM signature itself is valid.
  • Intermediate Server Modification: Changes made by intermediate servers after the DKIM signature is applied can invalidate the signature, leading to a DKIM failure at the receiving end.
  • Temporary DNS Problems: Temporary DNS resolution issues can prevent Gmail from verifying DKIM records, causing intermittent DKIM failures.
  • Subdomain Mismatch: If the DKIM record is set up on a subdomain but the email is sent from the main domain, this can cause alignment issues and DKIM failures.
  • DMARC Policy: Strict DMARC policies (p=quarantine or p=reject) combined with DKIM alignment failures can lead to Gmail quarantining or rejecting emails, displaying a DKIM failure message.
  • Sender Reputation: Even with valid DKIM, poor sender reputation can cause Gmail to flag the email.
  • Gmail Bugs: Gmail might incorrectly report DKIM as failing due to bugs, and fixes might be rolled out gradually.

Key considerations

  • Check DKIM Alignment: Ensure the DKIM signing domain aligns with the 'From' domain to pass DMARC checks.
  • Inspect Intermediate Servers: Identify any intermediate servers that might be modifying the email content after DKIM signing.
  • Monitor DNS Resolution: Monitor DNS resolution to ensure Gmail can consistently verify DKIM records.
  • Verify Subdomain Configuration: Ensure the DKIM record is correctly configured for the sending domain or subdomain.
  • Review DMARC Policy: Review DMARC policy to align with DKIM setup and avoid unintended quarantining or rejection of emails.
  • Maintain Sender Reputation: Focus on maintaining a good sender reputation through responsible email practices.
  • Check SPF Configuration: Ensure SPF is also correctly configured, as problems with SPF can sometimes lead to DKIM being scrutinized more closely by Gmail.
Marketer view

Email marketer from AuthSMTP explains Ensure that SPF (Sender Policy Framework) is also correctly configured. Problems with SPF can sometimes lead to DKIM being scrutinized more closely by Gmail. A comprehensive authentication setup including both SPF and DKIM is crucial.

September 2023 - AuthSMTP
Marketer view

Email marketer from DigitalOcean shares that a passing DKIM is not enough. Even with valid DKIM, if the sending IP address or domain has a poor reputation, Gmail might still flag the email. Maintaining a good sender reputation is essential for deliverability.

May 2021 - DigitalOcean
Marketer view

Email marketer from Reddit user shares that problems might arise when email forwarders change the message. Forwarding can modify the message headers or body, breaking the DKIM signature. The user suggests checking if the issue occurs specifically with forwarded emails.

July 2024 - Reddit
Marketer view

Email marketer from MXToolbox states that even if DKIM passes, DMARC can still fail if DKIM alignment isn't met. They suggest ensuring that the DKIM signing domain aligns with the From domain for DMARC to pass, which can influence how Gmail treats the email.

September 2023 - MXToolbox
Marketer view

Email marketer from Email Geeks suggests a gmail / google blip as DKIM is now passing as it previously did before inexplicably starting to fail.

July 2023 - Email Geeks
Marketer view

Email marketer from Superuser shares If the DKIM record is set up on a subdomain (e.g., `s1.example.com`), but the email is sent from the main domain (`example.com`), this might cause alignment issues. Ensures that the DKIM signing domain matches the sending domain.

January 2022 - Superuser
Marketer view

Email marketer from StackExchange discusses that there could be intermediate servers modifying the message content after the DKIM signature is applied. Even if the initial DKIM check passes, changes to the message body can invalidate the signature, leading to a DKIM failure at the receiving end.

January 2023 - StackExchange
Marketer view

Email marketer from EmailOnAcid explains that temporary DNS resolution issues can cause DKIM to fail intermittently. If Gmail can't properly resolve the DKIM signing domain's DNS records at the time of verification, it may incorrectly report a DKIM failure.

February 2025 - EmailOnAcid
Marketer view

Email marketer from EasyDMARC explains that If your DMARC policy is set to `p=quarantine` or `p=reject`, and DKIM fails alignment, Gmail might quarantine or reject the email, causing it to appear as a DKIM failure. Review the DMARC policy to ensure it aligns with the DKIM setup.

March 2021 - EasyDMARC
Marketer view

Email marketer from Email Geeks confirms that this issue is fixed on some Gmail addresses, but not yet on all. It is thought that Gmail is rolling out a fix to this but doing so gradually.

November 2023 - Email Geeks
Marketer view

Email marketer from EmailVendorSelection mentions a common scenario where DKIM passes authentication but Gmail still displays a 'DKIM: FAIL' message in the header due to alignment issues. Even if the DKIM signature is valid, if the domain used to sign the email (DKIM domain) doesn't match the domain in the 'From' address, Gmail may show a failure, even though the DKIM check itself passed.

October 2022 - EmailVendorSelection

What the experts say
6Expert opinions

Gmail sometimes incorrectly reports DKIM failures even when the DKIM signature is valid. This often stems from DKIM alignment issues, where the DKIM signing domain doesn't perfectly match the 'From' domain. Additionally, bugs in Gmail's reporting, especially in the summary table, can lead to false DKIM failure indications. Intermediate servers modifying the email content after DKIM signing can also invalidate the signature. However, during the SMTP session google may have correctly identified the mail as aligned and passing.

Key opinions

  • DKIM Alignment: Gmail reports DKIM failures when the DKIM signing domain doesn't align with the 'From' domain, even if the signature is valid.
  • Gmail Reporting Bugs: Bugs in Gmail's summary table can cause incorrect DKIM failure reports, particularly with alignment checks.
  • Intermediate Server Modification: Intermediate servers rewriting email content after DKIM signing can invalidate the signature.
  • Header reporting is buggy: Gmail may report the mail as passing/aligned during the SMTP session, but the summary header may show failure.

Key considerations

  • Verify DKIM Alignment: Ensure the DKIM signing domain closely aligns with the 'From' domain.
  • Ignore Gmail Summary Table: If DKIM is actually passing during the SMTP session, the summary table in gmail may be incorrect.
  • Inspect Email Rewriting: Check for any intermediate servers that might be rewriting the email content after DKIM signing.
Expert view

Expert from Email Geeks explains that while Gmail is technically correct that it's not aligned in a strict sense, the new code appears buggy and is reporting incorrectly.

March 2024 - Email Geeks
Expert view

Expert from Spamresource.com explains that even if DKIM passes initially, some intermediate servers could be rewriting parts of the email (including headers) thus invalidating DKIM. For example, adding a disclaimer or footer after DKIM signing can invalidate the signature. They advise checking if there are any servers rewriting the email after it’s signed.

September 2021 - Spamresource.com
Expert view

Expert from Email Geeks explains that Gmail is reporting DKIM failures even when DKIM actually passes, specifically when the DKIM domain doesn't align with the 5322.from domain. This reporting is arguably wrong, as the DKIM signature is verified and passing.

December 2023 - Email Geeks
Expert view

Expert from Email Geeks indicates that the issue is likely a bug in the formatted version headers that Google shows users, and that Google seems to be correctly identifying the mail as aligned and passing during the SMTP session.

December 2024 - Email Geeks
Expert view

Expert from Email Geeks mentions there seems to be a bug in Gmail's summary table regarding alignment checks, sometimes incorrectly claiming things aren't aligned when they are, and it looks like it’s not doing proper PSL based alignment checks, rather it’s checking suffixes (and getting it wrong).

August 2023 - Email Geeks
Expert view

Expert from Email Geeks states that Gmail's summary table is unreliable and asks if there are any actual delivery issues. He confirms the table shows DKIM misalignment when it's actually aligned.

September 2021 - Email Geeks

What the documentation says
4Technical articles

Even when DKIM passes, meaning a legitimate sender signed the message and the signature was verified, Gmail might still show DKIM as failing due to several factors. These include DKIM alignment issues, where the signing domain doesn't match the 'From' domain, leading to DMARC failures. Additionally, alterations to the email's headers or body in transit can invalidate the DKIM signature. Some email systems like Gmail apply extra checks based on content, sender reputation, or user feedback, potentially flagging emails despite a passing DKIM.

Key findings

  • DKIM Pass Definition: A 'pass' result for DKIM indicates the message was signed by a legitimate sender and the signature was verified.
  • DKIM Alignment Importance: DKIM alignment, the degree to which the signing domain matches the 'From' domain, is crucial for passing DMARC authentication.
  • In-Transit Alterations: Modifications to the email's headers or body after DKIM signing can invalidate the signature.
  • Additional Checks by Gmail: Gmail uses factors beyond DKIM, such as content, sender reputation, and user feedback, to filter emails.

Key considerations

  • Ensure DKIM Alignment: Focus on aligning the DKIM signing domain with the 'From' domain to satisfy DMARC requirements.
  • Monitor for Alterations: Check for any modifications to the email content that might occur after DKIM signing.
  • Maintain Sender Reputation: Pay attention to factors like content quality and sender reputation, as these influence how Gmail filters emails.
Technical article

Documentation from Google Workspace Admin Help explains that the Authentication-Results header shows the results of SPF, DKIM, and DMARC checks. A 'pass' result for DKIM means the message was signed by a legitimate sender and the signature was verified.

October 2024 - Google Workspace Admin Help
Technical article

Documentation from dmarcian explains that DKIM alignment refers to how well the domain used to sign the email matches the domain in the 'From' address. DMARC requires either SPF or DKIM to align with the From domain for the message to pass DMARC authentication. If DKIM passes but doesn't align, DMARC might still fail.

January 2025 - dmarcian
Technical article

Documentation from Microsoft mentions Some email systems, including Gmail, apply additional checks and filters beyond DKIM verification. These systems may flag an email even if DKIM passes due to other factors like content, sender reputation, or user feedback.

November 2022 - Microsoft
Technical article

Documentation from RFC 6376, which defines DKIM, specifies that a DKIM signature covers certain parts of the message, including headers and body. If any of these covered parts are altered in transit, the DKIM signature will fail to verify, even if it initially passed.

November 2021 - RFC Editor