diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-03 14:28:47 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-03 14:28:47 +0000 |
commit | 5244e863178e776d8af230e966da502920d1197b (patch) | |
tree | 6b349a875511315bad8965c97485a287873a9a62 /rules | |
parent | 6d8ad20e0adfb6985c8fa2d53e4905ed7c2d822e (diff) | |
download | rspamd-5244e863178e776d8af230e966da502920d1197b.tar.gz rspamd-5244e863178e776d8af230e966da502920d1197b.zip |
[Feature] Add rule to detect broken content type
Diffstat (limited to 'rules')
-rw-r--r-- | rules/misc.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rules/misc.lua b/rules/misc.lua index 8cfd71619..de088ae4c 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -168,7 +168,7 @@ rspamd_config.R_SUSPICIOUS_URL = { end return false end, - score = 6.0, + score = 5.0, one_shot = true, description = 'Obfusicated or suspicious URL has been found in a message', group = 'url' @@ -183,6 +183,16 @@ rspamd_config.BROKEN_HEADERS = { description = 'Headers structure is likely broken' } +rspamd_config.BROKEN_CONTENT_TYPE = { + callback = function(task) + return fun.any(function(p) return p:is_broken() end, + task:get_parts()) + end, + score = 3.0, + group = 'header', + description = 'Message has part with broken content type' +} + rspamd_config.HEADER_RCONFIRM_MISMATCH = { callback = function (task) local header_from = nil |