summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Raymond <robin@robinraymond.de>2017-09-14 10:56:22 +0200
committerRobin Raymond <robin@robinraymond.de>2017-09-14 10:56:22 +0200
commitb98654f99abdf504295a2ee650b47f66620d33df (patch)
treec9011293f2c7ae6fea6ff9beac0eec7ea0c0d6c2
parent561d5e39075489863d75393101697d909319c511 (diff)
fixes #9v1.1-rc2
-rw-r--r--mail-server/postfix.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail-server/postfix.nix b/mail-server/postfix.nix
index cf6a783..5ef634f 100644
--- a/mail-server/postfix.nix
+++ b/mail-server/postfix.nix
@@ -28,6 +28,12 @@ let
in "${from}@${cfg.domain} ${to}@${cfg.domain}")
(builtins.attrNames cfg.virtualAliases);
+ # accountToIdentity :: User -> String
+ accountToIdentity = account: "${account.name}@${cfg.domain} ${account.name}@${cfg.domain}";
+
+ # vaccounts_identity :: [ String ]
+ vaccounts_identity = map accountToIdentity (lib.attrValues cfg.loginAccounts);
+
# valiases_file :: Path
valiases_file = builtins.toFile "valias" (lib.concatStringsSep "\n" valiases_postfix);
@@ -38,8 +44,9 @@ let
# see
# https://blog.grimneko.de/2011/12/24/a-bunch-of-tips-for-improving-your-postfix-setup/
# for details on how this file looks. By using the same file as valiases,
- # every alias is owned (uniquely) by its user.
- vaccounts_file = valiases_file;
+ # every alias is owned (uniquely) by its user. We have to add the users own
+ # address though
+ vaccounts_file = builtins.toFile "vaccounts" (lib.concatStringsSep "\n" (vaccounts_identity ++ valiases_postfix));
in
{