summary refs log tree commit diff
path: root/nixos/modules/services/mail/postfix.nix
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2019-08-30 18:42:28 +0200
committerPeter Simons <simons@cryp.to>2019-08-30 18:44:47 +0200
commiteedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7 (patch)
treed3719267ad52f07786b51c3bbe14c0b5a664278a /nixos/modules/services/mail/postfix.nix
parentd20d6034bd1a50c97d19030d2625dd12d72a3287 (diff)
downloadnixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.tar
nixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.tar.gz
nixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.tar.bz2
nixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.tar.lz
nixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.tar.xz
nixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.tar.zst
nixpkgs-eedf3dc6e28ddc6b8315ea8a4b5dd0d46b09f3a7.zip
nixos/mailman: decouple the mailman module from the postfix module
https://github.com/NixOS/nixpkgs/pull/67708#discussion_r319579987 suggested
that simply appending the necessary maps to the appropriate attributes in
services.postfix.config gets the job done; we don't special support in the
postfix module to accomplish that.
Diffstat (limited to 'nixos/modules/services/mail/postfix.nix')
-rw-r--r--nixos/modules/services/mail/postfix.nix11
1 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/services/mail/postfix.nix b/nixos/modules/services/mail/postfix.nix
index bcf90778346..2b08ab1e6aa 100644
--- a/nixos/modules/services/mail/postfix.nix
+++ b/nixos/modules/services/mail/postfix.nix
@@ -11,10 +11,9 @@ let
 
   haveAliases = cfg.postmasterAlias != "" || cfg.rootAlias != ""
                       || cfg.extraAliases != "";
-  haveTransport = cfg.transport != "" || config.services.mailman.enable;
+  haveTransport = cfg.transport != "";
   haveVirtual = cfg.virtual != "";
-  haveLocalRecipients = cfg.localRecipients != null || config.services.mailman.enable;
-  haveRelayDomains = cfg.relayDomains != null || config.services.mailman.enable;
+  haveLocalRecipients = cfg.localRecipients != null;
 
   clientAccess =
     optional (cfg.dnsBlacklistOverrides != "")
@@ -753,12 +752,12 @@ in
       // optionalAttrs (cfg.domain != "") { mydomain = cfg.domain; }
       // optionalAttrs (cfg.origin != "") { myorigin =  cfg.origin; }
       // optionalAttrs (cfg.destination != null) { mydestination = cfg.destination; }
-      // optionalAttrs haveRelayDomains { relay_domains = optionals (cfg.relayDomains != null) cfg.relayDomains ++ optional config.services.mailman.enable "hash:/var/lib/mailman/data/postfix_domains"; }
+      // optionalAttrs (cfg.relayDomains != null) { relay_domains = cfg.relayDomains; }
       // optionalAttrs (cfg.recipientDelimiter != "") { recipient_delimiter = cfg.recipientDelimiter; }
       // optionalAttrs haveAliases { alias_maps = [ "${cfg.aliasMapType}:/etc/postfix/aliases" ]; }
-      // optionalAttrs haveTransport { transport_maps = [ "hash:/etc/postfix/transport" ] ++ optional config.services.mailman.enable "hash:/var/lib/mailman/data/postfix_lmtp"; }
+      // optionalAttrs haveTransport { transport_maps = [ "hash:/etc/postfix/transport" ]; }
       // optionalAttrs haveVirtual { virtual_alias_maps = [ "${cfg.virtualMapType}:/etc/postfix/virtual" ]; }
-      // optionalAttrs haveLocalRecipients { local_recipient_maps = [ "hash:/etc/postfix/local_recipients" ] ++ optional haveAliases "$alias_maps" ++ optional config.services.mailman.enable "hash:/var/lib/mailman/data/postfix_lmtp"; }
+      // optionalAttrs haveLocalRecipients { local_recipient_maps = [ "hash:/etc/postfix/local_recipients" ] ++ optional haveAliases "$alias_maps"; }
       // optionalAttrs (cfg.dnsBlacklists != []) { smtpd_client_restrictions = clientRestrictions; }
       // optionalAttrs cfg.useSrs {
         sender_canonical_maps = [ "tcp:127.0.0.1:10001" ];