aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-07 12:58:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-07 12:58:33 +0100
commit498f929d0d3317c5a0fca0735f67a164998ada0f (patch)
tree0f9d3475fdd30f903b67131e93c773015ceaa406
parent1c090ffdca178ea712d6073d301e8a20b4e0d470 (diff)
downloadrspamd-498f929d0d3317c5a0fca0735f67a164998ada0f.tar.gz
rspamd-498f929d0d3317c5a0fca0735f67a164998ada0f.zip
Check smtp recipients before indexing.
-rw-r--r--src/plugins/lua/forged_recipients.lua5
1 files 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