I just realized this conversation occured on the mailman-users list
while it would be more appropriately discussed on the developers'
list.
--
Jon Parise ([EMAIL PROTECTED]) :: http://www.csh.rit.edu/~jon/
--- Begin Message ---
On Wed, Jan 01, 2003 at 07:14:41PM -0500, Todd wrote:
> I was testing out MM2.1 yesterday and created a few test lists. I was
> feeling especially creative so I named them test and test2. When I used
> bin/rmlist to remove "test" I found that it had also deleted the test2
> entries from data/aliases (I use postfix as my MTA).
[snip]
> It looks like the problem is in Mailman/MTA/Postfix.py's _do_remove(). It
> simply checks that the line startswith '# STANZA START: ' + listname. This
> matches any lists that start with the same string as another listname. So
> If I have the lists test, test-users, and test-announce, running 'bin/rmlist
> test' will remove all three lists from data/aliases. This makes it hard for
> postfix to deliver mail to the list. :)
[snip]
> Here's the several line diff (let me know if there's a better place to post
> this):
I don't think a regular expression is the correct way to handle this,
but you've definitely identified the problem. I like the attached
patch a bit better (although Barry has the final say).
--
Jon Parise ([EMAIL PROTECTED]) :: http://www.csh.rit.edu/~jon/
Index: Postfix.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MTA/Postfix.py,v
retrieving revision 2.18
diff -u -r2.18 Postfix.py
--- Postfix.py 23 Aug 2002 20:32:05 -0000 2.18
+++ Postfix.py 2 Jan 2003 02:41:33 -0000
@@ -259,14 +259,14 @@
# filtering out a stanza, we're just looking for the proper begin
# marker.
if filteroutp:
- if line.startswith(end):
+ if line.strip() == end:
filteroutp = 0
# Discard the trailing blank line, but don't worry if
# we're at the end of the file.
infp.readline()
# Otherwise, ignore the line
else:
- if line.startswith(start):
+ if line.strip() == start:
# Filter out this stanza
filteroutp = 1
else:
------------------------------------------------------
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/
This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/jon%40csh.rit.edu
--- End Message ---
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers