From: Vsevolod Stakhov Date: Tue, 6 Sep 2016 09:36:38 +0000 (+0100) Subject: [Minor] Fix symbols registration in fann X-Git-Tag: 1.4.0~483 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7cfddfbd2230e79ce07b2c1c0b65a0f67edb576d;p=rspamd.git [Minor] Fix symbols registration in fann --- diff --git a/src/plugins/lua/fann_scores.lua b/src/plugins/lua/fann_scores.lua index 13e11394d..2a661bf98 100644 --- a/src/plugins/lua/fann_scores.lua +++ b/src/plugins/lua/fann_scores.lua @@ -263,12 +263,23 @@ else else fann_file = opts['fann_file'] use_settings = opts['use_settings'] - rspamd_config:set_metric_symbol(fann_symbol, 3.0, 'Experimental FANN adjustment') + rspamd_config:set_metric_symbol({ + name = fann_symbol_spam, + score = 3.0, + description = 'Neural network SPAM', + group = 'fann' + }) local id = rspamd_config:register_symbol({ name = fann_symbol_spam, type = 'postfilter', callback = fann_scores_filter }) + rspamd_config:set_metric_symbol({ + name = fann_symbol_ham, + score = -2.0, + description = 'Neural network HAM', + group = 'fann' + }) rspamd_config:register_symbol({ name = fann_symbol_ham, type = 'virtual',