commit 1a86679: [Minor] Rbl: Moar fixes to the registration logic
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Sep 24 11:28:12 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-09-24 12:22:18 +0100
URL: https://github.com/rspamd/rspamd/commit/1a86679574a9fddd6c174d260c8b477834f5677c (HEAD -> master)
[Minor] Rbl: Moar fixes to the registration logic
---
conf/modules.d/rbl.conf | 2 +-
src/plugins/lua/rbl.lua | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/conf/modules.d/rbl.conf b/conf/modules.d/rbl.conf
index 96d442525..caaee4b97 100644
--- a/conf/modules.d/rbl.conf
+++ b/conf/modules.d/rbl.conf
@@ -28,7 +28,7 @@ rbl {
rbls {
spamhaus {
- symbol = "RBL_SPAMHAUS";
+ symbol = "SPAMHAUS"; # Augmented by prefixes
rbl = "zen.spamhaus.org";
ipv6 = true;
received = true;
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 5c007b6c3..cf474f69c 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -867,24 +867,24 @@ local function add_rbl(key, rbl, global_opts)
local id
if rbl.symbols_prefixes then
- if not rbl.symbol:match('_CHECK$') then
- rbl.symbol = rbl.symbol .. '_CHECK'
- end
-
id = rspamd_config:register_symbol{
type = 'callback',
callback = callback,
- name = rbl.symbol,
+ name = rbl.symbol .. '_CHECK',
flags = table.concat(flags_tbl, ',')
}
for _,prefix in pairs(rbl.symbols_prefixes) do
+ -- For unknown results...
rspamd_config:register_symbol{
type = 'virtual',
parent = id,
name = prefix .. '_' .. rbl.symbol,
}
end
+ if not rbl.is_whitelist and rbl.ignore_whitelist == false then
+ table.insert(black_symbols, rbl.symbol .. '_CHECK')
+ end
else
id = rspamd_config:register_symbol{
type = 'callback',
@@ -892,6 +892,9 @@ local function add_rbl(key, rbl, global_opts)
name = rbl.symbol,
flags = table.concat(flags_tbl, ',')
}
+ if not rbl.is_whitelist and rbl.ignore_whitelist == false then
+ table.insert(black_symbols, rbl.symbol)
+ end
end
@@ -967,9 +970,6 @@ local function add_rbl(key, rbl, global_opts)
end
end
- if not rbl.is_whitelist and rbl.ignore_whitelist == false then
- table.insert(black_symbols, rbl.symbol)
- end
-- Process monitored
if not rbl.disable_monitoring then
if not monitored_addresses[rbl.rbl] then
More information about the Commits
mailing list