diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-01 22:20:15 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-01 22:20:15 +0100 |
commit | 458882675826a56b2191b7d79f5bb45cf9573a1c (patch) | |
tree | 4507d9cb171b2d09974016ceb56429aa95a4531b | |
parent | c32f5955464011ee2ec9067d9c3fd9aa0c0d693e (diff) | |
download | rspamd-458882675826a56b2191b7d79f5bb45cf9573a1c.tar.gz rspamd-458882675826a56b2191b7d79f5bb45cf9573a1c.zip |
Do not add FORGED_RECIPIENTS when 'To' is missing.
Issue: #387
-rw-r--r-- | src/plugins/lua/forged_recipients.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index c4a00c57b..c833986c9 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -41,9 +41,9 @@ local function check_forged_headers(task) if mime_rcpt then count = table.maxn(mime_rcpt) end - if count < table.maxn(smtp_rcpt) then + if count > 0 and count < table.maxn(smtp_rcpt) then task:insert_result(symbol_rcpt, 1) - else + elseif count > 0 then -- Find pair for each smtp recipient recipient in To or Cc headers for _,sr in ipairs(smtp_rcpt) do if mime_rcpt then |