From a4bc665f59c58eee3d40c34795db1d341cad530c Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 20 Jan 2026 15:21:47 -0800 Subject: [PATCH 1/4] Aggressive LMTP header cleanup This will remove all headers possible during LMTP delivery. From: required or core does not process the message correctly. Also required for cleartext compatibility. Message-Id: required for clients to know which messages have been downloaded Chat-Is-Post-Message: is required for our attachment previews Content-Type: required Subject and Date: retained for cleartext compatibility for now --- cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup index 3c45f8d83..807b860cb 100644 --- a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup +++ b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup @@ -1,3 +1,7 @@ -/^DKIM-Signature:/ IGNORE -/^Authentication-Results:/ IGNORE -/^Received:/ IGNORE +/^From:/ DUNNO +/^Message-Id:/ DUNNO +/^Chat-Is-Post-Message:/ DUNNO +/^Content-Type:/ DUNNO +/^Subject:/ DUNNO +/^Date:/ DUNNO +/.*/ IGNORE From 056be5156096f55fb8c5901d4f8d9c78c6e42d45 Mon Sep 17 00:00:00 2001 From: feld <40271278+feld@users.noreply.github.com> Date: Wed, 13 May 2026 17:07:08 -0700 Subject: [PATCH 2/4] Update cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup Co-authored-by: holger krekel --- .../src/cmdeploy/postfix/lmtp_header_cleanup | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup index 807b860cb..75c68c048 100644 --- a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup +++ b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup @@ -1,7 +1,23 @@ +# List of headers for incoming messages +# that must be retained for functionality and compatibility reasons /^From:/ DUNNO /^Message-Id:/ DUNNO /^Chat-Is-Post-Message:/ DUNNO /^Content-Type:/ DUNNO + +# For receiving clear-text messages (still supported in May 2026) /^Subject:/ DUNNO /^Date:/ DUNNO + +# Senders might support Autocrypt 1 but not RFC9788 (Header Protection) +/^Autocrypt:/ DUNNO + +# SecureJoin V2 protocol headers (for backward compatibility) +/^Secure-Join:/ DUNNO +/^Secure-Join-Invitenumber:/ DUNNO +/^Secure-Join-Auth:/ DUNNO +/^Secure-Join-Fingerprint:/ DUNNO +/^Secure-Join-Group:/ DUNNO + +# Ignore all other headers /.*/ IGNORE From 605f5060da9a61073d087abbbfef59e6db1e12f8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 14 May 2026 15:30:01 -0700 Subject: [PATCH 3/4] More headers preserved For cleartext: To, CC, In-Reply-To, References For Chatmail future expansion, allow Chat-* --- cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup index 75c68c048..05540c418 100644 --- a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup +++ b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup @@ -2,12 +2,16 @@ # that must be retained for functionality and compatibility reasons /^From:/ DUNNO /^Message-Id:/ DUNNO -/^Chat-Is-Post-Message:/ DUNNO +/^Chat-/ DUNNO /^Content-Type:/ DUNNO # For receiving clear-text messages (still supported in May 2026) /^Subject:/ DUNNO /^Date:/ DUNNO +/^To:/ DUNNO +/^CC:/ DUNNO +/^References:/ DUNNO +/^In-Reply-To:/ DUNNO # Senders might support Autocrypt 1 but not RFC9788 (Header Protection) /^Autocrypt:/ DUNNO From 4078acbd22bc57ec45f0436effcc959b055e41df Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 15 May 2026 17:18:30 -0700 Subject: [PATCH 4/4] Permit the entire Secure-Join* namespace --- cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup index 05540c418..8b3cf2e77 100644 --- a/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup +++ b/cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup @@ -14,14 +14,10 @@ /^In-Reply-To:/ DUNNO # Senders might support Autocrypt 1 but not RFC9788 (Header Protection) -/^Autocrypt:/ DUNNO +/^Autocrypt:/ DUNNO # SecureJoin V2 protocol headers (for backward compatibility) -/^Secure-Join:/ DUNNO -/^Secure-Join-Invitenumber:/ DUNNO -/^Secure-Join-Auth:/ DUNNO -/^Secure-Join-Fingerprint:/ DUNNO -/^Secure-Join-Group:/ DUNNO +/^Secure-Join/ DUNNO # Ignore all other headers /.*/ IGNORE