Set CONTENT_TRANSFER_ENCODING if absent
This commit is contained in:
parent
9aeceb9119
commit
754bd4964c
|
@ -2223,6 +2223,11 @@ def handle(envelope: Envelope, msg: Message) -> str:
|
||||||
envelope.mail_from = mail_from
|
envelope.mail_from = mail_from
|
||||||
envelope.rcpt_tos = rcpt_tos
|
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)
|
postfix_queue_id = get_queue_id(msg)
|
||||||
if postfix_queue_id:
|
if postfix_queue_id:
|
||||||
set_message_id(postfix_queue_id)
|
set_message_id(postfix_queue_id)
|
||||||
|
|
Loading…
Reference in a new issue