Running mailrust

Troubleshooting

Most problems show up in the service log. Start there:

sudo journalctl -u mailrust -n 100
sudo journalctl -u mailrust -f

For more detail, set MAILRUST_LOG=debug in /etc/mailrust/mailrust.env and restart the service. Set it back to info afterwards: debug logs are long.

sudo -u mailrust mailrust setup-link

The link also appears in the log when the service starts, until the first administrator exists.

No certificate with HTTPS by itself

  • The domain's A and AAAA records must point at this server. Check with dig +short mail.example.com.
  • Nothing else may use port 443; port 80 is needed for the redirect. Check with sudo ss -tlnp | grep -E ':(80|443) '.
  • A firewall must let ports 80 and 443 in.
  • Let's Encrypt limits how often it issues certificates for a name. While you experiment, set MAILRUST_ACME_DIRECTORY=staging.

Everyone appears to come from one address

Your proxy runs on another machine, so mailrust does not trust its forwarding headers. Name it in MAILRUST_TRUSTED_PROXIES; see HTTPS and proxies.

"Run the command as that user"

The command was run as root, and the data belongs to the mailrust user. Repeat it with sudo -u mailrust.

The service does not start after an update

mailrust update puts the previous version back by itself and says so. If the log mentions a database schema the program does not know, the database was already moved by a newer version: install that version again, or restore the copy made before the move, as described in Updates.

Signing in is refused for a while

After five wrong passwords within fifteen minutes, mailrust pauses sign-in for that login and for that address for fifteen minutes. An administrator can set a new password with mailrust passwd.