--- mailman-2.1.5.1/Mailman/Gui/Privacy.py.orig 2007-05-09 10:54:47.000000000 +0200 +++ mailman-2.1.5.1/Mailman/Gui/Privacy.py 2007-05-09 11:00:27.000000000 +0200 @@ -429,7 +429,9 @@ # everything else can be done by the base class's handleForm() method. # However, to do this we need an awful hack. _setValue() and # _getValidValue() will essentially ignore any hdrfilter_* form variables. - def handleForm(self, mlist, category, subcat, cgidata, doc): + def _handleForm(self, mlist, category, subcat, cgidata, doc): + if not cgidata.has_key('hdrfilter_rebox_01'): + return # First deal with rules = [] # We start i at 1 and keep going until we no longer find items keyed @@ -462,6 +464,9 @@ break if cgidata.has_key(newtag) and not pattern: # This new entry is incomplete. + if i == 2: + # OK it is the first. + continue doc.addError(_("""Header filter rules require a pattern. Incomplete filter rules will be ignored.""")) continue @@ -506,5 +511,9 @@ del rules[downi] rules.insert(downi+1, rule) mlist.header_filter_rules = rules + + def handleForm(self, mlist, category, subcat, cgidata, doc): + if subcat == 'spam': + self._handleForm(mlist, category, subcat, cgidata, doc) # Everything else is dealt with by the base handler GUIBase.handleForm(self, mlist, category, subcat, cgidata, doc)