From: Vsevolod Stakhov Date: Thu, 28 Apr 2016 12:07:06 +0000 (+0100) Subject: [Fix] Fix setting of score for parts differ X-Git-Tag: 1.2.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00f32f1ba0ffb7ce2365337957e60bcaeebacca6;p=thirdparty%2Frspamd.git [Fix] Fix setting of score for parts differ --- diff --git a/rules/misc.lua b/rules/misc.lua index 2c6d503179..68a64f7bef 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -42,12 +42,13 @@ rspamd_config.R_PARTS_DIFFER = function(task) local tw = task:get_mempool():get_variable('total_words', 'int') if tw then + local score if tw > 30 then -- We are confident about difference - local score = (nd - 0.5) * 2.0 + score = (nd - 0.5) * 2.0 else -- We are not so confident about difference - local score = (nd - 0.5) + score = (nd - 0.5) end task:insert_result('R_PARTS_DIFFER', score, tostring(100.0 * nd) .. '%') end