X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Flists.rpc.py;h=aac5a23b0cb365e5c691adfa679560d872a0e0d1;hb=6df558fd292377086448b61b45da923f1e0c369d;hp=4c07c5e4d3ef47693900162c3fcfa3f1044129d4;hpb=e480db84c867fa0d69e173be1ed174e8e5a643ae;p=platal.git diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 4c07c5e..aac5a23 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -172,7 +172,7 @@ def quote(s, is_header=False): else: h = s h = str('').join(re.split('[\x00-\x08\x0B-\x1f]+', h)) - return Utils.uquote(h.replace('&', '&').replace('>', '>').replace('<', '<')) + return Utils.uquote(h.replace('&', '&').replace('>', '>').replace('<', '<')) def to_forlife(email): try: @@ -687,10 +687,10 @@ def get_bogo_level(userdesc, perms, vhost, listname): if mlist.header_filter_rules == []: return 0 try: - action = mlist.header_filter_rules[1][1] + action = mlist.header_filter_rules[2][1] return 2 except: - action = mlist.header_filter_rules[0][1] + action = mlist.header_filter_rules[1][1] if action == mm_cfg.HOLD: return 1 if action == mm_cfg.DISCARD: @@ -708,11 +708,14 @@ def set_bogo_level(userdesc, perms, vhost, listname, level): return 0 hfr = [] if int(level) is 1: + hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False)) hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False)) elif int(level) is 2: + hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False)) hfr.append(('X-Spam-Flag: Yes, tests=bogofilter, spamicity=(0\.999999|1\.000000)', mm_cfg.DISCARD, False)) hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.HOLD, False)) elif int(level) is 3: + hfr.append(('X-Spam-Flag: Unsure, tests=bogofilter', mm_cfg.HOLD, False)) hfr.append(('X-Spam-Flag: Yes, tests=bogofilter', mm_cfg.DISCARD, False)) if mlist.header_filter_rules != hfr: mlist.Lock()