import ./make-test.nix { name = "dovecot"; machine = { pkgs, ... }: { imports = [ common/user-account.nix ]; services.postfix.enable = true; services.dovecot2.enable = true; services.dovecot2.protocols = [ "imap" "pop3" ]; environment.systemPackages = let sendTestMail = pkgs.writeScriptBin "send-testmail" '' #!${pkgs.stdenv.shell} exec sendmail -vt <waitForUnit('postfix.service'); $machine->waitForUnit('dovecot2.service'); $machine->succeed('send-testmail'); $machine->succeed('send-lda'); $machine->waitUntilFails('[ "$(postqueue -p)" != "Mail queue is empty" ]'); $machine->succeed('test-imap'); $machine->succeed('test-pop'); ''; }