A fast, feature-rich SMTP mail catcher built in Rust.
Single binary. Persistent storage. Modern UI. CI-ready.
~7 MB binary · 28 KB JS gzipped · zero runtime dependencies
Inspired by MailHog and MailCrab
brew install rustmailapp/rustmail/rustmailOr with Docker:
docker run -p 1025:1025 -p 8025:8025 -e RUSTMAIL_BIND=0.0.0.0 ghcr.io/rustmailapp/rustmail:latestOr from source:
git clone https://github.com/rustmailapp/rustmail
cd rustmail && make buildrustmailPoint your app's SMTP at localhost:1025, then open localhost:8025. Emails show up in real time.
- Persistent storage — SQLite-backed, emails survive restarts (or
--ephemeralfor CI) - Full-text search — FTS5 across subject, body, sender, and recipients
- Real-time updates — WebSocket pushes new emails to the UI instantly
- Modern UI — dark-mode-first, looks and feels like a real email client
- REST assertion endpoints —
GET /api/v1/assert/count?min=1&subject=Welcome - CLI assert mode —
rustmail assert --min-count=2 --subject="Welcome" --timeout=30s - GitHub Action — two-step start + assert, works on Linux and macOS runners
- Ephemeral mode — in-memory DB for test pipelines, no cleanup needed
- DKIM/SPF/DMARC/ARC display — parses authentication headers, color-coded status badges (no other local catcher does this)
- Webhook notifications — fire-and-forget POST on new email via
--webhook-url - Email release — forward captured emails to a real SMTP server
- Export — download as EML or JSON
- Keyboard shortcuts —
j/knavigate,ddelete,Dclear all,/search,Escclose - Dark/light theme — toggle with localStorage persistence
- Flexible config — CLI flags,
RUSTMAIL_*env vars, or TOML config file - Retention policies —
--retention(hours) and--max-messageswith automatic enforcement
- name: Start RustMail
uses: rustmailapp/rustmail-action@v1
- name: Run tests (your app sends emails to localhost:1025)
run: npm test
- name: Assert emails were sent
uses: rustmailapp/rustmail-action@v1
with:
mode: assert
assert-count: 1
assert-subject: "Welcome"Full docs at docs.rustmail.app (source):
- Getting Started
- Configuration
- CI Integration
- Features — Webhooks, Export, Release, Email Auth, WebSocket
- Integrations — Neovim Plugin
- API Reference
- Docker
- Architecture
Licensed under either of:
at your option.

