summaryrefslogtreecommitdiff
path: root/Mailman/Queue
diff options
context:
space:
mode:
authorbwarsaw2001-05-11 20:11:17 +0000
committerbwarsaw2001-05-11 20:11:17 +0000
commit0c97ebbf7a3f38a9f7c46ed01c1a2990caf6cfba (patch)
tree6b2f0acb6020bfa8c0524699b1940a461e5fe649 /Mailman/Queue
parent603a98e5e7d87a0783136b4d709a5bb0b7b61e2b (diff)
downloadmailman-0c97ebbf7a3f38a9f7c46ed01c1a2990caf6cfba.tar.gz
mailman-0c97ebbf7a3f38a9f7c46ed01c1a2990caf6cfba.tar.zst
mailman-0c97ebbf7a3f38a9f7c46ed01c1a2990caf6cfba.zip
_dispose(): Add support for mylist-join and mylist-leave aliases. The
mail scripts simply add metadata `tojoin' or `toleave' respectively, which tell CommandRunner which operation to perform. This is a bit crufty since MailCommandHandler.ParseMailCommands() still handles the actual job of adding or deleting the member. CommandRunner hacks the Subject: line of the message to add just the specific desired command, and it empties the message's payload (effectively ignoring any additional commands or useless text in the email message).
Diffstat (limited to 'Mailman/Queue')
-rw-r--r--Mailman/Queue/CommandRunner.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py
index 13123442c..ed31fba03 100644
--- a/Mailman/Queue/CommandRunner.py
+++ b/Mailman/Queue/CommandRunner.py
@@ -130,6 +130,16 @@ class CommandRunner(Runner):
# Just pass the message off the command handler
mlist.ParseMailCommands(msg, msgdata)
return
+ elif msgdata.get('tojoin'):
+ del msg['subject']
+ msg['Subject'] = 'join'
+ msg.set_payload('')
+ mlist.ParseMailCommands(msg, msgdata)
+ elif msgdata.get('toleave'):
+ del msg['subject']
+ msg['Subject'] = 'leave'
+ msg.set_payload('')
+ mlist.ParseMailCommands(msg, msgdata)
finally:
mlist.Save()
mlist.Unlock()