diff --git a/dovecot.nix b/dovecot.nix index 8b54d68..fa83bb8 100644 --- a/dovecot.nix +++ b/dovecot.nix @@ -352,7 +352,6 @@ in { passdb { driver = ldap args = ${cfg.ldap-conf} - username_format = %n } # All users map to one actual system user @@ -361,6 +360,8 @@ in { args = uid=${ toString mailUserUid } home=${cfg.state-directory}/mail/%u + user_attrs = =user=%{ldap:cn} + user_filter = (&(objectClass=organizationalPerson)(cn=%n)) } service imap { diff --git a/mail-server.nix b/mail-server.nix index 7b4b705..01525ff 100644 --- a/mail-server.nix +++ b/mail-server.nix @@ -187,42 +187,6 @@ in { }; }; }; - - ## No...these ports were already open - # xinetd = { - # enable = true; - # services = let - # genService = { name, port, protocols ? [ "tcp" ] }: - # map (protocol: { - # inherit name; - # server = "/usr/bin/env"; - # extraConfig = "redirect = 127.0.0.1 ${toString port}"; - # }) protocols; - # in concatMap genService [ - # { - # name = "imap"; - # port = 9143; - # } - # { - # name = "imaps"; - # port = 9993; - # } - # { - # name = "smtp"; - # port = 9025; - # protocols = [ "tcp" "udp" ]; - # } - # { - # name = "submission"; - # port = 9587; - # protocols = [ "tcp" "udp" ]; - # } - # { - # name = "submissions"; - # port = 9465; - # } - # ]; - # }; }; fudo.secrets.host-secrets."${hostname}" = {