]> source.dussan.org Git - rspamd.git/commitdiff
Add MISSING_FROM test 606/head
authorSteve Freegard <steve@stevefreegard.com>
Tue, 26 Apr 2016 12:06:41 +0000 (13:06 +0100)
committerSteve Freegard <steve@stevefreegard.com>
Tue, 26 Apr 2016 12:06:41 +0000 (13:06 +0100)
rules/misc.lua

index a9b5fd94ddfa6c9e698ada928ce6ff4662e47681..0707887f5a299b00ddcd5d89e128848456a5960d 100644 (file)
@@ -323,3 +323,15 @@ rspamd_config.RCVD_TLS_ALL = {
     group = "encryption"
 }
 
+rspamd_config.MISSING_FROM = {
+    callback = function(task)
+      local from = task:get_header('From')
+      if from == nil or from == '' then
+        return true
+      end
+      return false
+    end,
+    score = 2.0,
+    group = 'headers',
+    description = 'Missing From: header'
+}