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
| Setting | What it does | Default |
MAILRUST_DATA_DIR | Folder with the database, the master key and everything else mailrust keeps | ./data; /var/lib/mailrust after the installer |
MAILRUST_LISTEN | Address and port of the web interface in proxy mode | 127.0.0.1:8420 |
MAILRUST_PUBLIC_URL | The address this installation is reachable at; overrides the one set in the admin console | none |
MAILRUST_LOG | Log level: error, warn, info, debug, trace | info |
MAILRUST_ENV_FILE | Another 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.
| Setting | What it does | Default |
MAILRUST_DOMAIN | Names to serve, separated by commas | none: proxy mode |
MAILRUST_ACME_EMAIL | Contact for Let's Encrypt notices | none |
MAILRUST_HTTPS_LISTEN | Address for HTTPS | [::]:443 |
MAILRUST_HTTP_LISTEN | Address for the redirect to HTTPS, or off | [::]:80 |
MAILRUST_ACME_DIRECTORY | Another ACME service, or staging | Let's Encrypt |
MAILRUST_ACME_CA | Root certificate of a private ACME service | none |
MAILRUST_TRUSTED_PROXIES | Proxies on other machines, separated by commas, or private | none |
Updates
| Setting | What it does | Default |
MAILRUST_SERVICE | Name of the systemd service that mailrust update restarts | mailrust |
MAILRUST_UPDATE_URL | Where to look for releases | https://mailrust.com/download/latest.json |
Everything else
| Setting | What it does | Default |
MAILRUST_PASSKEY_ORIGIN | Address passkeys are bound to, when it differs from the installation's address | the installation's address |
MAILRUST_CONTACT | Contact address given to browser push services | the person's first mailbox |
The data folder
Inside MAILRUST_DATA_DIR | What it is |
mailrust.db | The database: the mail index, contacts, campaigns, settings |
master.key | The 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-token | The first-run key; gone once the first administrator exists |