Sanitize folded email headers before SMTP send #3

Merged
ilia merged 1 commits from fix/sanitize-folded-headers into main 2026-07-18 14:58:12 -05:00
Owner

Summary

  • Unfold CRLF-folded References/Subject/In-Reply-To before assigning to EmailMessage
  • Normalize at IMAP ingest so queued replies in SQLite stay clean
  • Append parent Message-ID to References chain when missing

Test plan

  • .venv/bin/python -m pytest -q (23 passed)
  • Redeploy LXC 245; confirm queued reply no longer ValueError
## Summary - Unfold CRLF-folded References/Subject/In-Reply-To before assigning to EmailMessage - Normalize at IMAP ingest so queued replies in SQLite stay clean - Append parent Message-ID to References chain when missing ## Test plan - [x] `.venv/bin/python -m pytest -q` (23 passed) - [ ] Redeploy LXC 245; confirm queued reply no longer ValueError
ilia added 1 commit 2026-07-18 14:58:07 -05:00
IMAP References/Subject often arrive with CRLF folding; EmailMessage
rejects those newlines. Unfold at ingest and again in mailer.send.
ilia merged commit 07028c6dc6 into main 2026-07-18 14:58:12 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ilia/Hearth#3
No description provided.