aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-02-03 17:37:08 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-02-03 17:37:35 +0200
commit45653dea8f017b0c79aea6a11158e088b731015b (patch)
tree6a2c9de118df7cffdcc2ce20614d7e9aa137e47c /src
parentc0e76d49b5133638cee11846a1fc79d8929c865a (diff)
downloadrspamd-45653dea8f017b0c79aea6a11158e088b731015b.tar.gz
rspamd-45653dea8f017b0c79aea6a11158e088b731015b.zip
[Minor] URL reputation: support terse configuration for ignore_surbl
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/url_reputation.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/lua/url_reputation.lua b/src/plugins/lua/url_reputation.lua
index 952093a62..17249d088 100644
--- a/src/plugins/lua/url_reputation.lua
+++ b/src/plugins/lua/url_reputation.lua
@@ -592,7 +592,20 @@ if not redis_params then
return
end
for k, v in pairs(opts) do
- settings[k] = v
+ if k == 'ignore_surbl' then
+ if type(v) == 'table' then
+ if next(v) ~= 1 then
+ settings[k] = v
+ else
+ settings[k] = {}
+ for _, n in ipairs(v) do
+ settings[k][n] = true
+ end
+ end
+ end
+ else
+ settings[k] = v
+ end
end
if settings.threshold < 1 then
rspamd_logger.errx(rspamd_config, 'threshold should be >= 1, disabling module')