Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a hosted VPS that is fully managed by the hosting company. For weeks they cannot figure out how to get DKIM working for my emails, even though in cPanel's Email Authentication section says DKIM is enabled. However, testing this shows the DKIM is failing for emails. I test this by sending an email to and I get this:

DKIM check details:
Result:         fail (wrong body hash: expected 47DEQpj8HB***)
ID(s) verified: 
Canonicalized Headers:

The hosting support said they generated the key then updated my DNS and I verified this in my Advanced DNS section in cPanel, but it still fails with the above error. I think I have shell access and know a thing or two about managing servers, so how can I try to resolve this myself or at least help the hosting support to fix it? I appreciate any help or advice.

share|improve this question

Something is modifying the body of the email after it is signed.

Notice the error "Result: fail (wrong body hash: expected 47DEQpj8HB***)" ?

That tells you a few things off the bat..

  1. It tells you there is a signature. (so you know DKIM is enabled)
  2. It tells you the reason the signature failed. (body has is incorrect.)

Part of how a DKIM signature is generated involved taking cryptographic one-way hashes of both the headers and the body, and then digitally signing those hashes with the RSA key.

The error tells you that the hash of the body is inconsistent with the body that the verifier is seeing. Ie, your DKIM-signing software saw a (probably only very slightly) different email body than the verifier saw. Find out why* and fix it. That will be your solution.

*You might want to compare the verifiers report of the body with what you think you sent. Something, likely filtering software on your hosting provider's end, make some change to the body content.

share|improve this answer
Especially if your server software or the provider's relay add "Powered by" text :(:( – usr-local-ΕΨΗΕΛΩΝ Apr 18 '13 at 9:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.