]> source.dussan.org Git - rspamd.git/commitdiff
Fix `RCVD_TLS_ALL` rule when there are no `Received` headers 604/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 25 Apr 2016 15:29:00 +0000 (18:29 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 25 Apr 2016 15:29:00 +0000 (18:29 +0300)
rules/misc.lua

index f72efea87ec66e990dcb3bf80d150086ebcdd181..176dac8538e8a520f410b6c32b8de0537895c0fb 100644 (file)
@@ -291,6 +291,7 @@ rspamd_config.ENVFROM_VERP = {
 rspamd_config.RCVD_TLS_ALL = {
     callback = function (task)
         local rcvds = task:get_header_full('Received')
+        if not rcvds then return false end
         local count = 0
         local encrypted = 0
         for _, rcvd in ipairs(rcvds) do