Skip to content

Mox mailserver 2025 update #1168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ To access the management UI of Mox, a WireGuard network is strongly recommended.
As an alternative you can connect via SSH port re-direction.
For further help, see:

* Hetzner community tutorial [Installing and configuring a WireGuard VPN server on Debian](https://community.hetzner.com/tutorials/install-and-configure-wireguard-vpn-debian)
* [WireGuard on Debian](https://wiki.debian.org/WireGuard) » "Step 2 - Alternative A - Manual Configuration"
* [Step-by-step setup of WireGuard](https://www.server-world.info/en/note?os=Debian_12&p=wireguard&f=1)

Expand Down Expand Up @@ -205,7 +206,7 @@ hcloud server set-rdns --hostname mail.example.com --ip 203.0.113.1 <your_host>
hcloud server set-rdns --hostname mail.example.com --ip 2001:db8:5678::1 <your_host>
```

> **Advanced and out-of-scope**: This setup demonstrates the installation of Mox in a basic, but still safe way. Consider hardening the server even more (e.g. root access, local firewall). If you consider a proxy, please be aware that the mail server needs the real IP of the connection.
> **Advanced and out-of-scope**: This setup demonstrates the installation of Mox in a basic, but still safe way. Consider hardening the server even more (e.g. root access, local firewall). If you consider a proxy, please be aware that the mail server needs the real IP of the remote connection for reputation management.


### Step 2.1 - Reputation of IP addresses
Expand Down Expand Up @@ -287,7 +288,7 @@ chmod +x ./mox

Mox is a single binary file, so that's all.

Use the [`quickstart` command](https://www.xmox.nl/commands/) to generate the setup:
Use the [`quickstart` command](https://www.xmox.nl/commands/#hdr-mox-quickstart) to generate the setup:

```bash
su - mox
Expand Down Expand Up @@ -397,7 +398,7 @@ cd /home/mox

* **Import and export**

Check [Import mailboxes](https://www.xmox.nl/commands/#hdr-mox-export-maildir) to import mails, e.g. for a Dovecot migration.
Check [Import mailboxes](https://www.xmox.nl/commands/#hdr-mox-import-maildir) to import mails, e.g. for a Dovecot migration.

<br>

Expand All @@ -417,19 +418,18 @@ cd /home/mox

* **Backup**

As a *starting point* for a backup, use this script
As a *starting point* for a backup, use this script (mox version v0.0.15 or higher is required):

```bash
#!/bin/bash
MOXDIR=/home/mox
MOXBACKUPDIR=${MOXDIR}/data/tmp/backup
rm -rf ${MOXBACKUPDIR}
/home/mox/mox backup ${MOXBACKUPDIR}/data
/home/mox/mox backup ${MOXBACKUPDIR}
/home/mox/mox verifydata ${MOXBACKUPDIR}/data
cp -rp ${MOXDIR}/config/ ${MOXBACKUPDIR}/config
```

Now backup `MOXBACKUPDIR` to another server (e.g with `restic` or other backup tools).
Now backup `MOXBACKUPDIR` to another server (e.g with `restic` or other backup tools). As the backup destination needs to be cleared for each mox backup you may need to adapt your backup tool call for incremental/differential backups, e.g. with `restic` ignore inodes with `restic backup --ignore-inode ... ${MOXBACKUPDIR}`.


## Conclusion
Expand Down