Merge branch 'dont-hardcode-ldap-home-base' into 'master'

dovecot: respect the mailDirectory base for LDAP home directories

See merge request simple-nixos-mailserver/nixos-mailserver!400
This commit is contained in:
Martin Weinelt 2025-05-29 21:14:25 +00:00
commit ffd0e6f8f2
3 changed files with 40 additions and 2 deletions

View file

@ -13,6 +13,29 @@ to your setup.
NixOS 25.11
-----------
#2 LDAP home directory migration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Dovecot configuration for LDAP home directories previously did not respect
the ``mailserver.mailDirectory`` setting.
This means that home directories were unconditionally located at
``/var/vmail/ldap/%{user}``.
This migration is required if you both:
* enabled the LDAP integration (``mailserver.ldap.enable``)
* and customized the default mail directory (``mailserver.mailDirectory != "/var/vmail"``)
For remediating this issue the following steps are required:
1. Stop ``dovecot2.service``.
2. Move ``/var/vmail/ldap`` below your ``m̀ailserver.mailDirectory``.
3. Update the ``mailserver.stateVersion`` to ``2``.
#1 Initialization
^^^^^^^^^^^^^^^^^
This option was introduced in the NixOS 25.11 release cycle, in which case you
can safely initialize its value at `1`.