aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/forged_recipients.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua/forged_recipients.lua')
-rw-r--r--src/plugins/lua/forged_recipients.lua6
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