RustMail vs Mailpit vs MailHog
Three local SMTP mail catchers with the same default ports. This page is written by the RustMail project, so it says where the others are stronger too.
Pick Mailpit
if you want the widest feature set: HTML client compatibility scores, live link checks, SpamAssassin, POP3 and SMTP failure injection. It is mature and actively maintained.
Pick RustMail
if your tests live in CI: an assertion endpoint built for curl -f, a blocking rustmail assert command and an official GitHub Action, plus full-text search, auth results and a terminal UI.
Move off MailHog
it has had no release since 2020. Both alternatives listen on the same ports, so switching is a one-line change in your Docker Compose file.
Features
| Feature | RustMail | Mailpit | MailHog |
|---|---|---|---|
| Language | Rust | Go | Go |
| License | MIT or Apache 2.0 | MIT | MIT |
| Storage | SQLite, or in memory | SQLite | In memory, MongoDB or files |
| Search | Full-text | Search with filters | By sender, recipient or text |
| Mobile preview | Yes | Yes | Not listed |
| HTML client compatibility check | No | Yes | Not listed |
| Spam score | No | With SpamAssassin | Not listed |
| DKIM, SPF, DMARC and ARC results | Yes | Not listed | Not listed |
| POP3 server | No | Yes | Not listed |
| SMTP failure injection | No | Yes | Yes |
| Release to a real SMTP server | Yes | Yes | Yes |
| Webhooks | Yes | Yes | Not listed |
| CI assertion endpoint | Yes | General REST API | General HTTP API |
| CLI assert mode | Yes | Not listed | Not listed |
| Official GitHub Action | Yes | Not listed | Not listed |
| Terminal UI | Yes, plus a Neovim plugin | Not listed | Not listed |
"Not listed" means the feature is not in the project's README feature list as of October 2026. Corrections are welcome as an issue on GitHub.
Speed, memory and disk
Each tool in Docker on an Apple M4 Pro, 100,000 small messages stored. Latencies are p50, median of at least 3 runs.
| Metric | RustMail | Mailpit | MailHog | MailDev | MailCrab |
|---|---|---|---|---|---|
| Search, rare term | 0.66 ms | 203 ms | 1,265 ms | 81 ms | Not in the API |
| Search, 100,000 hits | 2.9 ms | 536 ms | 358 ms | 63 ms | Not in the API |
| Inbox list, first page | 0.94 ms | 8.3 ms | 2.2 ms | 38 ms | Not in the API |
| Inbox list, offset 90,000 | 1.5 ms | 12.8 ms | 2.4 ms | 39 ms | Not in the API |
| Open one message | 0.46 ms | 0.38 ms | 0.41 ms | 0.38 ms | 0.27 ms |
| Ingest, client in the same VM | 6,025 msg/s | 3,698 msg/s | Not measured | Not measured | Not measured |
| Disk, 100,000 messages | 110 MB | 210 MB | Memory only | 393 MB | Memory only |
| Idle memory | 9.4 MB | 19.6 MB | 22.7 MB | 106.5 MB | 6.6 MB |
| Restart to full inbox | 0.3 s | 0.64 s | Inbox empty | 24 s | Inbox empty |
| Metric | RustMail | Mailpit | Difference |
|---|---|---|---|
| Search, rare term | 0.66 ms | 203 ms | 308x faster |
| Search, 100,000 hits | 2.9 ms | 536 ms | 185x faster |
| Inbox list, first page | 0.94 ms | 8.3 ms | 8.8x faster |
| Inbox list, offset 90,000 | 1.5 ms | 12.8 ms | 8.5x faster |
| Open one message | 0.46 ms | 0.38 ms | Mailpit 1.2x faster |
| Ingest, client in the same VM | 6,025 msg/s | 3,698 msg/s | 1.6x faster |
| Disk, 100,000 messages | 110 MB | 210 MB | 1.9x smaller |
| Idle memory | 9.4 MB | 19.6 MB | 2.1x less |
| Restart to full inbox | 0.3 s | 0.64 s | 2.1x faster |
| Metric | RustMail | MailHog | Difference |
|---|---|---|---|
| Search, rare term | 0.66 ms | 1,265 ms | 1,917x faster |
| Search, 100,000 hits | 2.9 ms | 358 ms | 123x faster |
| Inbox list, first page | 0.94 ms | 2.2 ms | 2.3x faster |
| Inbox list, offset 90,000 | 1.5 ms | 2.4 ms | 1.6x faster |
| Open one message | 0.46 ms | 0.41 ms | About the same |
| Ingest, client in the same VM | 6,025 msg/s | Not measured | |
| Disk, 100,000 messages | 110 MB | Memory only | |
| Idle memory | 9.4 MB | 22.7 MB | 2.4x less |
| Restart to full inbox | 0.3 s | Inbox empty |
| Metric | RustMail | MailDev | Difference |
|---|---|---|---|
| Search, rare term | 0.66 ms | 81 ms | 123x faster |
| Search, 100,000 hits | 2.9 ms | 63 ms | 22x faster |
| Inbox list, first page | 0.94 ms | 38 ms | 40x faster |
| Inbox list, offset 90,000 | 1.5 ms | 39 ms | 26x faster |
| Open one message | 0.46 ms | 0.38 ms | MailDev 1.2x faster |
| Ingest, client in the same VM | 6,025 msg/s | Not measured | |
| Disk, 100,000 messages | 110 MB | 393 MB | 3.6x smaller |
| Idle memory | 9.4 MB | 106.5 MB | 11x less |
| Restart to full inbox | 0.3 s | 24 s | 80x faster |
| Metric | RustMail | MailCrab | Difference |
|---|---|---|---|
| Search, rare term | 0.66 ms | Not in the API | |
| Search, 100,000 hits | 2.9 ms | Not in the API | |
| Inbox list, first page | 0.94 ms | Not in the API | |
| Inbox list, offset 90,000 | 1.5 ms | Not in the API | |
| Open one message | 0.46 ms | 0.27 ms | MailCrab 1.7x faster |
| Ingest, client in the same VM | 6,025 msg/s | Not measured | |
| Disk, 100,000 messages | 110 MB | Memory only | |
| Idle memory | 9.4 MB | 6.6 MB | MailCrab 1.4x less |
| Restart to full inbox | 0.3 s | Inbox empty |
MailHog and MailCrab keep mail in memory only, so a restart empties them; MailHog also runs under amd64 emulation. MailCrab's API has no paged listing or search. The ingest row puts the load generator inside Docker's VM and was run for RustMail and Mailpit only. Method, raw numbers and the harness to rerun them: benchmarks.
Switching from MailHog or Mailpit
Your app's SMTP settings do not change: RustMail listens on 1025 for SMTP and serves the inbox on 8025. Tests that call the MailHog or Mailpit HTTP API do need updating, because RustMail has its own REST API. For most CI checks the assertion endpoint replaces the polling code entirely.