summaryrefslogtreecommitdiff
path: root/Mailman/ListAdmin.py
diff options
context:
space:
mode:
authorbwarsaw2000-10-10 06:33:31 +0000
committerbwarsaw2000-10-10 06:33:31 +0000
commit0ffaaf97ce616c40b770189745bb5df0d817e1c7 (patch)
tree8c468bb21243b584d29389384e4273f573189e75 /Mailman/ListAdmin.py
parent23dd1bf8323d496cb7359a07b41e9628a8c410f2 (diff)
downloadmailman-0ffaaf97ce616c40b770189745bb5df0d817e1c7.tar.gz
mailman-0ffaaf97ce616c40b770189745bb5df0d817e1c7.tar.zst
mailman-0ffaaf97ce616c40b770189745bb5df0d817e1c7.zip
__handlepost(): If the message has been approved, and is being
forwarded, we need to craft two completely separate messages for each path through the system. They can't share msgdata state or message text or the first will simply disappear. Hacky way of doing this is to rewind the file pointer and re-instantiate a new message object. Closes SF bug #116311.
Diffstat (limited to '')
-rw-r--r--Mailman/ListAdmin.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py
index 86b769c97..9718e141b 100644
--- a/Mailman/ListAdmin.py
+++ b/Mailman/ListAdmin.py
@@ -136,7 +136,8 @@ class ListAdmin:
def HoldMessage(self, msg, reason, msgdata={}):
# Make a copy of msgdata so that subsequent changes won't corrupt the
- # request database.
+ # request database. TBD: remove the `filebase' key since this will
+ # not be relevant when the message is resurrected.
newmsgdata = {}
newmsgdata.update(msgdata)
msgdata = newmsgdata
@@ -224,7 +225,14 @@ class ListAdmin:
#
# Forward the message
if forward and addr:
- if not msg:
+ # If we've approved the message, we need to be sure to craft a
+ # completely unique second message for the forwarding operation,
+ # since we don't want to share any state or information with the
+ # normal delivery.
+ if msg:
+ fp.seek(0)
+ msg = Message.Message(fp)
+ else:
try:
fp = open(path)
except IOError, e: