DKIM problem "body hash did not verify" ? Please help


When I send a message using my email client, all tests are passed : SPF, DKIM, DMARC.
When I send a message using PHPList 3.3.3, SPF and DMARC are passed but DKIM fails with “dkim=neutral (body hash did not verify)”.
When I test DKIM signature of my domain using MXToolbox (and “default” key), the 2048 bits signature is found and everything seems to be OK.
When I test DKIM signature using tool, the key is found and validated.

BUT when I send a test email using PHPList to a Gmail address, I get :
dkim=neutral (body hash did not verify) header.s=default header.b=JszG5Ac4;
spf=pass ( domain of designates as permitted sender);
dmarc=pass (p=NONE sp=NONE dis=NONE)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;;
s=default; h=Content-Type:…

When PHPList send a test email to the AppMailDev service, it gives me :
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;;
s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:List-Owner:
bh=5HL3CvzIlWM [ cut ] E5jg==;
Expected-Body-Hash: cDr9I8f3UmClNIdfjX4UbUwPfFZy5vZEGgro0dNrVnE=

And when I PHPList send test email to mail address, it returns that DKIM signature is not valid :
La signature DKIM de votre message est :


Votre clé publique est :


What’s the problem ?? Should I update PHPMailer to 6.0 ?

Please help,

Many thanks,


Anyone to help me please ? That problem didn’t occur before the 3.3.3 update (I was using v3.1 I think).

I am having the same exact problem! php 5.6 phplist 3.3.3

I did not found a solution yet but maybe we have to look there (found here):

phpList seems to generate emails which contains different line endings then CRLFs, which are the only ones allowed in an e-mail. Normally this isn’t a problem, but as you can see it can cause problems with DKIM, as different line endings produces different hashes.

EDIT (14:37). I found that the DKIM signature encoded in the emails sent by PHPList is wrong. If I use my email client, the DKIM signature (“b=…”) can be base64-decoded but I cannot decode the DKIM signature integrated by PHPList. Now the question is : how can we fix the DKIM signature in PHPList ??

EDIT (15:15). I found THAT (see last post) and changed the class.phpmailer.php file accordingly. And It seems that DKIM signatures can now be decoded. BUT there is still the “(body hash did not verify)” problem. Still searching…

EDIT (15:32). I thought that I found the problem in the config.php file because I was using TLS and port 25 for sending emails with my STMP server instead of SSL and port 465. I also tried this but no, the problem remains…

EDIT (15:58). I found this. It seems to be a bug in PHPMailer class with CR/LF, which have been fixed in PHPMailer 6.0.3 (see here). So it seems that the solution would be to use PHPMailer 6.0.5 instead of PHPMailer 5.2.2 but I can’t understand how to do this… Someone ?


1 Like

I’m still loooking for a solution about this… I still have the same problem… Why can’t I setup PHPList correctly with DKIM on my CPanel VPS ??? I try this for months…