From 1a82257636d92ce21ba3275d85955074a4091341 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 4 Mar 2025 20:14:45 +0100 Subject: modules/stalwart-mail: Avoid hardcoding `vhack.eu` email address --- modules/by-name/st/stalwart-mail/module.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'modules/by-name/st/stalwart-mail/module.nix') diff --git a/modules/by-name/st/stalwart-mail/module.nix b/modules/by-name/st/stalwart-mail/module.nix index 4595c21..76149c3 100644 --- a/modules/by-name/st/stalwart-mail/module.nix +++ b/modules/by-name/st/stalwart-mail/module.nix @@ -20,6 +20,18 @@ in { package = lib.mkPackageOption vhackPackages "stalwart-mail-free" {}; + admin = lib.mkOption { + description = '' + Email address to advertise as administrator. This is the address, where dkim, spv + etc. refusal reports are sent to. + + The format should be: `mailto:@` + ''; + type = lib.types.str; + example = "mailto:dmarc+rua@example.com"; + default = ""; + }; + fqdn = lib.mkOption { type = lib.types.str; example = "mail.foss-syndicate.org"; @@ -103,6 +115,13 @@ in { }; config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = cfg.admin != ""; + message = "You need to specify an admin address."; + } + ]; + services.stalwart-mail = { # NOTE(@bpeetz): We do not use the nixos service, as it comes with too much # bothersome default configuration and not really any useful config. -- cgit 1.4.1