diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-28 13:07:06 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-28 13:07:06 +0100 |
commit | ef826765908af52497c499608d43a24637e36009 (patch) | |
tree | 506b0e11471dc20e3466c63fbd7335f058b6961d | |
parent | cff60f6a8f600351364b1260ae7bedee0678fd01 (diff) | |
download | rspamd-ef826765908af52497c499608d43a24637e36009.tar.gz rspamd-ef826765908af52497c499608d43a24637e36009.zip |
[Fix] Fix setting of score for parts differ
-rw-r--r-- | rules/misc.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rules/misc.lua b/rules/misc.lua index 01fe3f5aa..cd6a76028 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -93,12 +93,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 |