Running mailrust

Configuration

mailrust is configured with environment variables. The installer writes them to /etc/mailrust/mailrust.env; the service reads that file, and so do commands you type by hand. After a change, restart the service:

sudo systemctl restart mailrust

Everything else, from mailboxes to retention rules, is set in the web interface.

Where things are

SettingWhat it doesDefault
MAILRUST_DATA_DIRFolder with the database, the master key and everything else mailrust keeps./data; /var/lib/mailrust after the installer
MAILRUST_LISTENAddress and port of the web interface in proxy mode127.0.0.1:8420
MAILRUST_PUBLIC_URLThe address this installation is reachable at; overrides the one set in the admin consolenone
MAILRUST_LOGLog level: error, warn, info, debug, traceinfo
MAILRUST_ENV_FILEAnother settings file for commands typed by hand/etc/mailrust/mailrust.env

HTTPS

These turn on HTTPS of its own; see HTTPS and proxies for details.

SettingWhat it doesDefault
MAILRUST_DOMAINNames to serve, separated by commasnone: proxy mode
MAILRUST_ACME_EMAILContact for Let's Encrypt noticesnone
MAILRUST_HTTPS_LISTENAddress for HTTPS[::]:443
MAILRUST_HTTP_LISTENAddress for the redirect to HTTPS, or off[::]:80
MAILRUST_ACME_DIRECTORYAnother ACME service, or stagingLet's Encrypt
MAILRUST_ACME_CARoot certificate of a private ACME servicenone
MAILRUST_TRUSTED_PROXIESProxies on other machines, separated by commas, or privatenone

Updates

SettingWhat it doesDefault
MAILRUST_SERVICEName of the systemd service that mailrust update restartsmailrust
MAILRUST_UPDATE_URLWhere to look for releaseshttps://mailrust.com/download/latest.json

Everything else

SettingWhat it doesDefault
MAILRUST_PASSKEY_ORIGINAddress passkeys are bound to, when it differs from the installation's addressthe installation's address
MAILRUST_CONTACTContact address given to browser push servicesthe person's first mailbox

The data folder

Inside MAILRUST_DATA_DIRWhat it is
mailrust.dbThe database: the mail index, contacts, campaigns, settings
master.keyThe key that encrypts mailbox passwords and other secrets. Keep a copy of it: without it they cannot be read
backups/Daily copies of the database and a copy before every schema upgrade
bodies/Message bodies fetched from your mail servers
media/Images uploaded for newsletters
acme/Certificates, when mailrust serves HTTPS itself
setup-tokenThe first-run key; gone once the first administrator exists