Pass through original_content instead of content in filtermail

This avoids unnecessary UTF-8 recoding and passes bytestring through.
This commit is contained in:
link2xt
2025-03-08 01:50:56 +00:00
parent a78e8e10d2
commit 35fe189be7
2 changed files with 6 additions and 1 deletions

View File

@@ -2,6 +2,9 @@
## untagged
- Pass through `original_content` instead of `content` in filtermail
([#509](https://github.com/chatmail/server/pull/509))
- Document TLS requirements in the readme
([#514](https://github.com/chatmail/server/pull/514))

View File

@@ -196,7 +196,9 @@ class BeforeQueueHandler:
return error
logging.info("re-injecting the mail that passed checks")
client = SMTPClient("localhost", self.config.postfix_reinject_port)
client.sendmail(envelope.mail_from, envelope.rcpt_tos, envelope.content)
client.sendmail(
envelope.mail_from, envelope.rcpt_tos, envelope.original_content
)
return "250 OK"
def check_DATA(self, envelope):