aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/fann_scores.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-12 17:22:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-12 17:22:31 +0100
commit437727abc962967796b726814dcdf9d3c713a475 (patch)
tree6e335d94df0ec1de18ea555f86b0711da4ad50ab /src/plugins/lua/fann_scores.lua
parenteea4d934355c80febfab60f06d19824c8f921757 (diff)
downloadrspamd-437727abc962967796b726814dcdf9d3c713a475.tar.gz
rspamd-437727abc962967796b726814dcdf9d3c713a475.zip
[Fix] Use new postfilters and prefilters API in the plugins
Diffstat (limited to 'src/plugins/lua/fann_scores.lua')
-rw-r--r--src/plugins/lua/fann_scores.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/lua/fann_scores.lua b/src/plugins/lua/fann_scores.lua
index 98b0f7849..c62923521 100644
--- a/src/plugins/lua/fann_scores.lua
+++ b/src/plugins/lua/fann_scores.lua
@@ -255,8 +255,11 @@ 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:register_post_filter(fann_scores_filter)
-
+ rspamd_config:register_symbol({
+ name = fann_symbol,
+ type = 'postfilter',
+ callback = fann_scores_filter
+ })
if opts['train'] then
rspamd_config:add_on_load(function(cfg)
if opts['train']['max_train'] then