Running mailrust

Updates

Releases are signed. One command checks for a new version, installs it and keeps the previous one in case something goes wrong.

Update

sudo mailrust update

It runs in this order:

  1. Downloads the list of releases and checks its Ed25519 signature against the key built into mailrust.
  2. Downloads the release for this machine and checks its size and SHA-256 checksum.
  3. Starts the new program once to ask its version. A damaged download stops here.
  4. Moves the current program aside as mailrust.previous and puts the new one in its place.
  5. Restarts the mailrust service and waits until it answers.
  6. If it does not start, puts the previous program back and restarts it.

Only check, without installing:

mailrust update --check

Before you update

Read what's new. A release that changes the database schema says so. mailrust copies the database to the backups folder before it moves it to a new schema, and keeps the last three such copies.

Going back

If the new version runs but you want the old one back:

sudo systemctl stop mailrust
sudo mv /usr/local/bin/mailrust.previous /usr/local/bin/mailrust
sudo systemctl start mailrust

If the new version had already moved the database to a newer schema, the old program will refuse to open it and says so in the log. Restore the copy made before the move: it is in backups/ and its name starts with premigrate-schema. See Backups.

Updating with the installer

Running the installer again also installs the latest version and keeps your data and settings. It checks the checksum of the download, but not the signature of the release list, so prefer mailrust update.

curl -fsSL https://mailrust.com/install.sh | sh