From: Vsevolod Stakhov Date: Thu, 7 May 2015 11:58:33 +0000 (+0100) Subject: Check smtp recipients before indexing. X-Git-Tag: 0.9.0~75 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=498f929d0d3317c5a0fca0735f67a164998ada0f;p=rspamd.git Check smtp recipients before indexing. --- 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