Mark Sapiro wrote:
>
>The bottom line is there is a bug in MaildirRunner.py. It doesn't work
>with hyphenated list names as it conflates the last part of the name
>with the -bounces, -request, etc. suffixes.


The attached MaildirRunner.patch.txt file contains a patch which I
think will fix this bug. I've tested the revised regexp somewhat and
it seems to work, but I would appreciate your trying the patch and
reporting the results.

Make a backup copy of Mailman/Queue/MaildirRunner.py, apply the patch
and restart Mailman.

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

--- MaildirRunner.py    2007-08-03 18:24:55.906250000 -0700
+++ MaildirRunnerx.py   2007-08-31 18:17:45.593750000 -0700
@@ -1,4 +1,4 @@
-# Copyright (C) 2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2007 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
@@ -12,7 +12,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 """Maildir pre-queue runner.
 
@@ -66,11 +67,22 @@
 # listname-request@
 lre = re.compile(r"""
  ^                        # start of string
- (?P<listname>[EMAIL PROTECTED])     # listname@ or listname-subq@
+ (?P<listname>[EMAIL PROTECTED])    # listname@ or listname-subq@ (non-greedy)
  (?:                      # non-grouping
    -                      # dash separator
-   (?P<subq>[EMAIL PROTECTED])      # everything up to + or - or @
+   (?P<subq>              # any known suffix
+     admin|
+     bounces|
+     confirm|
+     join|
+     leave|
+     owner|
+     request|
+     subscribe|
+     unsubscribe
+   )
  )?                       # if it exists
+ [EMAIL PROTECTED]                     # followed by + or @
  """, re.VERBOSE | re.IGNORECASE)
 
 
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to