From eee82d55eee059a5b0f0ae47817f3351a5d114e1 Mon Sep 17 00:00:00 2001 From: msapiro <> Date: Sat, 20 Jan 2007 03:34:42 +0000 Subject: Changed header_filter_rules processing to ignore blank patterns. --- Mailman/Handlers/SpamDetect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 5eeddd5b..5cbb766b 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2006 by the Free Software Foundation, Inc. +# Copyright (C) 1998-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 @@ -119,6 +119,9 @@ def process(mlist, msg, msgdata): for pattern in patterns.splitlines(): if pattern.startswith('#'): continue + # ignore 'empty' patterns + if not pattern.strip(): + continue if re.search(pattern, headers, re.IGNORECASE|re.MULTILINE): if action == mm_cfg.DISCARD: raise Errors.DiscardMessage -- cgit v1.2.3