Forwarding‑friendly ARC/DKIM preservation in docker‑mailserver (Gmail line‑wrap gotcha) #4651
Replies: 1 comment 4 replies
-
|
Thanks for taking the time to share that back to the community! ❤️ Was the forwarded mail sent from Outlook with the I'm not too familiar with the details, so that might not work for your forwarding scenario 😅 UPDATE: Oh you mentioned it was the message body, not headers (I can't recall if the SMTP message part differentiates body/headers, but the checks condition below might imply it wouldn't solve the above linked header issue). I think Postfix has you sorted with
That should modify the content before it's signed by Rspamd AFAIK, and that should work smoothly without the transport workaround 🤔 What encoding was the affected mail using? Could you confirm that it's not Unfortunately, that is dependent upon Postfix 3.9+. DMS is presently on Debian 12 Bookworm (which packages Postfix 3.7) and I don't think we have the backports repo enabled (which provides Postfix 3.10), if we did I'd have expected it to be managed here. I could be mistaken as I haven't checked by running a DMS container, if we have got the newer Postfix already you're golden :) You might need to wait until DMS v16 release (upgrade to Debian 13 Trixie) but we've been stalling on that due to contributors lacking time to push the Dovecot 2.3 => 2.4 upgrade forward (not semver, introduces breaking changes). Alternatively, extending our image with a custom I'm not too familiar with the impact of enabling that setting by default, it might present a breaking change for DMS to adopt but we could definitely document it. Quick look at encoding conversion from that Postfix setting is that Besides if the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m running docker‑mailserver as a forwarder (SRS enabled, Rspamd ARC/DKIM signing). I hit a subtle issue where a single forwarded message land in Gmail spam with dkim=fail + arc=fail, while others pass.
After digging, the root cause was Postfix’s outbound SMTP client folding over‑long lines (>998 bytes), which happens after Rspamd adds ARC/DKIM. That single fold changes the body, invalidating upstream DKIM and our ARC seal downstream.
Evidence from Postfix logs:
In the same message, Gmail shows arc=fail and dkim=fail. A different message without any line‑folding logs passes.
What my AI suggested to fix this: (
codex resume 019c075c-e7b3-7470-8d14-596a6a0f95af)Global override (simplest, forwarding‑only):
Gmail‑only transport (safer if you forward to many domains):
This keeps ARC/DKIM intact for Gmail while remaining RFC‑strict for other domains.
It’s not a DMS bug (Postfix is RFC‑correct), but it might be a useful documentation note for forwarders using ARC.
Beta Was this translation helpful? Give feedback.
All reactions