make sure to replace Reply-To header in reply phase

This commit is contained in:
Son NK 2020-01-07 19:14:36 +01:00
parent ca37ce5e5a
commit 072e73187b
1 changed files with 6 additions and 1 deletions

View File

@ -251,8 +251,13 @@ class MailHandler:
LOG.d("Remove DKIM-Signature %s", msg["DKIM-Signature"])
del msg["DKIM-Signature"]
# email seems to come from alias
# the email comes from alias
msg.replace_header("From", alias)
# some email providers like ProtonMail adds automatically the Reply-To field
# make sure to replace it too
add_or_replace_header(msg, "Reply-To", alias)
msg.replace_header("To", forward_email.website_email)
# add List-Unsubscribe header