diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-26 14:20:08 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-26 14:20:08 +0000 |
commit | 51636bd7f39d496c46e7b909a9b8d594e48fba4c (patch) | |
tree | 5586f265b5261a8c4eb45ea87c53e8f39dc69d87 | |
parent | af2b720250ea182fbbdb8e8793e538e9b4231f7f (diff) | |
download | rspamd-51636bd7f39d496c46e7b909a9b8d594e48fba4c.tar.gz rspamd-51636bd7f39d496c46e7b909a9b8d594e48fba4c.zip |
Add additional checks for mail addresses
-rw-r--r-- | src/plugins/lua/forged_recipients.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index 89331ab75..b55940c62 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -49,10 +49,12 @@ local function check_forged_headers(task) for _,sr in ipairs(smtp_rcpt) do if mime_rcpt then for _,mr in ipairs(mime_rcpt) do - if string.lower(mr['addr']) == string.lower(sr['addr']) then + if mr['addr'] and sr['addr'] and + string.lower(mr['addr']) == string.lower(sr['addr']) then res = true break - elseif string.lower(mr['user']) == string.lower(sr['user']) then + elseif mr['user'] and sr['user'] and + string.lower(mr['user']) == string.lower(sr['user']) then -- If we have the same username but for another domain, then -- lower the overall score score = score / 2 |