瀏覽代碼

Set _EMAIL_LOG_ID_HEADER header for reply phase

Son NK 4 年之前
父節點
當前提交
61fd81489f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      email_handler.py

+ 3 - 0
email_handler.py

@@ -687,7 +687,10 @@ async def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (boo
         _MESSAGE_ID,
         _MESSAGE_ID,
         make_msgid(str(email_log.id), get_email_domain_part(alias.email)),
         make_msgid(str(email_log.id), get_email_domain_part(alias.email)),
     )
     )
+    add_or_replace_header(msg, _EMAIL_LOG_ID_HEADER, str(email_log.id))
+
     add_or_replace_header(msg, _DIRECTION, "Reply")
     add_or_replace_header(msg, _DIRECTION, "Reply")
+
     # Received-SPF is injected by postfix-policyd-spf-python can reveal user original email
     # Received-SPF is injected by postfix-policyd-spf-python can reveal user original email
     delete_header(msg, "Received-SPF")
     delete_header(msg, "Received-SPF")