From: Vsevolod Stakhov Date: Mon, 9 Aug 2021 09:35:50 +0000 (+0100) Subject: [Minor] Dmarc_report: Fix bcc_addrs usage X-Git-Tag: 3.0~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1fbcf0cd6aa99b085a1de2b83dfee00bf1000501;p=rspamd.git [Minor] Dmarc_report: Fix bcc_addrs usage --- diff --git a/lualib/rspamadm/dmarc_report.lua b/lualib/rspamadm/dmarc_report.lua index e3c59db79..1b0bc7f24 100644 --- a/lualib/rspamadm/dmarc_report.lua +++ b/lualib/rspamadm/dmarc_report.lua @@ -551,9 +551,17 @@ local function prepare_report(opts, start_time, rep_key) {'DEL', rep_key}) end + local report_rcpts = lua_util.str_split(rcpt_string, ',') + + if report_settings.bcc_addrs then + for _,b in ipairs(report_settings.bcc_addrs) do + table.insert(report_rcpts, b) + end + end + return { message = message, - rcpts = lua_util.str_split(rcpt_string .. (bcc_string or ''), ','), + rcpts = report_rcpts, reporting_domain = reporting_domain } end