aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2016-10-01 11:48:10 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2016-10-01 11:48:10 +0300
commitb8748438b1365f8b3e5cc996b58cd31f8e079631 (patch)
tree0ac9a0b444174d8ed348d6fc89f3690753715488
parent19c83a97ccd42db6ad14a03c6eeeb61c9ecd25ef (diff)
downloadrspamd-b8748438b1365f8b3e5cc996b58cd31f8e079631.tar.gz
rspamd-b8748438b1365f8b3e5cc996b58cd31f8e079631.zip
[Fix] Fix ip_score module registration
-rw-r--r--src/plugins/lua/ip_score.lua19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua
index 140109e5e..6cb9d1a1f 100644
--- a/src/plugins/lua/ip_score.lua
+++ b/src/plugins/lua/ip_score.lua
@@ -323,16 +323,14 @@ local configure_ip_score_module = function()
end
end
opts = rspamd_config:get_all_opt('ip_score')
- if opts then
- for k,v in pairs(opts) do
- options[k] = v
- end
- redis_params = rspamd_parse_redis_server('ip_score')
- if not redis_params then
- rspamd_logger.infox(rspamd_config, 'no servers are specified')
- end
- else
- return false
+ if not opts then return end
+ for k,v in pairs(opts) do
+ options[k] = v
+ end
+ redis_params = rspamd_parse_redis_server('ip_score')
+ if not redis_params then
+ rspamd_logger.infox(rspamd_config, 'no servers are specified')
+ return
end
if options['whitelist'] then
whitelist = rspamd_config:add_radix_map(opts['whitelist'])
@@ -340,6 +338,7 @@ local configure_ip_score_module = function()
if options['asn_cc_whitelist'] then
asn_cc_whitelist = rspamd_config:add_hash_map(opts['asn_cc_whitelist'])
end
+ return true
end