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 ++++++++++-- NEWS | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) 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) diff --git a/NEWS b/NEWS index 11795058..d2013f40 100755 --- a/NEWS +++ b/NEWS @@ -33,6 +33,9 @@ Here is a history of user visible changes to Mailman. Bug fixes and other patches + - Accept email command in Subject: prefixed with Re: or similar with no + intervening space. (LP: #1400200) + - Fixed a UnicodeDecodeError that could occur in the web admin interface if 'text' valued attributes have unicode values. (LP: #1397170) -- cgit v1.2.3