From: Alexander Moisseev Date: Sat, 5 Mar 2016 18:59:58 +0000 (+0300) Subject: Add LONG_SUBJ rule X-Git-Tag: 1.2.0~114^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F546%2Fhead;p=rspamd.git Add LONG_SUBJ rule --- diff --git a/rules/misc.lua b/rules/misc.lua index 86dbccb50..e7d047b3f 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -124,6 +124,20 @@ rspamd_config.SUBJ_ALL_CAPS = { description = 'All capital letters in subject' } +rspamd_config.LONG_SUBJ = { + callback = function(task) + local sbj = task:get_header('Subject') + if sbj and string.len(sbj) > 200 then + return true + end + return false + end, + + score = 3.0, + group = 'headers', + description = 'Subject is too long' +} + rspamd_config.BROKEN_HEADERS = { callback = function(task) if task:has_flag('broken_headers') then