]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix symbols registration in fann
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 6 Sep 2016 09:36:38 +0000 (10:36 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 6 Sep 2016 09:36:38 +0000 (10:36 +0100)
src/plugins/lua/fann_scores.lua

index 13e11394db66d11f6c2e2be992c88f20ea81c406..2a661bf9867dc165f11175ba28d418e7a6b21f23 100644 (file)
@@ -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',