aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2025-01-16 04:09:15 +0600
committerGitHub <noreply@github.com>2025-01-16 04:09:15 +0600
commit1d6e68e54e8c54b1d54a97ab781cfc6cce6a4df2 (patch)
tree63174320d3438ee5108a7507611408f0b7f04cb1
parent5aa7f5c83c3ee363d1edc8e7bdbca0671b8299b6 (diff)
parent39a49f95bc02842347eea6ce2168f91483011b9f (diff)
downloadrspamd-1d6e68e54e8c54b1d54a97ab781cfc6cce6a4df2.tar.gz
rspamd-1d6e68e54e8c54b1d54a97ab781cfc6cce6a4df2.zip
Merge pull request #5292 from japc/resolve_ip-ipv46
[Minor] Respect ipv4 and ipv6 configurations for rbl resolve_ip
-rw-r--r--src/plugins/lua/rbl.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 76c84f85d..2c2fe0071 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -983,7 +983,7 @@ local function gen_rbl_callback(rule)
if req.resolve_ip then
-- Deal with both ipv4 and ipv6
-- Resolve names first
- if r:resolve_a({
+ if (rule.ipv4 == nil or rule.ipv4) and r:resolve_a({
task = task,
name = req.n,
callback = gen_rbl_ip_dns_callback(req),
@@ -991,7 +991,7 @@ local function gen_rbl_callback(rule)
}) then
nresolved = nresolved + 1
end
- if r:resolve('aaaa', {
+ if (rule.ipv6 == nil or rule.ipv6) and r:resolve('aaaa', {
task = task,
name = req.n,
callback = gen_rbl_ip_dns_callback(req),