summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-09 11:24:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-09 11:24:38 +0100
commitc949b41dd7f6dd8e4312cdf640a791c2f02818a9 (patch)
tree6fc66a7d0d6de202722cafd684df1893cb57ab8b
parentde3cd8a03db19657454a8f45d1b5aa3577526ac1 (diff)
downloadrspamd-c949b41dd7f6dd8e4312cdf640a791c2f02818a9.tar.gz
rspamd-c949b41dd7f6dd8e4312cdf640a791c2f02818a9.zip
[Feature] Improve URL_IN_SUBJECT rule
We penalise now this rule's weight when URL found has no schema.
-rw-r--r--rules/misc.lua6
1 files changed, 5 insertions, 1 deletions
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