Skip to content

Aggressive LMTP header cleanup#816

Draft
feld wants to merge 3 commits into
mainfrom
lmtp_header_checks
Draft

Aggressive LMTP header cleanup#816
feld wants to merge 3 commits into
mainfrom
lmtp_header_checks

Conversation

@feld
Copy link
Copy Markdown
Collaborator

@feld feld commented Jan 20, 2026

This will remove all headers possible during LMTP delivery.

From header: required or clients do not process the message correctly

Message-Id header: required for clients to know which messages have been downloaded

@missytake
Copy link
Copy Markdown
Contributor

missytake commented Jan 21, 2026

We should deploy this on ci-chatmail.testrun.org before merging, to run core CI against it. @link2xt do we need to do anything for this other than cmdeploy run?

@link2xt
Copy link
Copy Markdown
Contributor

link2xt commented Jan 21, 2026

This will break message previews in the new core because of unencrypted Chat-Is-Post-Message.

@feld
Copy link
Copy Markdown
Collaborator Author

feld commented Jan 21, 2026

I don't want to merge this until several core members are very confident this will not break anything. We can just continue iterating and thinking about whether the test coverage we have is sufficient and what the downsides may be as we continue the journey to remove all possible plaintext metadata from relay storage.

Does anyone know why we need the "From" header?

Comment thread cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup Outdated
@hpk42
Copy link
Copy Markdown
Contributor

hpk42 commented May 12, 2026

could you add content-type and rebase, so we can see what fails in the cmlxc runs?

@feld feld force-pushed the lmtp_header_checks branch from 33dd54a to 6736dc1 Compare May 12, 2026 22:44
@feld
Copy link
Copy Markdown
Collaborator Author

feld commented May 12, 2026

could you add content-type and rebase, so we can see what fails in the cmlxc runs?

done, let's see how it goes

@feld
Copy link
Copy Markdown
Collaborator Author

feld commented May 12, 2026

assert 'Subject: [...]' in

tests are going to fail due to this, so I'll add Subject back in to see if it gets further. Maybe a "refute Subject in..." will be appropriate if everything else works

@feld feld force-pushed the lmtp_header_checks branch 2 times, most recently from 7354938 to aeb33fa Compare May 13, 2026 19:05
Copy link
Copy Markdown
Contributor

@hpk42 hpk42 left a comment

Choose a reason for hiding this comment

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

i think it's worthwhile to go for this change of having an explicit allow-list of headers, instead of blocking all unwanted ones. But i'd be more in a "if in doubt, allow it" mode for now. In particular, i think that Subject and Date better remain allowed for now, to not disrupt cleartext receival as a side effect of this allowlist approach.

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
@feld feld force-pushed the lmtp_header_checks branch from aeb33fa to a4bc665 Compare May 13, 2026 22:26
@feld
Copy link
Copy Markdown
Collaborator Author

feld commented May 13, 2026 via email

Comment thread cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup
Comment thread cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup Outdated
Co-authored-by: holger krekel  <holger@merlinux.eu>
Comment thread cmdeploy/src/cmdeploy/postfix/lmtp_header_cleanup
For cleartext: To, CC, In-Reply-To, References

For Chatmail future expansion, allow Chat-*
@feld
Copy link
Copy Markdown
Collaborator Author

feld commented May 14, 2026

Should we do the same for Secure Join and allow /^Secure-Join so the entire namespace is preserved as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants