From cb8225458e7044a4f096bbbb6fb5a3126d691f41 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 7 Dec 2014 20:51:42 -0800 Subject: Accept email command in Subject: prefixed with Re: or similar with no intervening space. --- Mailman/Queue/CommandRunner.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Mailman/Queue') diff --git a/Mailman/Queue/CommandRunner.py b/Mailman/Queue/CommandRunner.py index b63b050c..d25fe87e 100644 --- a/Mailman/Queue/CommandRunner.py +++ b/Mailman/Queue/CommandRunner.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2011 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2014 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 @@ -138,9 +138,17 @@ class Results: # localized version thereof) on the Subject: line that's messing # things up. Pop the prefix off and try again... once. # + # At least one MUA (163.com web mail) has been observed that + # inserts 'Re:' with no following space, so try to account for + # that too. + # # If that still didn't work it isn't enough to stop processing. # BAW: should we include a message that the Subject: was ignored? - if not self.subjcmdretried and args: + if self.subjcmdretried < 1: + self.subjcmdretried += 1 + if re.search('^.*:.+', cmd): + return self.do_command(re.sub('.*:', '', cmd), args) + if self.subjcmdretried < 2 and args: self.subjcmdretried += 1 cmd = args.pop(0) return self.do_command(cmd, args) -- cgit v1.2.3