diff --git a/default.nix b/default.nix index 9d0b542..030355f 100644 --- a/default.nix +++ b/default.nix @@ -1185,8 +1185,8 @@ in if failed port 25 protocol smtp for 5 cycles then restart check process dovecot with pidfile /var/run/dovecot2/master.pid - start program = "${pkgs.systemd}/bin/systemctl start dovecot2" - stop program = "${pkgs.systemd}/bin/systemctl stop dovecot2" + start program = "${pkgs.systemd}/bin/systemctl start dovecot" + stop program = "${pkgs.systemd}/bin/systemctl stop dovecot" if failed host ${cfg.fqdn} port 993 type tcpssl sslauto protocol imap for 5 cycles then restart check process rspamd with matching "rspamd: main process" diff --git a/docs/migrations.rst b/docs/migrations.rst index 6372687..9aff6db 100644 --- a/docs/migrations.rst +++ b/docs/migrations.rst @@ -45,11 +45,11 @@ For remediating this issue the following steps are required: wcurl https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/raw/master/migrations/nixos-mailserver-migration-03.py chmod +x nixos-mailserver-migration-03.py -2. Stop the ``dovecot2.service``. +2. Stop the ``dovecot.service``. .. code-block:: bash - systemctl stop dovecot2.service + systemctl stop dovecot.service 3. Create a backup or snapshot of your ``mailserver.mailDirectory``, so you can restore should anything go wrong. @@ -101,7 +101,7 @@ This migration is required if you both: For remediating this issue the following steps are required: -1. Stop ``dovecot2.service``. +1. Stop ``dovecot.service``. 2. Move ``/var/vmail/ldap`` below your ``mailserver.mailDirectory``. 3. Update the ``mailserver.stateVersion`` to ``2``. diff --git a/mail-server/assertions.nix b/mail-server/assertions.nix index a5f5fe7..7f9c001 100644 --- a/mail-server/assertions.nix +++ b/mail-server/assertions.nix @@ -71,7 +71,7 @@ in message = '' Issue: The dovecot homedir for LDAP users was previously not respecting `mailserver.mailDirectory`. Remediation: - - Stop the `dovecot2.service` + - Stop the `dovecot.service` - Move `/var/vmail/ldap` below your `mailserver.mailDirectory` - Increase the `stateVersion` to 2. diff --git a/tests/clamav.nix b/tests/clamav.nix index 209e91e..159e542 100644 --- a/tests/clamav.nix +++ b/tests/clamav.nix @@ -248,7 +248,7 @@ with subtest("no warnings or errors"): server.fail("journalctl -u postfix | grep -i error >&2") server.fail("journalctl -u postfix | grep -i warning >&2") - server.fail("journalctl -u dovecot2 | grep -i error >&2") - server.fail("journalctl -u dovecot2 | grep -i warning >&2") + server.fail("journalctl -u dovecot | grep -i error >&2") + server.fail("journalctl -u dovecot | grep -i warning >&2") ''; } diff --git a/tests/external.nix b/tests/external.nix index bdbb546..bf9e0a8 100644 --- a/tests/external.nix +++ b/tests/external.nix @@ -489,9 +489,9 @@ server.wait_until_fails('[ "$(postqueue -p)" != "Mail queue is empty" ]') client.succeed("imap-mark-spam >&2") - server.wait_until_succeeds("journalctl -u dovecot -u dovecot2 | grep -i rspamd-learn-spam.sh >&2") + server.wait_until_succeeds("journalctl -u dovecot | grep -i rspamd-learn-spam.sh >&2") client.succeed("imap-mark-ham >&2") - server.wait_until_succeeds("journalctl -u dovecot -u dovecot2 | grep -i rspamd-learn-ham.sh >&2") + server.wait_until_succeeds("journalctl -u dovecot | grep -i rspamd-learn-ham.sh >&2") with subtest("full text search and indexation"): # send 2 email from user2 to user1 @@ -509,9 +509,9 @@ # should fail because this folder is not indexed client.fail("search Junk a >&2") # check that search really goes through the indexer - server.succeed("journalctl -u dovecot -u dovecot2 | grep 'fts-flatcurve(INBOX): Query ' >&2") + server.succeed("journalctl -u dovecot | grep 'fts-flatcurve(INBOX): Query ' >&2") # check that Junk is not indexed - server.fail("journalctl -u dovecot -u dovecot2 | grep 'fts-flatcurve(JUNK): Indexing ' >&2") + server.fail("journalctl -u dovecot | grep 'fts-flatcurve(JUNK): Indexing ' >&2") with subtest("dmarc reporting"): server.systemctl("start rspamd-dmarc-reporter.service") @@ -519,10 +519,10 @@ with subtest("no warnings or errors"): server.fail("journalctl -u postfix | grep -i error >&2") server.fail("journalctl -u postfix | grep -i warning >&2") - server.fail("journalctl -u dovecot -u dovecot2 | grep -v 'imap-login: Debug: SSL error: Connection closed' | grep -i error >&2") + server.fail("journalctl -u dovecot | grep -v 'imap-login: Debug: SSL error: Connection closed' | grep -i error >&2") # harmless ? https://dovecot.org/pipermail/dovecot/2020-August/119575.html server.fail( - "journalctl -u dovecot -u dovecot2 | \ + "journalctl -u dovecot | \ grep -v 'Expunged message reappeared, giving a new UID' | \ grep -v 'Time moved forwards' | \ grep -i warning >&2"