Fix unencrypted delivery #144

Merged
pfm merged 2 commits from v0.2_unencrypted-delivery-fix into main 2024-03-01 20:34:20 +01:00
Collaborator
  1. Pass original content bytes to the destination instead of processing it (parsing and re-generating).
  2. In case of a hard error, log up to 2.5kB of log headers when [daemon]log_headers is enabled.
1. Pass original content bytes to the destination instead of processing it (parsing and re-generating). 2. In case of a hard error, log up to 2.5kB of log headers when [daemon]log_headers is enabled.
pfm added 2 commits 2024-03-01 20:32:59 +01:00
When we fail to produce byte representation of the email message being
processed, we may end up bouncing a message.  An example of such case would be
a message with a Message-Id header that Python's email parser library cannot
process.

In such cases, just take whatever original content we have received and pass
it to the destination without touching it to minimise any chances of breaking
the overall flow.
When we know we need to bounce a message and [daemon]log_headers is enabled,
we record up to 2.5kB of message headers at ERROR level.  This could help
diagnosing issues later.

Also: no longer record MIME Type, Charset and Content-Transfer-Encoding, as
the issues related to these properties no longer occur.
pfm merged commit ccfaa39501 into main 2024-03-01 20:34:20 +01:00
pfm deleted branch v0.2_unencrypted-delivery-fix 2024-03-01 20:34:20 +01:00
Sign in to join this conversation.
No description provided.