]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/mail/postfix.nix
Remove smtpd for immae-eu
[perso/Immae/Config/Nix.git] / modules / private / mail / postfix.nix
index 2af184907ee918c27585c0192a074179b59a9cf2..d8640f8d57c66370266c48471d59446ceb9f3d67 100644 (file)
         ### Virtual mailboxes config
         virtual_alias_maps = "hash:/etc/postfix/virtual mysql:${config.secrets.fullPaths."postfix/mysql_alias_maps"} ldap:${config.secrets.fullPaths."postfix/ldap_ejabberd_users_immae_fr"}";
         virtual_mailbox_domains = config.myEnv.mail.postfix.additional_mailbox_domains
-        ++ lib.remove "localhost.immae.eu" (lib.remove null (lib.flatten (map
+        ++ lib.remove null (lib.flatten (map
             (zone: map
               (e: if e.receive
               then "${e.domain}${lib.optionalString (e.domain != "") "."}${zone.name}"
               (zone.withEmail or [])
             )
             config.myEnv.dns.masterZones
-          )));
+          ));
         virtual_mailbox_maps = "hash:/etc/postfix/host_dummy_mailboxes mysql:${config.secrets.fullPaths."postfix/mysql_mailbox_maps"}";
         dovecot_destination_recipient_limit = "1";
         virtual_transport = "dovecot";
         milter_macro_daemon_name = "ORIGINATING";
         smtpd_milters = "unix:${config.myServices.mail.milters.sockets.opendkim}";
       };
-      # FIXME: Mail adressed to localhost.immae.eu will still have mx-1 as
-      # prioritized MX, which provokes "mail for localhost.immae.eu loops
-      # back to myself" errors. This transport entry forces to push
-      # e-mails to its right destination.
-      transport = ''
-        localhost.immae.eu   smtp:[immae.eu]:25
-        '';
       destination = ["localhost"];
       # This needs to reverse DNS
       hostname = config.hostEnv.fqdn;