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:
parent
6a78dc3375
commit
7cb61e6e3a
3 changed files with 40 additions and 2 deletions
|
@ -1,6 +1,21 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
assertions = lib.optionals config.mailserver.enable [
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.mailserver.stateVersion < 2
|
||||
&& config.mailserver.ldap.enable
|
||||
&& config.mailserver.mailDirectory != "/var/vmail";
|
||||
message = ''
|
||||
Issue: The dovecot homedir for LDAP users was previously not respecting `mailserver.mailDirectory`.
|
||||
Remediation:
|
||||
- Stop the `dovecot2.service`
|
||||
- Move `/var/vmail/ldap` below your `mailserver.mailDirectory`
|
||||
- Increase the `stateVersion` to 2.
|
||||
|
||||
Check https://nixos-mailserver.readthedocs.io/en/latest/migrations.html#ldap-home-directory-migration for more information.
|
||||
'';
|
||||
}
|
||||
] ++ lib.optionals config.mailserver.enable [
|
||||
{
|
||||
assertion = config.mailserver.stateVersion != null;
|
||||
message = "The `mailserver.stateVersion` option is not set. Check https://nixos-mailserver.readthedocs.io/en/latest/migrations.html to determine the proper value to initialize it at.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue