aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/MTA/Postfix.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2008-08-22 15:21:26 -0700
committerMark Sapiro <mark@msapiro.net>2008-08-22 15:21:26 -0700
commitf431ffd2849dae99946fb22d7e1beb021989d7cb (patch)
treec7b39fd859aaf54ba296e96c1482562e2ab51caa /Mailman/MTA/Postfix.py
parent39b6bc673e4cbcd1c71aefa3b7130960604c4749 (diff)
downloadmailman2-f431ffd2849dae99946fb22d7e1beb021989d7cb.tar.gz
mailman2-f431ffd2849dae99946fb22d7e1beb021989d7cb.tar.xz
mailman2-f431ffd2849dae99946fb22d7e1beb021989d7cb.zip
MTA/Postfix.py
If the STANZA END for a list being removed is missing or munged, the remainder of the aliases and/or virtual-mailman file is lost. Fixed.
Diffstat (limited to 'Mailman/MTA/Postfix.py')
-rw-r--r--Mailman/MTA/Postfix.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py
index 33cb9a47..daa9692f 100644
--- a/Mailman/MTA/Postfix.py
+++ b/Mailman/MTA/Postfix.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2005 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2008 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
@@ -256,6 +256,7 @@ def _do_remove(mlist, textfile, virtualp):
filteroutp = False
start = '# STANZA START: ' + listname
end = '# STANZA END: ' + listname
+ oops = '# STANZA START: '
while 1:
line = infp.readline()
if not line:
@@ -270,6 +271,10 @@ def _do_remove(mlist, textfile, virtualp):
# Discard the trailing blank line, but don't worry if
# we're at the end of the file.
infp.readline()
+ elif line.startswith(oops):
+ # Stanza end must be missing - start writing from here.
+ filteroutp = False
+ outfp.write(line)
# Otherwise, ignore the line
else:
if line.strip() == start: