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 xzBuild from Source
Requires Go 1.26+:
bash
git clone https://github.com/mxhook/mxhook.git
cd mxhook
make buildThis 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 startSystemd 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.targetbash
sudo systemctl enable --now mxhook