Browse Source

[Minor] Add symbol options for FORGED_RECIPIENTS

tags/1.7.6
Alexander Moisseev 6 years ago
parent
commit
8418453047
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      src/plugins/lua/forged_recipients.lua

+ 6
- 3
src/plugins/lua/forged_recipients.lua View File

if not mime_rcpt then if not mime_rcpt then
return return
elseif #mime_rcpt == 0 then elseif #mime_rcpt == 0 then
task:insert_result(symbol_rcpt, score)
local sra = smtp_rcpt[1].addr .. (#smtp_rcpt > 1 and ' ...' or '')
task:insert_result(symbol_rcpt, score, '', sra)
return return
end end
-- Find pair for each smtp recipient recipient in To or Cc headers -- Find pair for each smtp recipient recipient in To or Cc headers
end end
end end
if not res then if not res then
task:insert_result(symbol_rcpt, score)
local mra = mime_rcpt[1].addr .. (#mime_rcpt > 1 and ' ..' or '')
local sra = smtp_rcpt[1].addr .. (#smtp_rcpt > 1 and ' ...' or '')
task:insert_result(symbol_rcpt, score, mra, sra)
break break
end end
end end
local mime_from = task:get_from(2) local mime_from = task:get_from(2)
if not mime_from or not mime_from[1] or if not mime_from or not mime_from[1] or
not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then
task:insert_result(symbol_sender, 1)
task:insert_result(symbol_sender, 1, ((mime_from or E)[1] or E).addr or '', smtp_from[1].addr)
end end
end end
end end

Loading…
Cancel
Save