Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/^DKIM-Signature:/ IGNORE
/^Authentication-Results:/ IGNORE
/^Received:/ IGNORE
# List of headers for incoming messages
# that must be retained for functionality and compatibility reasons
/^From:/ DUNNO
/^Message-Id:/ DUNNO
/^Chat-/ DUNNO
/^Content-Type:/ DUNNO

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For safety i'd list all "Structural headers":

  • MIME-Version
  • Content-Type
  • Content-Transfer-Encoding
  • Content-Disposition

Removing Content-Transfer-Encoding from multipart MIME message sounds dangerous regardless of the signatures on the message.


# 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

# SecureJoin V2 protocol headers (for backward compatibility)
/^Secure-Join/ DUNNO

# Ignore all other headers
/.*/ IGNORE