aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/rbl.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-13 19:06:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-13 19:06:16 +0100
commit9b8f8d728cebc0e0fe777f55d6d02cff9ea9e792 (patch)
treedd58114f954b46eea04b8bb6a47d2352ef2e94b0 /src/plugins/lua/rbl.lua
parent78a21e8200a671d1ebf2b9572bbcfdfcd4fba151 (diff)
downloadrspamd-9b8f8d728cebc0e0fe777f55d6d02cff9ea9e792.tar.gz
rspamd-9b8f8d728cebc0e0fe777f55d6d02cff9ea9e792.zip
[Feature] Enable forced resolving for some lua plugins
Issue: #661 Reported by: @FelixSchwarz
Diffstat (limited to 'src/plugins/lua/rbl.lua')
-rw-r--r--src/plugins/lua/rbl.lua23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 91e20dc5b..2a0042019 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -147,7 +147,8 @@ local function rbl_cb (task)
task:get_resolver():resolve_a({task = task,
name = havegot['helo'] .. '.' .. rbl['rbl'],
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = true})
end)()
end
@@ -173,7 +174,8 @@ local function rbl_cb (task)
task:get_resolver():resolve_a({task = task,
name = d .. '.' .. rbl['rbl'],
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = true})
end
end)()
end
@@ -214,14 +216,16 @@ local function rbl_cb (task)
task:get_resolver():resolve_a({task = task,
name = domain .. '.' .. rbl['rbl'],
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = true})
end
else
for _, email in pairs(havegot['emails']) do
task:get_resolver():resolve_a({task = task,
name = email .. '.' .. rbl['rbl'],
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = true})
end
end
end)()
@@ -242,7 +246,8 @@ local function rbl_cb (task)
task:get_resolver():resolve_a({task = task,
name = havegot['rdns'] .. '.' .. rbl['rbl'],
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = true})
end)()
end
@@ -263,7 +268,8 @@ local function rbl_cb (task)
task:get_resolver():resolve_a({task = task,
name = ip_to_rbl(havegot['from'], rbl['rbl']),
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = true})
end
end)()
end
@@ -287,10 +293,13 @@ local function rbl_cb (task)
((rbl['exclude_private_ips'] and not rh['real_ip']:is_local()) or
not rbl['exclude_private_ips']) and ((rbl['exclude_local_ips'] and
not is_excluded_ip(rh['real_ip'])) or not rbl['exclude_local_ips']) then
+ -- Disable forced for received resolving, as we have no control on
+ -- those headers count
task:get_resolver():resolve_a({task = task,
name = ip_to_rbl(rh['real_ip'], rbl['rbl']),
callback = rbl_dns_cb,
- option = k})
+ option = k,
+ forced = false})
end
end
end