Fix: Also replace source mailbox to alias when replacing stuff in the reply phase (#1432)

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
This commit is contained in:
Adrià Casajús 2022-11-18 14:30:19 +01:00 committed by GitHub
parent d2360d1a99
commit 0fbe576c44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1125,8 +1125,9 @@ def handle_reply(envelope, msg: Message, rcpt_to: str) -> (bool, str):
# as this is usually included when replying
if user.replace_reverse_alias:
LOG.d("Replace reverse-alias %s by contact email %s", reply_email, contact)
msg = replace(msg, reply_email, contact.website_email)
LOG.d("Replace mailbox %s by alias email %s", mailbox.email, alias.email)
msg = replace(msg, mailbox.email, alias.email)
if config.ENABLE_ALL_REVERSE_ALIAS_REPLACEMENT:
start = time.time()