-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DKIM body hash did not verify with WHMCS issue #411
Comments
I have a similar report, not with WHMCS though. Are you able to reproduce and get headers? My report had
Looked like the end of the message had a TAB / space however I am not able to reliably reproduce this in any way. Past report had an issue with new line \n so I suspect a similar character whmcs and wpsmtp mailer and the encoding is causing an issue. |
Unfortunately, either I... If you find a fix please let me know too |
But I don't understand. If WHMCS initiates the SMTP connection, can it alter the body after the message is signed by ZoneMTA? Also, I don’t understand how to fix this. What is your solution for the previous issue with the newline? How were you able to fix it? |
The new line was a previous bug report in dkim signing now resolved where \n was not handled properly. The issue is likely content of the email itself, or a combination of the content/mime and something in the message. Does it look like there is a tab at the end of the email message in your dkim failure? Maybe a line with one tab spacing after the final html tag? |
Well, where should I check? I have the email source, but I still don't understand how that happens after the email is signed with DKIM. And for one system(WHMCS), the DKIM signature happens last... And how do you fix this new line? on WHMCS or on ZoneMTA? I am a bit confused... since the DKIM signing happened last. |
@JQuags How to debug this? I don't understand how this works if I sign DKIM with Zonemta, how is WHMCS able to manipulate the email after I sign it and send it? Thank you |
@JQuags @louis-lau So weird, when I use DirectAdmin connected to my SMTP, and I connect the SMTP from DirectAdmin But when I connect the SMTP directly to WHMCS from zonemta without directadmin in the middle, it fails with body hash. If you have any ideas - please let me know, I am out of ideas. |
The only thing that makes sense is that the specific body is triggering a bug in zone-mta. That's also what @JQuags already said if you read carefully. Nobody said whmcs is modifying the body after signing. If you can reproduce the bug, you can fix it. If you can't fix it, make sure we can reproduce it (by actually giving an example payload that doesn't get signed), and maybe someone wants to take a look for you. Without it being reproducible by us, every answer is a complete stab in the dark. |
What should I provide to try troubleshooting the issue? I don't know how to troubleshooting this issus with zonenta yet. When you mean by payload that can't be signed you mean to provide the the raw html, for an example from Google inbox? I send email from whmcs to Google and there I see the body hash breaks. Thank you |
Is there anything here that can do the bug?
The next is just the HTML |
I have this also: Breaks either:
Could be this? |
@louis-lau I think I found the problem, it is that Content-Type: text/plain; charset=us-ascii Why zonemta changing the content type to ascii? and Exim not? |
@louis-lau @JQuags I don't know why WHMCS set asci type for Mail Encoding type 7bit and 8bit. This is the case Content-Type: text/plain; charset=us-ascii If anyone here wants to fix it - that would be good. Example fail:
|
I can reproduce this with php + html email and a tab on it. The email end looks like
when I take the basics from dkim-relaxed-test.js and run it through nodeunit. A tab anywhere else except at the bottom causes no issues. I couldn't reproduce it in thunderbird. When I find an acceptable fix I will post a PR. |
I'm having the same issue. The mail is rendered by Symfony Mailer. I noticed that if I don't use inky_to_html filter on the email template zone-mta correctly sign the message. |
Guess we need a major update about this. Probably many more cases cause the same. |
Any chance you can look and see if there is a tab at the bottom line of the email. The \r\n\t\t\r\n is after the email has been processed via https://github.com/zone-eu/zone-mta/blob/master/lib/dkim-relaxed-body.js. I can place tabs anywhere and get a valid has except on the last line. |
@JQuags sorry for the late response. How are you validating the presence of tabs? Are you inspecting the output of some function or the contents of a received email? |
Hello
I have enabled DKIM, and it's working perfectly. It only fails when used with one system: WHMCS.
The DKIM working and verified everywhere I am using the SMTP(Example: DirectAdmin, PHP, SWAKS).
I tested another SMTP software(haraka) with the same WHMCS system and the DKIM passed.
What can be the reason? I am not altering anything, default installation - just added one header to the message:headers and enabled limit rate and zone loop.
Please provide me with some ideas on how to debug this issue, why the message is being altered, and how WHMCS is involved after ZoneMTA accepts the message.
Thank you.
The text was updated successfully, but these errors were encountered: