nixos/postfix: don't emit alias_maps config option if we don't have aliases set

This commit is contained in:
Nikolay Amiantov 2016-01-09 02:48:24 +03:00
parent 3891d3e654
commit 22fb0cb058

View File

@ -57,8 +57,6 @@ let
else
"[" + cfg.relayHost + "]"}
alias_maps = hash:/var/postfix/conf/aliases
mail_spool_directory = /var/spool/mail/
setgid_group = ${setgidGroup}
@ -85,6 +83,8 @@ let
''
+ optionalString (cfg.transport != "") ''
transport_maps = hash:/etc/postfix/transport
+ optionalString (cfg.postmasterAlias != "" || cfg.rootAlias != "" || cfg.extraAliases != "") ''
alias_maps = hash:/var/postfix/conf/aliases
''
+ cfg.extraConfig;