From 62409ad0943ef71827d941aa41666c477f30e49c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 19 Nov 2021 20:30:06 +0000 Subject: [PATCH] [Fix] Rbl: Fix inversed logic of the url_full_hostname --- src/plugins/lua/rbl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 8743f125d..e901e1a2f 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -458,7 +458,7 @@ local function gen_rbl_callback(rule) mime_from_domain = ((task:get_from('mime') or E)[1] or E).domain if mime_from_domain then local mime_from_domain_tld = rule.url_full_hostname and - rspamd_util.get_tld(mime_from_domain) or mime_from_domain + mime_from_domain or rspamd_util.get_tld(mime_from_domain) if rule.url_compose_map then mime_from_domain = rule.url_compose_map:process_url(task, mime_from_domain_tld, mime_from_domain) @@ -561,7 +561,7 @@ local function gen_rbl_callback(rule) false, requests_table, 'url', whitelist) else local url_hostname = u:get_host() - local url_tld = rule.url_full_hostname and u:get_tld() or url_hostname + local url_tld = rule.url_full_hostname and url_hostname or u:get_tld() if rule.url_compose_map then url_tld = rule.url_compose_map:process_url(task, url_tld, url_hostname) end -- 2.39.5