From 1f07f39d87fd6ed3bc00b2a5bdc63b8146d144ba Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Sun, 23 Mar 2025 10:58:30 +0100 Subject: [PATCH] fix: ensure message content is not modified by header filter Due to an oversight, one of the header filters has potentially modified the message body, leading to broken cryptographic signatures. Switch to the Message-Id instead of the Content-Type header, which is usually only present in the global header. Signed-off-by: Moritz Poldrack Reported-by: Cole Young Fixes: 009237cc ("chore: Prevent Microsoft MUAs from sending reactions (#4120)") --- target/postfix/sender_header_filter.pcre | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/postfix/sender_header_filter.pcre b/target/postfix/sender_header_filter.pcre index fe4ff045..2a6f1767 100644 --- a/target/postfix/sender_header_filter.pcre +++ b/target/postfix/sender_header_filter.pcre @@ -8,4 +8,5 @@ /^\s*X-Mailer/ IGNORE /^\s*X-Originating-IP/ IGNORE /^\s*Received: from.*127.0.0.1/ IGNORE -/^Content-Type:/i PREPEND X-MS-Reactions: disallow +/^X-MS-Reactions:/ IGNORE +/^Message-Id:/i PREPEND X-MS-Reactions: disallow