From 44b9a3225919f336d5ff7ed2a28156d2137a6f47 Mon Sep 17 00:00:00 2001 From: niten Date: Fri, 13 Oct 2023 18:35:00 -0700 Subject: [PATCH] Need to make aliases for the full address --- postfix.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/postfix.nix b/postfix.nix index b679b97..10b5e80 100644 --- a/postfix.nix +++ b/postfix.nix @@ -325,9 +325,11 @@ in { userAliasMaps = concatMapAttrsToList (username: userAliases: map (alias: "/^${escapeDot alias}$/ ${username}") userAliases) cfg.aliases.user-aliases; - aliasUserMaps = mapAttrsToList (alias: users: - "/^${escapeDot alias}$/ ${concatStringsSep "," users}") - cfg.aliases.alias-users; + aliasUserMaps = concatMapAttrsToList (alias: users: + (map (domain: + "/^${escapeDot alias}@${escapeDot domain}$/ ${ + concatStringsSep "," users + }") allDomains)) cfg.aliases.alias-users; in writeEntries "sender_login_maps" (defaultMaps ++ userAliasMaps ++ aliasUserMaps); };