What is Mailpit?
Mailpit stands in for a real mail server while you build and test software. Point your app's SMTP settings at it (port 1025 by default) and every message it sends lands in a web inbox on port 8025 instead of a customer's mailbox. The inbox shows the HTML, text, headers, raw source and attachments, and a REST API with an OpenAPI spec lets test suites read messages, pull out links or codes and clear the box between runs.
Around that core sit checks a developer would otherwise do by hand: an HTML check that scores compatibility with email clients, a link check, a spam score through SpamAssassin or Rspamd, screenshots, and a mobile preview. A chaos mode makes SMTP fail on purpose to test retry logic, and release, forwarding, POP3, tagging and webhooks are all optional. The docs put ingestion at 200 to 300 emails a second, and by default it keeps the most recent 500 messages.
Ralph Slooten wrote it from scratch in Go in 2022 as a replacement for MailHog, which is no longer maintained. It ships as one static binary or a multi-architecture Docker image that Docker Hub counts at about 254.7 million pulls, it is the mail catcher in Laravel Sail and DDEV, and the repository has about 11,100 stars. The licence is MIT and the latest release is v1.34.0, from 17 November 2026.
Is Mailpit worth it?
Every web app that sends a password reset needs somewhere for that email to go during development, and for years the answer was MailHog, which stopped shipping releases in 2020. Mailpit took over the job and the default ports, 1025 for SMTP and 8025 for the web UI, so in most Docker Compose files switching is a one-line image change. Laravel Sail and DDEV both bundle it now. Next to MailCatcher or Maildev it adds a search syntax, tags, HTML and link checks and an API complete enough to drive end-to-end tests.
The API is where it earns a place in automated testing, including tests that AI agents write and run. A Playwright or pytest suite can trigger a sign-up, poll Mailpit for the confirmation email, extract the link and carry on, and the chaos setting can make SMTP fail on purpose to test error paths. In October 2026 a user asked for a built-in MCP server so coding agents could read the inbox; Ralph Slooten declined, as he had twice before, saying the REST API and its OpenAPI spec already cover it and an MCP layer would add network surface without new capability. Community MCP servers exist, and he points to amirhmoradi/mailpit-mcp, but they are third-party code.
The security record needs reading before deployment. GitHub lists 18 security advisories for Mailpit in 2026 alone, one rated high (unbounded CPU and memory use through crafted image thumbnails, October) and the rest medium: SSRF through the link check, HTML check and proxy endpoints, cross-site WebSocket hijacking, memory-exhaustion denial of service, a path traversal in the dump command and, on 17 November, a crash from one malformed unauthenticated SMTP message. Each was fixed and published promptly, which reflects well on the maintainer, but the pattern matters because Mailpit listens on 0.0.0.0 by default with no authentication on the UI or SMTP.
Maintenance is energetic and concentrated. Releases arrive every week or two (six between 11 October and 17 November 2026), Ralph Slooten has made 2,079 of the commits, and only two issues and pull requests were open on 30 November. The project is a one-person effort with a commercial companion, Mailtrap, credited in the README, which readers should know about.
Our take: there is little reason to run anything else for local and CI email testing. Bind it to localhost or a private network, turn on UI and SMTP authentication if anyone else can reach it, and update it as often as it updates.
Where it earns its place
A Laravel or Django developer working on sign-up and password-reset flows
See exactly what each transactional email looks like without mailing real addresses
Run the axllent/mailpit image next to the app, set SMTP host to it on port 1025 and open port 8025. HTML check flags markup that Outlook or Gmail will mangle, and link check catches broken URLs before release. Free, and setup takes about five minutes.
A QA engineer maintaining Playwright end-to-end tests for a SaaS product
Test the full sign-up flow, including the confirmation email and one-time code
The test creates an account, then queries /api/v1/search on Mailpit for the newest message to that address, reads the code or link from the message and continues. Deleting all messages between tests keeps runs independent; the chaos setting can simulate SMTP failures.
A developer letting a coding agent build and test email features
Have the agent check the emails its code sends without access to a real inbox
Give the agent Mailpit's OpenAPI spec at /api/v1/swagger.json and let it call the REST API, as the maintainer suggests, or add a community MCP server such as amirhmoradi/mailpit-mcp. Keep Mailpit bound to localhost so the agent's test inbox is not reachable from outside.
Before you commit
- Setup
- brew install mailpit, pkg install mailpit, the AUR package, a static binary for Windows, Linux or macOS, or the Docker image for 386, amd64 and arm64. Point the app's SMTP at port 1025 and open port 8025; first mail in a few minutes. It can also replace sendmail.
- Integrations
- SMTP (optional STARTTLS or TLS and authentication), REST API with OpenAPI spec, WebSocket updates, webhooks, POP3, SMTP relay and forwarding, SpamAssassin or Rspamd for spam scores; bundled in Laravel Sail and DDEV; community MCP servers.
- Data and privacy
- Captured mail is stored locally and pruned to the most recent 500 messages by default. Nothing is sent onward unless you set up relay or forwarding. The UI and SMTP listen on 0.0.0.0 without authentication by default; HTTPS and auth are optional settings. 18 advisories published in 2026, all fixed. MIT licence.
- Cost at scale
- Free. Small CPU and memory footprint; ingests 200 to 300 messages a second depending on CPU, network and message size. Team inboxes and hosting are not offered; the README points those needs to Mailtrap.
- Limits
- One inbox, no multi-user accounts; spam checks need a separate SpamAssassin or Rspamd server; not meant for internet exposure given its advisory history; a single maintainer.
What’s good
- Single static binary or Docker image; drop-in for MailHog's ports
- REST API with OpenAPI spec for automated and end-to-end tests
- HTML, link and spam checks, screenshots and a chaos mode
- Fast releases; security advisories published and fixed promptly
What’s not
- 18 security advisories in 2026, one rated high
- Listens on 0.0.0.0 with no authentication by default
- One maintainer writes almost all of the code
- No built-in MCP server; agents use the API or third-party wrappers
Best for
Web and backend developers, QA engineers and CI pipelines that need to catch and inspect outgoing email without sending any of it.
Mailpit: common questions
- Is Mailpit worth it?
- Mailpit is the mail catcher to install by default in development and CI, as long as you treat it as a test tool and keep its ports off the internet. We rate it 4.5 out of 5.
- How much does Mailpit cost?
- Free under MIT; the README points team and hosted needs to Mailtrap, a separate commercial service.
- What are the downsides of Mailpit?
- 18 security advisories in 2026, one rated high; listens on 0.0.0.0 with no authentication by default; one maintainer writes almost all of the code; no built-in MCP server; agents use the API or third-party wrappers.
- Who is Mailpit best for?
- Web and backend developers, QA engineers and CI pipelines that need to catch and inspect outgoing email without sending any of it.
- How much does Mailpit cost for a team or in production?
- Free. Small CPU and memory footprint; ingests 200 to 300 messages a second depending on CPU, network and message size. Team inboxes and hosting are not offered; the README points those needs to Mailtrap.
- Is Mailpit safe for company data?
- Captured mail is stored locally and pruned to the most recent 500 messages by default. Nothing is sent onward unless you set up relay or forwarding. The UI and SMTP listen on 0.0.0.0 without authentication by default; HTTPS and auth are optional settings. 18 advisories published in 2026, all fixed. MIT licence.
Answers checked Nov 30, 2026.