6 maintainers = with lib.maintainers; [ moraxyc ];
12 environment.systemPackages = with pkgs; [
16 services.saslauthd = {
19 DESC="SASL Authentication Daemon"
24 OPTIONS="-c -m /run/saslauthd"
27 services.cyrus-imap = {
40 cmd = [ "tls_prune" ];
92 listen = "/run/cyrus/lmtp";
97 listen = "/run/cyrus/notify";
107 machine.wait_for_unit("saslauthd.service")
108 machine.wait_for_unit("cyrus-imap.service")
110 machine.wait_for_open_port(80)
111 machine.wait_for_open_port(143)
113 machine.succeed("echo 'secret' | ${lib.getExe' pkgs.cyrus_sasl.bin "saslpasswd2"} -p -c cyrus")
114 machine.succeed("chown cyrus /etc/sasldb2")
116 machine.succeed("sudo -ucyrus curl --fail --max-time 10 imap://cyrus:secret@localhost:143")
117 machine.fail("curl --fail --max-time 10 imap://cyrus:wrongsecret@localhost:143")
118 machine.fail("curl --fail --max-time 10 -X PROPFIND -H 'Depth: 1' 'http://localhost/dav/addressbooks/user/cyrus@localhost/Default'")