From 498f929d0d3317c5a0fca0735f67a164998ada0f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 7 May 2015 12:58:33 +0100 Subject: [PATCH] Check smtp recipients before indexing. --- src/plugins/lua/forged_recipients.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index 913cd4d4e..b7f283cf8 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -62,9 +62,10 @@ function check_forged_headers(task) end -- Check sender local smtp_from = task:get_from(1) - if smtp_from then + if smtp_from and smtp_from[1] then local mime_from = task:get_from(2) - if not mime_from or not mime_from[1] or not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then + if not mime_from or not mime_from[1] or + not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then task:insert_result(symbol_sender, 1) end end -- 2.39.5