aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/url_reputation.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-03 13:36:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-03 16:55:30 +0000
commitf5e2a84b6981cc12f06c908f9af277d13e64e7e8 (patch)
treeb86cc3a6ee0803e86d825240986d2b2efa553758 /src/plugins/lua/url_reputation.lua
parent12d38f08dd70e39bc0848390d6ec4f1f003ec335 (diff)
downloadrspamd-f5e2a84b6981cc12f06c908f9af277d13e64e7e8.tar.gz
rspamd-f5e2a84b6981cc12f06c908f9af277d13e64e7e8.zip
[Feature] Store plugins state
Diffstat (limited to 'src/plugins/lua/url_reputation.lua')
-rw-r--r--src/plugins/lua/url_reputation.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/lua/url_reputation.lua b/src/plugins/lua/url_reputation.lua
index 5c5dee14e..9dbb40320 100644
--- a/src/plugins/lua/url_reputation.lua
+++ b/src/plugins/lua/url_reputation.lua
@@ -63,6 +63,7 @@ local scale = {
local rspamd_logger = require "rspamd_logger"
local rspamd_util = require "rspamd_util"
+local lua_util = require "lua_util"
-- This function is used for taskless redis requests (to load scripts)
local function redis_make_request(ev_base, cfg, key, is_write, callback, command, args)
@@ -407,6 +408,7 @@ if not opts then return end
redis_params = rspamd_parse_redis_server(N)
if not redis_params then
rspamd_logger.warnx(rspamd_config, 'no servers are specified, disabling module')
+ lua_util.disable_module(N, "redis")
return
end
for k, v in pairs(opts) do
@@ -427,6 +429,7 @@ for k, v in pairs(opts) do
end
if settings.threshold < 1 then
rspamd_logger.errx(rspamd_config, 'threshold should be >= 1, disabling module')
+ lua_util.disable_module(N, "config")
return
end