dovecot: respect the mailDirectory base for LDAP home directories

This change is safe, if you have not altered the default value of the
 `mailserver.mailDirectory` setting.
This commit is contained in:
Martin Weinelt 2025-05-22 01:52:17 +02:00
parent 6a78dc3375
commit 7cb61e6e3a
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
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`.