Files
mailmig/tests/expected-dovecot-master-user.nix
T

21 lines
763 B
Nix

# TEMPORARY: Dovecot master user for the mail migration (mailmig).
# Lets "<account>*mailmig" log in to any mailbox with the master password.
# Import this module on the SNM host only while migrating, then remove it.
#
# Create the passwd file on the host (root, 0640 root:dovecot2):
# printf 'mailmig:{CRYPT}%s\n' "$(mkpasswd -m sha-512)" > /var/lib/dovecot-master-users
{ ... }:
{
services.dovecot2.settings = {
auth_master_user_separator = "*";
"passdb mailmig-master" = {
driver = "passwd-file";
passwd_file_path = "/var/lib/dovecot-master-users";
master = true;
# After the master password checks out, still require the target
# account to exist in SNM's own passdb.
result_success = "continue";
};
};
}