From 419bf7bdd447eb365d65d1eba9f5d13edf6e3aef Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 23 Oct 2002 13:39:43 +0000 Subject: process(): If the metadata has an `envsender' key, use that as the envelope sender, otherwise calculate it as before. --- Mailman/Handlers/SMTPDirect.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py index e3927125d..a101e4f87 100644 --- a/Mailman/Handlers/SMTPDirect.py +++ b/Mailman/Handlers/SMTPDirect.py @@ -86,10 +86,12 @@ def process(mlist, msg, msgdata): # Nobody to deliver to! return # Calculate the non-VERP envelope sender. - if mlist: - envsender = mlist.GetBouncesEmail() - else: - envsender = Utils.get_site_email(extra='bounces') + envsender = msgdata.get('envsender') + if envsender is None: + if mlist: + envsender = mlist.GetBouncesEmail() + else: + envsender = Utils.get_site_email(extra='bounces') # Time to split up the recipient list. If we're personalizing or VERPing # then each chunk will have exactly one recipient. We'll then hand craft # an envelope sender and stitch a message together in memory for each one -- cgit v1.3.1