From 8e8cc54f75c9265a6bd922c0a3cd9f54bd0c3c20 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 4 Mar 2024 19:42:28 +0100 Subject: [PATCH] mail: configure periodically sent dmarc aggregate reports --- modules/mail/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/mail/default.nix b/modules/mail/default.nix index 9bf77ff..0ec2f8d 100644 --- a/modules/mail/default.nix +++ b/modules/mail/default.nix @@ -314,6 +314,15 @@ in } } ''; + "dmarc.conf".text = '' + reporting { + enabled = true; + email = 'reports@${config.networking.domain}'; + domain = '${config.networking.domain}'; + org_name = '${config.networking.domain}'; + from_name = 'DMARC Aggregate Report'; + } + ''; "dkim_signing.conf".text = '' selector = "quitte-rspamd"; allow_username_mismatch = true; @@ -411,4 +420,16 @@ in "dovecot2.service" ]; }; + systemd = { + services.rspamd-dmarc-report = { + description = "rspamd dmarc reporter"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.rspamd}/bin/rspamadm dmarc_report -v"; + User = "rspamd"; + Group = "rspamd"; + }; + startAt = "daily"; + }; + }; }