]> source.dussan.org Git - rspamd.git/commitdiff
Add LONG_SUBJ rule 546/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 5 Mar 2016 18:59:58 +0000 (21:59 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 5 Mar 2016 18:59:58 +0000 (21:59 +0300)
rules/misc.lua

index 86dbccb50e58ceb747dcfb8fb03ace2ab3865b06..e7d047b3fe83d786271bfecb0b1cae4d85908b6b 100644 (file)
@@ -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