From 0e131d1cbe1b60655e4b00925585a6573972fc20 Mon Sep 17 00:00:00 2001 From: Reto Kupferschmid Date: Tue, 16 Aug 2022 09:39:02 +0200 Subject: [PATCH] [Fix] Skip sending dmarc reports in no-opt mode fixes https://github.com/rspamd/rspamd/issues/4241 --- lualib/rspamadm/dmarc_report.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lualib/rspamadm/dmarc_report.lua b/lualib/rspamadm/dmarc_report.lua index ad727d177..85c905130 100644 --- a/lualib/rspamadm/dmarc_report.lua +++ b/lualib/rspamadm/dmarc_report.lua @@ -725,7 +725,11 @@ local function handler(args) pool:destroy() end - send_reports_by_smtp(opts, all_reports, finish_cb) + if not opts.no_opt then + send_reports_by_smtp(opts, all_reports, finish_cb) + else + logger.messagex('Skip sending mails due to -n / --no-opt option') + end end return { -- 2.39.5