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)
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