Skip to content

Binary

Run MXHook as a single binary on any Linux, macOS, or Windows machine.

Download

Download the latest release from GitHub Releases:

bash
# Linux (amd64)
curl -L https://github.com/mxhook/mxhook/releases/latest/download/mxhook_linux_amd64.tar.gz | tar xz

# macOS (arm64)
curl -L https://github.com/mxhook/mxhook/releases/latest/download/mxhook_darwin_arm64.tar.gz | tar xz

Build from Source

Requires Go 1.26+:

bash
git clone https://github.com/mxhook/mxhook.git
cd mxhook
make build

This produces a ./mxhook binary.

Run

MXHook requires a PostgreSQL database. Start the server with:

bash
./mxhook start \
  --smtp-addr 0.0.0.0:25 \
  --smtp-domain mail.yourdomain.com \
  --api-addr 0.0.0.0:8080 \
  --db-url "postgres://mxhook:mxhook@localhost:5432/mxhook?sslmode=disable"

Or use environment variables:

bash
export MXHOOK_SMTP_ADDR=0.0.0.0:25
export MXHOOK_SMTP_DOMAIN=mail.yourdomain.com
export MXHOOK_API_ADDR=0.0.0.0:8080
export MXHOOK_POSTGRES_DSN=postgres://mxhook:mxhook@localhost:5432/mxhook?sslmode=disable

./mxhook start

Systemd Service

For production Linux deployments, create a systemd unit:

ini
# /etc/systemd/system/mxhook.service
[Unit]
Description=MXHook Inbound Email Webhooks
After=network.target postgresql.service

[Service]
Type=simple
User=mxhook
EnvironmentFile=/etc/mxhook/env
ExecStart=/usr/local/bin/mxhook start
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
bash
sudo systemctl enable --now mxhook

Released under the Apache 2.0 License.