diff options
Diffstat (limited to 'Mailman/Queue/CommandRunner.py')
| -rw-r--r-- | Mailman/Queue/CommandRunner.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index a2d8cee60..ec3e3a9a2 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001,2002 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 @@ -23,6 +23,8 @@ +import re + from Mailman import mm_cfg from Mailman.Bouncers import BouncerAPI from Mailman.Handlers import SpamDetect @@ -46,7 +48,6 @@ class CommandRunner(Runner): except LockFile.TimeOutError: # Oh well, try again later return 1 - # # runner specific code # # This message will have been delivered to one of mylist-request, @@ -67,6 +68,15 @@ class CommandRunner(Runner): msg['Subject'] = 'leave' msg.set_payload('') mlist.ParseMailCommands(msg, msgdata) + elif msgdata.get('toconfirm'): + mo = re.match(mm_cfg.VERP_CONFIRM_REGEXP, msg.get('to', '')) + if mo: + # BAW: blech, this should not hack the Subject: header, + # but this is quick and dirty until we rewrite email + # command handling. + del msg['subject'] + msg['Subject'] = 'confirm ' + mo.group('cookie') + mlist.ParseMailCommands(msg, msgdata) mlist.Save() finally: mlist.Unlock() |
