mirror of
https://github.com/simple-login/app.git
synced 2024-11-17 14:16:47 +08:00
Merge pull request #870 from simple-login/fix/misc
Set CONTENT_TRANSFER_ENCODING if absent
This commit is contained in:
commit
936fa17005
1 changed files with 5 additions and 0 deletions
|
@ -2223,6 +2223,11 @@ def handle(envelope: Envelope, msg: Message) -> str:
|
|||
envelope.mail_from = mail_from
|
||||
envelope.rcpt_tos = rcpt_tos
|
||||
|
||||
# some emails don't have this header, set the default value (7bit) in this case
|
||||
if headers.CONTENT_TRANSFER_ENCODING not in msg:
|
||||
LOG.i("Set CONTENT_TRANSFER_ENCODING")
|
||||
msg[headers.CONTENT_TRANSFER_ENCODING] = "7bit"
|
||||
|
||||
postfix_queue_id = get_queue_id(msg)
|
||||
if postfix_queue_id:
|
||||
set_message_id(postfix_queue_id)
|
||||
|
|
Loading…
Reference in a new issue