Inbucket
Open source disposable email testing server with built-in SMTP, POP3, REST, and web interfaces — no database required.
Open source alternative to:


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
A Helm chart is maintained by the community for Kubernetes deployments, and Linux/macOS/Windows binaries are published with each release on GitHub.
Categories:
Frequently Asked Questions
Which platforms does Inbucket run on?
Inbucket ships as a single Go binary for Linux, macOS, and Windows. Official Docker images are published on Docker Hub, the community maintains a Helm chart for Kubernetes, and there is a Homebrew tap for macOS. The web UI runs in any modern browser.
Does Inbucket have an API, webhooks, or CLI?
Inbucket exposes a REST API for listing, viewing, and deleting messages, a Go client at github.com/inbucket/inbucket/pkg/rest/client for use in tests, a built-in SMTP server for receiving mail from your app, and a POP3 server for fetching mail. There is no separate CLI tool, but the REST API can be driven with curl or any HTTP client.
Can I extend or customize Inbucket?
Inbucket 3.1 introduced Lua scripting that lets you write custom rules for accepting, rejecting, transforming, or forwarding messages. Storage backends are also pluggable: in-memory, on-disk, and Redis stores are built in, and the project documents how to add new ones.
Does Inbucket support authentication or multi-user access?
No. Inbucket is designed to run on localhost or inside a private network as a development tool, so it does not ship with user accounts, logins, or per-mailbox access control. Restrict access at the network or reverse proxy layer if you need to.
What are the system requirements to self-host Inbucket?
Inbucket is a single static binary with no external database dependency and a small memory footprint. By default it listens on port 2500 for SMTP, 1100 for POP3, and 9000 for the web UI and REST API; all of these can be remapped or set via environment variables.
Looking for contributors
This project is actively seeking help, join the community!
Repository details
Updated 8/21/2026, 4:00:15 PM
View Repository


