aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsapiro <>2005-11-12 23:51:32 +0000
committermsapiro <>2005-11-12 23:51:32 +0000
commitd88bad2fc44b24b5fb7e0c6a8076629b6e492e4d (patch)
treea7e128569a9c60638de71b210dfb0e6f3ac485ca
parent540fa47a356a66faada25162a13d72ded738eeef (diff)
downloadmailman2-d88bad2fc44b24b5fb7e0c6a8076629b6e492e4d.tar.gz
mailman2-d88bad2fc44b24b5fb7e0c6a8076629b6e492e4d.tar.xz
mailman2-d88bad2fc44b24b5fb7e0c6a8076629b6e492e4d.zip
Log the sender and not list-bounces when non-VERP
and mm_cfg.USE_ENVELOPE_SENDER = Yes
-rw-r--r--Mailman/Handlers/SMTPDirect.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index 44209ebb..d631c80c 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -135,6 +135,12 @@ def process(mlist, msg, msgdata):
t0 = time.time()
# Open the initial connection
origrecips = msgdata['recips']
+ # MAS: get the message sender now for logging. If we're using 'sender'
+ # and not 'from', bulkdeliver changes it for bounce processing.
+ # If we're VERPing, it doesn't matter because bulkdeliver is working
+ # on a copy, but otherwise msg gets changed. If the list is anonymous,
+ # the original sender is long gone, but Cleanse.py has logged it.
+ origsender = msg.get_sender()
# `undelivered' is a copy of chunks that we pop from to do deliveries.
# This seems like a good tradeoff between robustness and resource
# utilization. If delivery really fails (i.e. qfiles/shunt type
@@ -169,7 +175,7 @@ def process(mlist, msg, msgdata):
'#recips' : len(recips),
'#refused': len(refused),
'listname': mlist.internal_name(),
- 'sender' : msg.get_sender(),
+ 'sender' : origsender,
})
# We have to use the copy() method because extended call syntax requires a
# concrete dictionary object; it does not allow a generic mapping. It's