I am trying to upgrade a machine running dovecot and managesieve from NixOS 25.11 to 26.05.
I run into the following issue: dovecot 2.3 cannot start because it is looking for 2.4 plugins. This is visible in journalctl but also when running doveconf:
[root@server:~]# doveconf
# 2.3.21.1 (d492236fa0): /etc/dovecot/dovecot.conf
doveconf: Error: Couldn’t load plugin /run/current-system/sw/lib/dovecot/modules/settings/libmanagesieve_login_settings.so: dlopen() failed: /nix/store/9m0p75xkd2kmawzj61xngzl5rmczfnnj-dovecot-2.4.4/lib/dovecot/libdovecot-storage.so.0: undefined symbol: unicode_code_points_index16
doveconf: Error: Couldn’t load plugin /run/current-system/sw/lib/dovecot/modules/settings/libmanagesieve_settings.so: dlopen() failed: /run/current-system/sw/lib/dovecot/modules/settings/libmanagesieve_settings.so: undefined symbol: settings_boollist_get
doveconf: Error: Couldn’t load plugin /run/current-system/sw/lib/dovecot/modules/settings/libpigeonhole_settings.so: dlopen() failed: /nix/store/9m0p75xkd2kmawzj61xngzl5rmczfnnj-dovecot-2.4.4/lib/dovecot/libdovecot-storage.so.0: undefined symbol: unicode_code_points_index16
I don’t want to Dovecot 2.4 now (my system.StateVersion is 24.05) so Dovecot 2.3 should be used. It seems there is a mixup between 2.3 and 2.4 when generating the config. But I could not find bug reports about this in GitHub. Am I really the only one who encounters this? How to proceed? (or better: how to make it work?).
from my config:
services.dovecot2 = {
enable = true;
enablePAM = false;
settings = {
protocols = [
"submission"
"sieve"
"imap"
"lmtp"
];
ssl_cert = sslCert;
ssl_key = sslKey;
mail_location = "mdbox:${mailLocation}/%u";
submission_relay_host = "localhost";
submission_relay_trusted = true;
auth_username_format = "%Ln";
recipient_delimiter = ".";
"service lmtp" = {
"unix_listener dovecot-lmtp" = {
group = config.services.postfix.group;
mode = "0600";
user = config.services.postfix.user;
};
};
userdb = {
driver = "ldap";
args = ldapUserDbConfig;
};
passdb = {
driver = "ldap";
args = ldapPassDbConfig;
};
plugin = {
sieve = "file:\~/sieve;active=\~/.dovecot.sieve";
sieve_extensions = [ "+fileinto" ];
};
};
mailPlugins.perProtocol.lmtp.enable = [ "sieve" ];
};
environment.systemPackages = [ pkgs.dovecot_pigeonhole ];
hmm, it looks like there is no version of dovecot_pigeonhole for dovecot 2.3