From d6ff74408394cacb6489c929ae46f3cc8631602a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Casaj=C3=BAs?= Date: Wed, 12 Apr 2023 17:30:17 +0200 Subject: [PATCH] Set VERP for the forward phase to the contact domain --- email_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/email_handler.py b/email_handler.py index fbdb3f0e..fba1b618 100644 --- a/email_handler.py +++ b/email_handler.py @@ -945,10 +945,11 @@ def forward_email_to_mailbox( envelope.rcpt_options, ) + contact_domain = get_email_domain_part(contact.reply_email) try: sl_sendmail( # use a different envelope sender for each forward (aka VERP) - generate_verp_email(VerpType.bounce_forward, email_log.id), + generate_verp_email(VerpType.bounce_forward, email_log.id, contact_domain), mailbox.email, msg, envelope.mail_options,