aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-22 21:34:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-22 21:34:18 +0100
commitf2228a7422aa8f379efb4e20d117b2d1c2a65b56 (patch)
tree66f97493636c13027856670dfadb53939a0ea635 /src/plugins
parent1f94f578870842e958ccc8faf6f45579b8acddf1 (diff)
parent935c992ce705d3b978eb1e6defb9f3f64498a935 (diff)
downloadrspamd-f2228a7422aa8f379efb4e20d117b2d1c2a65b56.tar.gz
rspamd-f2228a7422aa8f379efb4e20d117b2d1c2a65b56.zip
Merge pull request #300 from fatalbanana/master
Don't use RWL_MAILSPIKE_POSSIBLE or DNSWL_BLOCKED for whitelisting
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/rbl.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index cceb00449..c524c5bf1 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -355,7 +355,22 @@ for key,rbl in pairs(opts['rbls']) do
if type(rspamd_config.get_api_version) ~= 'nil' then
rspamd_config:register_virtual_symbol(s, 1, id)
if(rbl['is_whitelist']) then
- table.insert(white_symbols, s)
+ if type(rbl['whitelist_exception']) == 'string' then
+ if (rbl['whitelist_exception'] ~= s) then
+ table.insert(white_symbols, s)
+ end
+ elseif type(rbl['whitelist_exception']) == 'table' then
+ local foundException = false
+ for _, e in pairs(rbl['whitelist_exception']) do
+ if e == s then
+ foundException = true
+ break
+ end
+ end
+ if not foundException then
+ table.insert(white_symbols, s)
+ end
+ end
else
table.insert(black_symbols, s)
end