Closed ldidry closed 1 year ago
Did some digging and RFC 5322 (supersedes 2045) specifies that headers are case insensitive: https://stackoverflow.com/questions/6143549/are-email-headers-case-sensitive
In addition, unfortunately, Go's built in textproto.MIMEHeader{}
automatically changes the case of all header keys that are set.
Did some digging and RFC 5322 (supersedes 2045) specifies that headers are case insensitive
I was guessing something like that.
For people who see this issue: you can rewrite the header with Postfix.
apt install postfix-pcre
systemctl restart postfix
In /etc/postfix/main.cf
:
# Header rewriting
header_checks = pcre:/etc/postfix/header_checks
In /etc/postfix/header_checks
:
/^Mime-(Version:.*)/i REPLACE MIME-$1
As the header case is something normally harmless and as the "problem" comes from Go itself, I close the issue.
Version:
Description of the bug and steps to reproduce: The
MIME-Version
header is written asMime-Version
and that triggers a check on Rspamd (see here).It doesn’t add a big spam-score (juste 0.5) but it could be avoided.
Indeed, the RFC which introduced the header use the upper-case version.
I couldn’t find where the header is added in listmonk code, so, sorry, I can’t produce a PR.