From: Vsevolod Stakhov Date: Sat, 29 Sep 2018 18:14:26 +0000 (+0100) Subject: [Minor] Fix scoring for the blacklist rules X-Git-Tag: 1.8.1~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04c99fbc2fe08880e719830579e466e88675e647;p=thirdparty%2Frspamd.git [Minor] Fix scoring for the blacklist rules --- diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua index c2341110c4..f810433c43 100644 --- a/src/plugins/lua/whitelist.lua +++ b/src/plugins/lua/whitelist.lua @@ -45,8 +45,6 @@ local function whitelist_cb(symbol, rule, task) if rule.blacklist then how = 'bl' end local function parse_val(val) - local how = 'wl' - if rule.blacklist then how = 'bl' end if val then if val == '' then return how,1.0 @@ -193,7 +191,9 @@ local function whitelist_cb(symbol, rule, task) sym = rule.inverse_symbol else -- Inverse multiplier - mult = -mult + if not rule.blacklist then + mult = -mult + end end if rule.strict or how == 'bl' or how == 'both' then