]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix symbols setup in fann redis
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 15 Nov 2016 11:44:59 +0000 (11:44 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 15 Nov 2016 11:44:59 +0000 (11:44 +0000)
src/plugins/lua/fann_redis.lua

index b7ae2ebdc7020f368f818316f0a1e258f660124e..7f475b5eb838d165e8e478bf8a59cd88bdb44e04 100644 (file)
@@ -20,8 +20,8 @@ limitations under the License.
 local rspamd_logger = require "rspamd_logger"
 local rspamd_fann = require "rspamd_fann"
 local rspamd_util = require "rspamd_util"
-local fann_symbol_spam = 'FANN_SPAM'
-local fann_symbol_ham = 'FANN_HAM'
+local fann_symbol_spam = 'FANNR_SPAM'
+local fann_symbol_ham = 'FANNR_HAM'
 require "fun" ()
 local ucl = require "ucl"
 
@@ -625,6 +625,12 @@ if not rspamd_fann.is_enabled() then
   return
 else
   use_settings = opts['use_settings']
+  if opts['spam_symbol'] then
+    fann_symbol_spam = opts['spam_symbol']
+  end
+  if opts['ham_symbol'] then
+    fann_symbol_ham = opts['ham_symbol']
+  end
   rspamd_config:set_metric_symbol({
     name = fann_symbol_spam,
     score = 3.0,