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.

Mailpit logo

Self-host Mailpit

v1.33.1

Mail catcher for dev testing with web UI and API

ReleaseOpen SourceMIT
docker run -d --restart unless-stopped --name=mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit
Updated2 days ago
LanguageGo
Setup difficultyEasy
Stars
10 891
Ports
8025 (Web UI and REST API (HTTP/HTTPS)), 1025 (SMTP server), 1110 (Optional POP3 server for downloading captured messages)
Docker
axllent/mailpit
Mailpit web UI message list and viewing paneMailpit web UI showing a captured messageMailpit web UI detail view of an emailMailpit web UI as shown in the repository README

What is Mailpit?

Mailpit alternatives

All self-hosted alternatives to MailHog →

Should you self-host Mailpit?

Mailpit scores 77/100 on selfhost.directory (how scoring works) and ranks #2 of 109 in Email. It has 10 891 GitHub stars, +333 in the last 30 days.

It shipped 25 stable releases in the past year. The latest, v1.33.1, came out on 7 November 2026. New versions land roughly every 2 weeks.

Setup is easy: most people get it running in one sitting. 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 233 stars). It scores higher overall, so compare the two before you pick. See Mailpit vs Listmonk side by side.

Features

  • Automatic message pruning
  • Chaos testingDisabled unless --enable-chaos is set.
  • HTML compatibility check
  • HTML message screenshots
  • HTTPS / TLS support
  • Link Check
  • Message tagging
  • POP3 serverRequires POP3 authentication to be configured; only the latest 100 messages are served.
  • Prometheus MetricsOff by default.
  • Real-time UI updates & new-mail notifications
  • REST API
  • SMTP capture server
  • SMTP relaying & forwarding
  • Spam CheckNeeds --enable-spamassassin and a SpamAssassin server.
  • Web UI with advanced mail search

Mailpit README

Mailpit - email testing for developers

CI Tests status CI build status CI Docker build status Code quality
Latest release Docker pulls

Website • Documentation • API


Mailpit is a small, fast, low memory, zero-dependency, multi-platform email testing tool & API for developers.

It acts as an SMTP server, provides a modern web interface to view & test captured emails, and includes an API for automated integration testing.

How to install Mailpit

Install Mailpit with Docker

Environment variables
MP_DATABASE, MP_UI_AUTH_FILE, MP_MAX_MESSAGES, MP_SMTP_AUTH_ACCEPT_ANY
docker run -d \
  --restart unless-stopped \
  --name=mailpit \
  -p 8025:8025 \
  -p 1025:1025 \
  axllent/mailpit

Docker compose example:

services:
    mailpit:
        image: axllent/mailpit
        container_name: mailpit
        restart: unless-stopped
        volumes:
            - ./data:/data
        ports:
            - 8025:8025
            - 1025:1025
        environment:
            MP_MAX_MESSAGES: 5000
            MP_DATABASE: /data/mailpit.db
            MP_SMTP_AUTH_ACCEPT_ANY: 1
            MP_SMTP_AUTH_ALLOW_INSECURE: 1

Multi-architecture images for 386, amd64 and arm64; stable releases are tagged with the release tag and the minor release, edge builds should not be used in production.

How to configure Mailpit

  • MP_DATABASEDatabase location for persistent message storage; default is a temp file deleted on exit. Can also point at a remote rqlite HTTP address.

    values: file path or http://<host>:<port>

  • MP_DISABLE_WALfalseDisable SQLite Write-Ahead Logging, needed for network filesystems such as NFS or Samba.

    values: true/false

  • MP_DISABLE_VERSION_CHECKfalseStop Mailpit contacting GitHub to check for new releases.

    values: true/false

  • MP_COMPRESSION1Compression level used when storing raw messages in the database.

    values: 0-3

  • MP_LABELOptional label identifying this Mailpit instance in the web UI, SMTP and POP3 servers.

Mailpit releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Email

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…