You are right Douglas.
After upgrading to latest build we still have some customers having issue with DKIM when they use SMTP. This particular user is using fastmail as their mail hub and configured their smartermail account as a secondary address on fastmail (using SMTP).
When they send mails from fastmail through their SM account via SMTP, the DKIM signing fails.
I saw that fastmail is adding quite some X-* headers and I suspect these are used for the signing but some get altered on the way.
But SM continues to use the other X-* fields for signing. I tried a domain reload... no changes.
However in the domain settings.json the config change is saved:
"dkim_activation_forced": false,
"dkim_active": true,
"dkim_canonicalization_algorithm_body": "relaxed",
"dkim_canonicalization_algorithm_header": "relaxed",
"dkim_header_field_option": "allspecified",
"dkim_header_fields": [
"From",
"Sender",
"Reply-To",
"Subject",
"Date",
"Message-ID",
"To",
"Cc",
"MIME-Version",
"Content-Type",
"Content-Transfer-Encoding",
"Content-ID",
"Content-Description",
"Resent-Date",
"Resent-From",
"Resent-Sender",
"Resent-To",
"Resent-Cc",
"Resent-Message-ID",
"In-Reply-To",
"References",
"List-Id",
"List-Help",
"List-Unsubscribe",
"List-Subscribe",
"List-Post",
"List-Owner",
"List-Archive"
],
I'm not very hot to try to change/rollover the key or anything that need we update their DNS record.
I guess a stop/start of SM could maybe do the trick, but also not hot to do a service interruption to reload dkim settings...
EDIT1: Well I went ahead this night and stopped / started the service in order to (try to) reload DKIM settings for a test domain. No luck either. When you change the selected headers for signing and save, it updates the domain's settings.json file correctly, but when you stop SmarterMail, it reverts it back to the previous settings.
Looks like when you change these settings it is reflected in the domain config file but not in "memory" and when you stop the service it dumps back the in-memory settings to the domain config file... :(
EDIT2:
For the fastmail + SMTP + SM, It's not an header issue, the body is altered.
----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result: fail (wrong body hash: expected oXOqt5ZXsno8obedckABk7o6IHvt//pkwEj6+2hbKD8=)
If i try to send a "html" (without accented chars in the body) mail through SMTP/SM from fastmail, the DKIM is FAIL.
If i try to send a "html" (with accented chars in the body) mail through SMTP/SM from fastmail, the DKIM is PASS.
If I try to send a plain text through SMTP/SM from fastmail, the DKIM is PASS.
I did the same tests with another SMTP server (not SM) and all DKIM signing is PASS.
Looks like there are still issues with SMTP + DKIM signing on SmarterMail and looks like it is related to mail charset encoding.. :(