diff options
Diffstat (limited to 'modules/by-name/st/stalwart-mail/module.nix')
-rw-r--r-- | modules/by-name/st/stalwart-mail/module.nix | 19 |
1 files changed, 19 insertions, 0 deletions
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:<name>@<domain>` + ''; + 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. |