]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Skip sending dmarc reports in no-opt mode 4242/head
authorReto Kupferschmid <kupferschmid@puzzle.ch>
Tue, 16 Aug 2022 07:39:02 +0000 (09:39 +0200)
committerReto Kupferschmid <kupferschmid@puzzle.ch>
Tue, 16 Aug 2022 07:41:42 +0000 (09:41 +0200)
fixes https://github.com/rspamd/rspamd/issues/4241

lualib/rspamadm/dmarc_report.lua

index ad727d1774651a57bf7fd1acbf574127447d52a7..85c9051301d376a54af7ee3c3cd91f9c60865f81 100644 (file)
@@ -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 {