Inbucket
Open source disposable email testing server with built-in SMTP, POP3, REST, and web interfaces — no database required.
What is Inbucket
Inbucket is a disposable webmail server built for testing and developing applications that send email. It accepts messages for any address, stores them in memory, and exposes them through a web UI, a REST API, and POP3 — making it easy to inspect what your application actually sent without polluting a real inbox or hitting a third-party service.
Unlike hosted tools such as Mailtrap, Inbucket is a single self-contained Go binary with no external dependencies: the HTTP server, SMTP listener, POP3 listener, and storage engine are all built in. The official Docker image has been downloaded over a million times and the project is tagged as production quality by its maintainers.
Key features
- SMTP, POP3, REST, and web — accept mail on SMTP, fetch mail over POP3, query and delete messages via a documented REST API, and browse them in a web inbox at the default port 9000.
- No database required — storage is in-memory by default, so spinning it up for a test run is just one
docker runcommand. - Pluggable storage — in-memory, on-disk, and Redis backends are available, with configuration via environment variables.
- Lua scripting (3.1+) — custom rules for accepting, rejecting, transforming, or forwarding messages.
- TLS support for both SMTP and POP3 services.
- Go client library at
github.com/inbucket/inbucket/pkg/rest/clientfor integration tests. - Cross-platform binaries for Linux, macOS, and Windows, plus Docker images, a Helm chart, and a Homebrew tap.
How it compares to Mailtrap
Mailtrap is a paid SaaS that provides a virtual inbox for capturing staging and development email, with team inboxes, email previews across clients, and CI integrations. Inbucket covers the core use case — a local fake SMTP server that captures outbound mail from your app — entirely on your own infrastructure, with no account, no quota, and no per-seat pricing. You give up Mailtrap's polished email-client previews and team-shared inboxes, and you gain a fully self-hostable, MIT-licensed tool you can run in CI, in air-gapped environments, and in unit tests against a localhost SMTP port.
Self-hosting
Inbucket is trivial to self-host. The fastest path is the official Docker image:
docker run -d --name inbucket -p 9000:9000 -p 2500:2500 -p 1100:1100 inbucket/inbucket