diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-15 11:44:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-15 11:44:59 +0000 |
commit | b6928c94bc269c4455399154a3184ed029a097e4 (patch) | |
tree | 853854603eec7e778c22616142f1e3be1e590255 | |
parent | 811808c28daed06842f8d642e4ecd6a55e3b51dd (diff) | |
download | rspamd-b6928c94bc269c4455399154a3184ed029a097e4.tar.gz rspamd-b6928c94bc269c4455399154a3184ed029a097e4.zip |
[Minor] Fix symbols setup in fann redis
-rw-r--r-- | src/plugins/lua/fann_redis.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/lua/fann_redis.lua b/src/plugins/lua/fann_redis.lua index b7ae2ebdc..7f475b5eb 100644 --- a/src/plugins/lua/fann_redis.lua +++ b/src/plugins/lua/fann_redis.lua @@ -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, |