selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Inbucket logo

Self-host Inbucket

v3.2.0

Email testing server with built-in SMTP, POP3, and REST API

ReleaseOpen SourceMIT
Updated2 weeks ago
LanguageGo
Setup difficultyEasy
MobileResponsive
Stars
2 310
Ports
9000 (Web interface and REST API), 2500 (SMTP server), 1100 (POP3 server)
Docker
inbucket/inbucket
Install with Docker
Viewing an email message in the web interfaceStatus and metrics dashboardResponsive UI on mobile viewportLive monitor showing real-time message arrival

What is Inbucket?

Inbucket is a disposable webmail server for testing email functionality in applications. It accepts messages sent to any address and makes them accessible through a web UI, a REST API, and a POP3 server. The software includes its own SMTP and POP3 daemons and stores mail locally on disk as simple files, so no external database or mail server is needed. Deployment options include Docker containers, pre-built binaries for major operating systems, Linux packages (deb and rpm) with systemd integration, a community Helm chart for Kubernetes, and building from source. All configuration is handled through environment variables that control ports, storage backend (memory or file-based), message retention policies, mailbox naming schemes, and TLS settings. The web UI provides real-time message monitoring, MIME attachment handling, HTML email rendering, and source viewing. A Go client library is available for the REST API. The project is production-ready and released under the MIT license.

Should you self-host Inbucket?

Inbucket scores 29/100 on selfhost.directory (how scoring works) and ranks #104 of 106 in Email. It has 2 310 GitHub stars.

It shipped 2 stable releases in the past year. The latest, v3.2.0, came out on 10 October 2026. New versions land roughly every 10 months.

An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Listmonk (80/100, 24 017 stars). It scores higher overall, so compare the two before you pick. See Inbucket vs Listmonk side by side.

Features

  • Built-in POP3 server
  • Built-in SMTP server
  • Configurable message retention
  • HTML email preview
  • Load test mode
  • Mailbox naming strategies
  • MIME attachment handling
  • Multiple Storage Backends
  • Per-mailbox message cap
  • Real-time message monitor
  • REST API
  • TLS certificate auto-reload
  • Web Interface

Inbucket README

How to install Inbucket

Install Inbucket with Docker

Docker

docker run -d --name inbucket -p 9000:9000 -p 2500:2500 -p 1100:1100 inbucket/inbucket

Image tags: latest (releases), edge (main branch). Volumes: /config for greeting.html, /storage for emails.

How to configure Inbucket

  • INBUCKET_LOGLEVELinfoLog verbosity level

    Log verbosity level

    values: debug, info, warn, error

  • INBUCKET_LUA_PATHinbucket.luaPath to optional Lua script

    Path to optional Lua script

    values: file path

  • INBUCKET_MAILBOXNAMINGlocalMailbox naming strategy

    Mailbox naming strategy

    values: local, full, domain

  • INBUCKET_POP3_ADDR0.0.0.0:1100POP3 server listen address and port

    POP3 server listen address and port

    values: IP:port

  • INBUCKET_POP3_DOMAINinbucketPOP3 greeting domain

    POP3 greeting domain

    values: domain name

  • INBUCKET_POP3_TIMEOUT600sPOP3 idle network timeout

    POP3 idle network timeout

    values: duration (s, m)

  • INBUCKET_SMTP_ACCEPTDOMAINSDomains to accept mail for

    Domains to accept mail for

    values: comma-separated domains

  • INBUCKET_SMTP_ADDR0.0.0.0:2500SMTP server listen address and port

    SMTP server listen address and port

    values: IP:port

  • INBUCKET_SMTP_DEFAULTACCEPTtrueAccept all mail by default

    Accept all mail by default

    values: true, false

  • INBUCKET_SMTP_DEFAULTSTOREtrueStore all mail by default

    Store all mail by default

    values: true, false

  • INBUCKET_SMTP_DISCARDDOMAINSDomains to discard mail for

    Domains to discard mail for

    values: comma-separated domains

  • INBUCKET_SMTP_DOMAINinbucketSMTP HELO domain

    SMTP HELO domain

    values: domain name

  • INBUCKET_SMTP_MAXMESSAGEBYTES10240000Maximum message size in bytes

    Maximum message size in bytes

    values: positive integer

  • INBUCKET_SMTP_MAXRECIPIENTS200Maximum RCPT TO per message

    Maximum RCPT TO per message

    values: positive integer

  • INBUCKET_SMTP_REJECTDOMAINSDomains to reject mail for

    Domains to reject mail for

    values: comma-separated domains

  • INBUCKET_SMTP_REJECTORIGINDOMAINSDomains to reject mail from

    Domains to reject mail from

    values: comma-separated domains

  • INBUCKET_SMTP_STOREDOMAINSDomains to store mail for

    Domains to store mail for

    values: comma-separated domains

  • INBUCKET_SMTP_TIMEOUT300sSMTP idle network timeout

    SMTP idle network timeout

    values: duration (s, m)

  • INBUCKET_SMTP_TLSCERTcert.crtTLS certificate file

    TLS certificate file

    values: file path

  • INBUCKET_SMTP_TLSENABLEDfalseEnable STARTTLS

    Enable STARTTLS

    values: true, false

  • INBUCKET_SMTP_TLSPRIVKEYcert.keyTLS private key file

    TLS private key file

    values: file path

  • INBUCKET_STORAGE_MAILBOXMSGCAP500Maximum messages per mailbox

    Maximum messages per mailbox

    values: positive integer or 0

  • INBUCKET_STORAGE_PARAMSStorage implementation parameters

    Storage implementation parameters

    values: key:value pairs

  • INBUCKET_STORAGE_RETENTIONPERIOD24hMessage retention period

    Message retention period

    values: duration (m, h)

  • INBUCKET_STORAGE_RETENTIONSLEEP50msSleep between mailbox scans

    Sleep between mailbox scans

    values: duration (ms, s)

  • INBUCKET_STORAGE_TYPEmemoryStorage implementation

    Storage implementation

    values: file, memory

  • INBUCKET_WEB_ADDR0.0.0.0:9000Web server listen address and port

    Web server listen address and port

    values: IP:port

  • INBUCKET_WEB_BASEPATHBase path prefix for UI and API URLs

    Base path prefix for UI and API URLs

    values: URI prefix

  • INBUCKET_WEB_GREETINGFILEui/greeting.htmlGreeting HTML file

    Greeting HTML file

    values: file path

  • INBUCKET_WEB_MONITORHISTORY30Monitor remembered messages

    Monitor remembered messages

    values: integer >= 0

  • INBUCKET_WEB_MONITORVISIBLEtrueShow monitor tab in UI

    Show monitor tab in UI

    values: true, false

  • INBUCKET_WEB_PPROFfalseExpose pprof profiling endpoint

    Expose pprof profiling endpoint

    values: true, false

  • INBUCKET_WEB_UIDIRui/distWeb UI directory

    Web UI directory

    values: file path

Inbucket releases & version history

More in Testing

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…