Install
Three ways to run it. Same binary behind all of them.
mxhop is a single static executable with no dynamic dependencies — readelf -d on it finds no NEEDED entry at all, and the build fails if it ever does. That is why the install is short whichever route you pick.
The short way: curl
The installer works out your architecture, fetches the matching binary, checks it against the published checksum and puts it in /usr/local/bin. It is three commands rather than one, and the middle one is the point.
curl -fsSLO https://mxhop.tooling.ninja/install.sh # read it. it is about sixty lines. less install.sh sh install.sh x86_64-unknown-linux-musl mxhop-v0.3.0-x86_64-unknown-linux-musl: OK installed /usr/local/bin/mxhop (v0.3.0) next: write /etc/mxhop/mxhop.toml, then run `mxhop check`
There is no curl … | sh on this page on purpose. This program handles your mail. A tool asking you to run unread code as root, to save you one command, is telling you something about how it treats your machine. Read the sixty lines; they are not interesting, and that is the reassuring part.
The installer is idempotent, takes --version and --prefix, and writes nothing outside the prefix. It does not create a user, a unit file or a config — those are decisions, and it makes none of them for you.
sh install.sh --version 0.3.0 --prefix ~/.local
Then pick how it runs
The installer gives you a binary on disk. Something still has to start it, hold port 25 and bring it back after a reboot.
As a binary
You start it yourself, in a terminal or under whatever supervisor you already use. The shortest path to seeing it work, and the right one for trying it out.
Read it →As a system service
A systemd unit with socket activation: systemd holds port 25 and hands the open socket over, so mxhop runs unprivileged and never needs CAP_NET_BIND_SERVICE.
In a container
A scratch image of about 8 MB for amd64 and arm64, with no shell, no package manager and nothing to update inside it. Compose and Swarm files included.
Whichever you choose, the last step is the same: mxhop check before you point DNS at it, and mxhop health after. Both are on the CLI page.
Before any of them: the config
One file. A domain, where its mail goes, and nothing you do not need.
hostname = "mx.example.com" listen = "0.0.0.0:25" spool_dir = "/var/lib/mxhop/spool" [domains."example.com".aliases] hi = "you@gmail.com" team = ["you@gmail.com", "colleague@fastmail.com"] "*" = "you@gmail.com" noreply = { reject = "550 5.1.1 this address does not accept mail" }
That is enough to accept and forward mail. The docs page covers the blocks that make it behave well in public: [tls], [srs], [auth], [arc], [queue] and [observe].