How do I interpret SpamAssassin DKIM test results and troubleshoot DKIM signature issues?

Summary

Interpreting SpamAssassin DKIM test results and troubleshooting signature issues requires a multifaceted approach, encompassing DNS configuration checks, signature validation using tools, domain alignment verification, and awareness of potential issues like DNS propagation delays, TXT record length limits, and canonicalization algorithm errors. Additionally, factors external to DKIM, such as sender reputation and email forwarding, can significantly impact deliverability. Using manual testing and preview tools aids in identifying root causes.

Key findings

  • SpamAssassin Tests: The `DKIM_SIGNED` test indicates a DKIM signature is present, while `DKIM_INVALID_DKIM` signifies an invalid signature.
  • DNS Configuration: Incorrect DNS settings (typos, selector issues) are a common cause. Verify DKIM TXT records against signing keys.
  • Domain Alignment: DKIM requires the signing domain to align with the 'From' header domain.
  • Transit Issues: Modifications to email content during transit invalidate DKIM signatures.
  • DNS Propagation: Ensure full DNS propagation; outdated information can cause failures.
  • Record Limits: DNS TXT record length limitations can truncate DKIM records, causing failures.
  • Key Size: Inadequate DKIM key sizes (less than 2048 bits recommended) can lead to failures.
  • DMARC Compliance: DKIM is crucial for DMARC alignment and achieving 'Pass' results.
  • Sender Reputation: Poor sender reputation can negatively impact deliverability, independent of DKIM.
  • Canonicalization: Incorrect canonicalization algorithms can invalidate the DKIM signature.
  • DNS resolution failures: Temporary DNS resolution issues may cause verification failures.

Key considerations

  • Use Analysis Tools: Employ tools like aboutmy.email and MXToolbox to identify and validate DKIM signatures and DNS records.
  • Inspect Headers: Utilize preview tools to inspect email headers and diagnose DKIM issues.
  • Manual Testing: Use OpenDKIM tools for manual signing and verification to isolate problems.
  • Monitor DNS: Regularly check DNS server status and network connectivity.
  • Review Algorithms: Ensure correct header and body canonicalization methods are employed.
  • Maintain Reputation: Adhere to email best practices to maintain a positive sender reputation.
  • DKIM record syntax: Ensure the DKIM record itself has correct syntax and proper selectors.

What email marketers say
8Marketer opinions

Interpreting SpamAssassin DKIM test results and troubleshooting DKIM signature issues involves verifying DNS configuration, ensuring proper domain alignment, checking for DNS propagation issues, using DKIM record lookup tools, and addressing limitations related to TXT record length and key size. Email forwarding and modifications during transit can also invalidate DKIM signatures. Analyzing email headers and using preview tools can aid in diagnosing the root cause.

Key opinions

  • DNS Configuration: Incorrect DNS settings (typos, selector issues) are a common cause of DKIM failures. Verify the DKIM TXT record against the signing key.
  • Forwarding Invalidation: Email forwarding can alter headers, invalidating the DKIM signature.
  • DNS Propagation: Ensure the DKIM record is fully propagated across all DNS servers.
  • Domain Alignment: DKIM requires the signing domain to align with the domain in the 'From' header.
  • Record Limitations: DNS providers may impose limitations on TXT record length, potentially truncating DKIM records. Consider splitting the record if possible.
  • Key Size: Insufficient DKIM key sizes (less than 1024 bits) can lead to failures. Use a key size of at least 2048 bits.

Key considerations

  • Use Lookup Tools: Employ tools like MXToolbox to identify errors in the DKIM record's syntax.
  • Analyze Headers: Use preview tools to inspect email headers and troubleshoot DKIM issues.
  • Transit Modification: Be aware that modifications to email content during transit can invalidate DKIM signatures.
Marketer view

Email marketer from EmailOnAcid describes that some DNS providers have limitations on the length of TXT records, potentially truncating the DKIM record and causing verification failures. Splitting the DKIM record into multiple TXT records (if supported by the DNS provider) can resolve this issue.

May 2021 - EmailOnAcid
Marketer view

Email marketer from GlockApps explains that using an insufficient DKIM key size (e.g., less than 1024 bits) can lead to DKIM failures. Using a key size of at least 2048 bits is recommended for better security and compliance with modern email standards.

November 2022 - GlockApps
Marketer view

Email marketer from Litmus shares that a previewing tool can display the headers that can be useful in troubleshooting DKIM issues. Sending test email to these tools can let you copy the headers, and inspect if the DKIM signature is valid.

February 2025 - Litmus
Marketer view

Email marketer from Reddit suggests that the DKIM record might not be fully propagated across all DNS servers. Even if it appears correct from your location, some servers might still have outdated information. Using online tools to check DKIM records from multiple locations can confirm full propagation.

October 2024 - Reddit
Marketer view

Email marketer from Stackoverflow highlights that an email being forwarded can invalidate the DKIM signature. The forwarding server might alter headers, causing the signature to no longer match the email's content. Checking if the email has been forwarded is crucial.

December 2021 - Stackoverflow
Marketer view

Email marketer from Mailhardener shares that a common issue is incorrect DNS configuration, leading to failed DKIM checks. This includes typos in the TXT record, incorrect selector usage, or problems with the public key itself. Suggests verifying the DNS record and comparing it to the key used for signing.

April 2022 - Mailhardener
Marketer view

Email marketer from MXToolbox explains that using the MXToolbox DKIM record lookup tool can help identify common errors in the DKIM record, such as incorrect syntax or invalid characters. Copying the DKIM selector and domain into the tool will confirm it is valid.

January 2023 - MXToolbox
Marketer view

Email marketer from Postmark shares that failing domain alignment can cause DKIM failures. DKIM passes only if the domain in the 'From' header matches the domain used for signing. Ensuring proper alignment is crucial for passing DKIM checks.

January 2024 - Postmark

What the experts say
4Expert opinions

Interpreting SpamAssassin DKIM results and troubleshooting involves understanding the specific tests (DKIM_SIGNED vs DKIM_INVALID_DKIM), using tools to analyze signatures (like aboutmy.email), ensuring proper domain alignment between signing domain and From header, and recognizing that DKIM is crucial for DMARC compliance and overall deliverability. Failures can stem from record syntax errors or modifications during transit.

Key opinions

  • SpamAssassin Tests: `DKIM_SIGNED` indicates a DKIM signature header is present. `DKIM_INVALID_DKIM` signifies the signature is invalid.
  • Domain Alignment: DKIM signatures must align with the domain in the 'From' header for successful verification and DMARC compliance.
  • Transit Issues: Modifications to the message content during transit after signing can cause DKIM failures.
  • DMARC Dependence: DKIM plays a critical role in DMARC alignment, contributing to improved deliverability and authentication results.

Key considerations

  • Use Analysis Tools: Utilize tools like aboutmy.email to gain detailed insights into DKIM signature issues.
  • Check Record Syntax: Ensure the DKIM record itself has correct syntax and proper selectors.
Expert view

Expert from SpamResource explains that DKIM failures can occur if the signing domain does not match the domain in the From header, or if the message content is modified in transit after signing. It also notes that issues can arise from problems in the DKIM record itself, such as incorrect syntax or missing selectors.

July 2022 - SpamResource
Expert view

Expert from Word to the Wise highlights that DKIM is essential for DMARC alignment and achieving 'Pass' results. It emphasizes the importance of having a valid DKIM signature that aligns with the domain used in the 'From' header, in order to improve email deliverability and authentication.

July 2024 - Word to the Wise
Expert view

Expert from Email Geeks explains the DKIM SpamAssassin test. The `DKIM_SIGNED` rule means the email has a DKIM-Signature header. The `DKIM_INVALID_DKIM` rule means that the DKIM signature is not valid.

September 2021 - Email Geeks
Expert view

Expert from Email Geeks shares a tool to investigate DKIM issues. Suggests sending an email to aboutmy.email to get more information about the DKIM signature and a shareable link for further analysis.

January 2022 - Email Geeks

What the documentation says
5Technical articles

Interpreting SpamAssassin DKIM test results involves understanding that DKIM_SIGNED indicates a signature's presence, while DKIM_INVALID signals a validity problem. DNS resolution failures can cause transient issues. Manual testing with OpenDKIM tools can help isolate problems, and correct implementation of canonicalization algorithms is vital. Poor sender reputation, although not DKIM-specific, can still impact deliverability.

Key findings

  • SpamAssassin DKIM Tests: DKIM_SIGNED means a DKIM signature is present; DKIM_INVALID suggests it's not valid.
  • DNS Resolution: Temporary DNS issues can lead to DKIM verification failures.
  • Canonicalization: Incorrect canonicalization algorithms invalidate DKIM signatures.
  • Sender Reputation: Poor sender reputation can contribute to spam classification, regardless of DKIM status.

Key considerations

  • Manual Testing: Use OpenDKIM tools for manual signing and verification to isolate issues.
  • Monitor DNS: Check DNS server status and network connectivity.
  • Maintain Reputation: Employ good email practices to maintain a positive sender reputation.
Technical article

Documentation from RFC Editor shares that the wrong choice or implementation of DKIM canonicalization algorithms can invalidate the signature. The header and body canonicalization methods must be handled correctly during signing and verification.

September 2023 - RFC Editor
Technical article

Documentation from SpamAssassin Wiki explains that a DKIM_SIGNED test indicates the presence of a DKIM signature header. A DKIM_INVALID test (or similar) indicates a problem with the signature's validity. These tests alone do not guarantee spam classification but contribute to the overall score.

August 2021 - SpamAssassin Wiki
Technical article

Documentation from OpenDKIM Wiki shares using the OpenDKIM tools to perform manual DKIM signing and verification tests can help isolate the problem. This involves crafting test emails and using the command-line tools to sign and verify the DKIM signature. Looking at the verbose output provides detailed information about the signing and verification process.

March 2025 - OpenDKIM Wiki
Technical article

Documentation from GitHub explains that temporary DNS resolution failures can cause DKIM verification issues. Network connectivity problems or DNS server unavailability can lead to transient DKIM failures, which may resolve themselves. Checking DNS server status and network connectivity is important.

April 2024 - GitHub
Technical article

Documentation from ReturnPath shares that while it is not specific to DKIM, poor sender reputation may still send your emails to spam. Reputation is based on many things from spam complaints, email volume and more. Highlighting why good email practice is important.

October 2021 - ReturnPath