diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-04 11:56:31 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-11 00:31:12 +0000 |
commit | d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47 (patch) | |
tree | 7df329c08948c1c4c410c41a10abb7621d90aa0d /nixos | |
parent | afca74b7119e543ef40fcbd316a95c82a2d07a71 (diff) | |
download | nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.tar nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.tar.gz nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.tar.bz2 nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.tar.lz nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.tar.xz nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.tar.zst nixpkgs-d45fc07bc29c1a3d0e1eac61666d020c5b0e3a47.zip |
nixos/postfix: add services.postfix.canonical opt
This mirrors the services.postfix.transport and services.postfix.virtual options we already have.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/mail/postfix.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index 63c0961b756..8e5bed5fcb8 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -11,6 +11,7 @@ let haveAliases = cfg.postmasterAlias != "" || cfg.rootAlias != "" || cfg.extraAliases != ""; + haveCanonical = cfg.canonical != ""; haveTransport = cfg.transport != ""; haveVirtual = cfg.virtual != ""; haveLocalRecipients = cfg.localRecipients != null; @@ -244,6 +245,7 @@ let ; aliasesFile = pkgs.writeText "postfix-aliases" aliases; + canonicalFile = pkgs.writeText "postfix-canonical" cfg.canonical; virtualFile = pkgs.writeText "postfix-virtual" cfg.virtual; localRecipientMapFile = pkgs.writeText "postfix-local-recipient-map" (concatMapStrings (x: x + " ACCEPT\n") cfg.localRecipients); checkClientAccessFile = pkgs.writeText "postfix-check-client-access" cfg.dnsBlacklistOverrides; @@ -529,6 +531,15 @@ in "; }; + canonical = mkOption { + type = types.lines; + default = ""; + description = '' + Entries for the <citerefentry><refentrytitle>canonical</refentrytitle> + <manvolnum>5</manvolnum></citerefentry> table. + ''; + }; + virtual = mkOption { type = types.lines; default = ""; @@ -941,6 +952,9 @@ in (mkIf haveAliases { services.postfix.aliasFiles.aliases = aliasesFile; }) + (mkIf haveCanonical { + services.postfix.mapFiles.canonical = canonicalFile; + }) (mkIf haveTransport { services.postfix.mapFiles.transport = transportFile; }) |