From: Jose Celestino Date: Mon, 13 Jan 2025 13:02:37 +0000 (+0000) Subject: [Minor] Respect ipv4 and ipv6 configurations for rbl resolve_ip X-Git-Tag: 3.11.1~40^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03d4df207410e21f3eff0af45b353ee0e5d8572e;p=thirdparty%2Frspamd.git [Minor] Respect ipv4 and ipv6 configurations for rbl resolve_ip --- diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 76c84f85d1..2326821102 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 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 and r:resolve('aaaa', { task = task, name = req.n, callback = gen_rbl_ip_dns_callback(req),