From: Andrew Lewis Date: Fri, 3 Feb 2017 15:37:08 +0000 (+0200) Subject: [Minor] URL reputation: support terse configuration for ignore_surbl X-Git-Tag: 1.5.0~187^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45653dea8f017b0c79aea6a11158e088b731015b;p=thirdparty%2Frspamd.git [Minor] URL reputation: support terse configuration for ignore_surbl --- diff --git a/src/plugins/lua/url_reputation.lua b/src/plugins/lua/url_reputation.lua index 952093a62e..17249d0883 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')