Suped

Does DKIM protect against email content changes after sending?

Yes, absolutely. The primary purpose of DKIM (DomainKeys Identified Mail) is to ensure that an email's content has not been tampered with in transit. It acts as a cryptographic seal, verifying both the sender's identity and the integrity of the message itself.

When an email is sent with DKIM enabled, the sending mail server generates a unique digital signature. This signature is a complex, encrypted hash created from specific parts of the email, including selected headers and the body of the message. The signature is then added to the email as a hidden header.

www.fortinet.com logo
Fortinet says:
Visit website
it also validates that mail content has not changed since being sent by the server.

When a receiving mail server gets the email, it performs a DNS lookup to retrieve the public key associated with the sender's domain. It then uses this public key to decrypt the signature and recalculates its own hash of the email's content. If the two hashes match, the server can be confident that the email is authentic and hasn't been altered. If they don't match, it's a clear signal that something has changed, and the email fails the DKIM check.

Suped DMARC monitor
Free forever, no credit card required
Get started for free
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 logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logo

How does DKIM protect the content?

The magic of DKIM lies in its use of asymmetric cryptography. It creates a signature that is directly tied to the content of the message. This validates the sender's identity and confirms the message hasn't been modified.

www.mailmodo.com logo
Mailmodo says:
Visit website
DomainKeys Identified Mail (DKIM) is an email security standard that ensures messages are not modified while travelling between the recipient and sending servers.

The signature itself contains several important tags:

  • The bh= tag: This is the body hash. It's a hash of the entire email body, from the first character to the last. Any change, no matter how small, will cause this hash to be different, leading to DKIM failure.
  • The h= tag: This tag lists the specific headers that have been included in the signature calculation, such as the 'From', 'To', 'Subject', and 'Date' headers. This prevents an attacker from altering these critical headers without invalidating the signature.

Since the whole point of DKIM is to confirm the authenticity of the email's content, even tiny, seemingly insignificant changes made during transit can cause the validation to fail. This is a feature, not a bug; it shows the system is working as intended.

Are there limitations?

While DKIM is incredibly effective, it's not foolproof on its own, and some things can cause it to break legitimately. For instance, if an email is forwarded through a mailing list server that adds a footer (like an unsubscribe link) to the bottom of every message, this modification will change the email body. This change breaks the original DKIM signature because the body hash no longer matches.

www.quora.com logo
Quora says:
Visit website
Intermediate relays destroy SPF authentication, but DKIM survives it as long as the relay does not change the message content or its protected headers.

This is why DKIM should not be used in isolation. It is one part of a three-legged stool for email authentication, alongside SPF and DMARC.

  • SPF (Sender Policy Framework): Authenticates the sending server, ensuring email from your domain comes from an approved IP address.
  • DKIM (DomainKeys Identified Mail): Verifies the content of the email has not been tampered with, as we've discussed.
  • DMARC (Domain-based Message Authentication, Reporting & Conformance): Tells receiving mail servers what to do with emails that fail SPF or DKIM checks (reject, quarantine, or monitor) and provides valuable reporting.

By implementing all three, you create a robust defense against spoofing and phishing. DMARC ensures that even if DKIM fails, there is a clear policy in place that instructs mail servers on how to handle the unauthenticated message, providing comprehensive protection for your domain's reputation.

Start improving your email deliverability today

Get started