aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-29 12:30:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-29 12:30:35 +0000
commit9af24263c1b26c4ec714031f71218166e4f29681 (patch)
tree291dbd73a324f43d6eb483b7076de142b73a01ad
parente8d9344a8be180d867a83df863aceb81c8171122 (diff)
downloadrspamd-9af24263c1b26c4ec714031f71218166e4f29681.tar.gz
rspamd-9af24263c1b26c4ec714031f71218166e4f29681.zip
[Fix] Fix tlds extraction if custom composition rules are used
-rw-r--r--src/plugins/lua/rbl.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 8cd5830f2..08d15c133 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -484,6 +484,11 @@ local function gen_rbl_callback(rule)
end
local function check_urls(task, requests_table, whitelist)
+ local esld_lim = 1
+
+ if rule.url_compose_map then
+ esld_lim = nil -- Avoid esld limit as we use custom composition rules
+ end
local ex_params = {
task = task,
limit = rule.requests_limit,
@@ -491,7 +496,7 @@ local function gen_rbl_callback(rule)
ignore_ip = rule.no_ip,
need_images = rule.images,
need_emails = false,
- esld_limit = 1,
+ esld_limit = esld_lim,
no_cache = true,
}
@@ -609,7 +614,9 @@ local function gen_rbl_callback(rule)
}
if rule.emails_domainonly then
- ex_params.esld_limit = 1
+ if not rule.url_compose_map then
+ ex_params.esld_limit = 1
+ end
ex_params.prefix = 'rbl_email_domainonly'
end