Configuration
All flags can also be set via environment variables (e.g. --smtp → MP_SMTP_BIND_ADDR, --twilio → MP_TWILIO_BIND_ADDR).
| Flag | Env var | Default | Description |
|---|---|---|---|
--smtp | MP_SMTP_BIND_ADDR | 0.0.0.0:1025 | SMTP bind address |
--sendgrid | MP_SENDGRID_BIND_ADDR | 127.0.0.1:8100 | SendGrid v3 Mail Send API bind address (--sendgrid "" to disable) |
--sendgrid-api-key | MP_SENDGRID_API_KEY | Expected Bearer token for /v3/mail/send (skipped when empty) | |
--twilio | MP_TWILIO_BIND_ADDR | [::]:8200 | Twilio SMS ingest bind address |
--twilio-auth-token | MP_TWILIO_AUTH_TOKEN | Twilio auth token: validates Basic Auth on inbound SMS and signs outgoing delivery callbacks | |
--twilio-webhook-url | MP_TWILIO_WEBHOOK_URL | URL to POST SMS status callbacks to (fallback when no per-request StatusCallback) | |
--twilio-callback-delay | MP_TWILIO_CALLBACK_DELAY | 0s | Delay between callbacks in the queued/sent/delivered progression (next release) |
--webhook | MP_WEBHOOK_BIND_ADDR | [::]:8300 | HTTP webhook capture bind address (--webhook "" to disable) |
--listen | MP_UI_BIND_ADDR | 0.0.0.0:8025 | HTTP UI/API bind address |
--db | MP_DATABASE | (in-memory) | SQLite database file path |
--email-webhook-url | MP_EMAIL_WEBHOOK_URL | URL to POST email delivery event webhooks to | |
--email-webhook-signing-key | MP_EMAIL_WEBHOOK_SIGNING_KEY | Base64-encoded SEC1 DER ECDSA P-256 private key (auto-generated when empty) | |
--email-webhook-event-delay | MP_EMAIL_WEBHOOK_EVENT_DELAY | 0s | Delay between events in the email delivery lifecycle (next release) |
Run messagepit --help for the full list, including the options inherited from Mailpit (web UI authentication, SMTP TLS and authentication, POP3, relay, Prometheus metrics and more). The Mailpit documentation covers those in depth.
API
The REST API is documented by the running server at http://localhost:8025/api/v1. The SMS and webhook capture endpoints are listed on the SMS integration and Webhook capture pages.