From 61fd81489fd63459bcc43efc024cb79827125f5d Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Tue, 25 Aug 2020 12:47:28 +0200 Subject: [PATCH] Set _EMAIL_LOG_ID_HEADER header for reply phase --- email_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/email_handler.py b/email_handler.py index 9664a937..1923c9c7 100644 --- a/email_handler.py +++ b/email_handler.py @@ -687,7 +687,10 @@ async def handle_reply(envelope, smtp: SMTP, msg: Message, rcpt_to: str) -> (boo _MESSAGE_ID, 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") + # Received-SPF is injected by postfix-policyd-spf-python can reveal user original email delete_header(msg, "Received-SPF")