]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Rules] Fix the case when there are no received headers
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 15 Jan 2019 14:52:48 +0000 (14:52 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 15 Jan 2019 14:52:48 +0000 (14:52 +0000)
rules/misc.lua

index f6d1c81b95e8a868179a2a915ffb76469275c571..26f2a1357e2f59f6ee67d7cfc98a992cbb917e43 100644 (file)
@@ -198,7 +198,7 @@ local check_rcvd = rspamd_config:register_symbol{
   group = 'headers',
   callback = function (task)
     local rcvds = task:get_received_headers()
-    if not rcvds then return false end
+    if not rcvds or #rcvds == 0 then return false end
 
     local all_tls = fun.all(function(rc)
       return rc.flags and rc.flags['ssl']