mxhook route
Manage routing rules that connect recipient patterns to webhook endpoints.
Subcommands
route add
Create a new routing rule.
bash
mxhook route add --recipient <pattern> --webhook <url> [flags]Flags
| Flag | Default | Required | Description |
|---|---|---|---|
--recipient | — | Yes | Recipient pattern (e.g., *@yourdomain.com) |
--webhook | — | Yes | Webhook URL |
--api-url | http://localhost:8080 | No | MXHook API URL |
--api-key | — | No | API authentication key |
Examples
Create a catch-all route:
bash
mxhook route add \
--recipient "*@yourdomain.com" \
--webhook "https://yourapp.com/webhook"Create a route for a specific address:
bash
mxhook route add \
--recipient "support@yourdomain.com" \
--webhook "https://yourapp.com/support" \
--api-key your-secret-key