diff options
author | Viktor Kleen <viktor@kleen.org> | 2016-01-05 02:59:16 -0800 |
---|---|---|
committer | Viktor Kleen <viktor@kleen.org> | 2016-01-05 02:59:16 -0800 |
commit | ebd8e2c380c42e375f9860347a20245f01fbfc24 (patch) | |
tree | 85ebd6c5b8c685e0685df04302532e4b3f2eedde /nixos | |
parent | 8fad959b15cba08a11a1f95b2f8fec6f977b06d1 (diff) | |
download | nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.tar nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.tar.gz nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.tar.bz2 nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.tar.lz nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.tar.xz nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.tar.zst nixlib-ebd8e2c380c42e375f9860347a20245f01fbfc24.zip |
postfix service: include configuration option for transport maps
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/mail/postfix.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix index c18ed5998685..2b9175036bea 100644 --- a/nixos/modules/services/mail/postfix.nix +++ b/nixos/modules/services/mail/postfix.nix @@ -83,6 +83,9 @@ let + optionalString (cfg.virtual != "") '' virtual_alias_maps = hash:/etc/postfix/virtual '' + + optionalString (cfg.transport != "") '' + transport_maps = hash:/etc/postfix/transport + '' + cfg.extraConfig; masterCf = '' @@ -142,6 +145,7 @@ let virtualFile = pkgs.writeText "postfix-virtual" cfg.virtual; mainCfFile = pkgs.writeText "postfix-main.cf" mainCf; masterCfFile = pkgs.writeText "postfix-master.cf" masterCf; + transportFile = pkgs.writeText "postfix-transport" cfg.transport; in @@ -314,6 +318,13 @@ in "; }; + transport = mkOption { + default = ""; + description = " + Entries for the transport map, cf. man-page transport(8). + "; + }; + extraMasterConf = mkOption { default = ""; example = "submission inet n - n - - smtpd"; @@ -392,6 +403,7 @@ in ln -sf ${virtualFile} /var/postfix/conf/virtual ln -sf ${mainCfFile} /var/postfix/conf/main.cf ln -sf ${masterCfFile} /var/postfix/conf/master.cf + ln -sf ${transportFile} /var/postfix/conf/transport ${pkgs.postfix}/sbin/postalias -c /var/postfix/conf /var/postfix/conf/aliases ${pkgs.postfix}/sbin/postmap -c /var/postfix/conf /var/postfix/conf/virtual |