From: Vsevolod Stakhov Date: Mon, 9 Apr 2018 10:24:38 +0000 (+0100) Subject: [Feature] Improve URL_IN_SUBJECT rule X-Git-Tag: 1.7.3~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c949b41dd7f6dd8e4312cdf640a791c2f02818a9;p=rspamd.git [Feature] Improve URL_IN_SUBJECT rule We penalise now this rule's weight when URL found has no schema. --- diff --git a/rules/misc.lua b/rules/misc.lua index f4591c9a2..62fa7f92a 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -393,7 +393,11 @@ rspamd_config.URL_IN_SUBJECT = { if urls then for _,u in ipairs(urls) do - if u:is_subject() then + local flags = u:get_flags() + if flags.subject then + if flags.schemaless then + return true,0.1,u:get_host() + end local subject = task:get_subject() if subject then