]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Improve URL_IN_SUBJECT rule
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Apr 2018 10:24:38 +0000 (11:24 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Apr 2018 10:24:38 +0000 (11:24 +0100)
We penalise now this rule's weight when URL found has no schema.

rules/misc.lua

index f4591c9a29804007a2f875592b73e72599c68468..62fa7f92a4d8df314e4b36d896b81643072a3bae 100644 (file)
@@ -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