Mailpit
Stack
Mailpit - the modern dev mail catcher (MailHog's actively-maintained successor, MIT): an SMTP sink plus a fast web UI with search, HTML preview, link checking, and an API. Stop sending test emails to real inboxes.
Image details
Source details
Configuration
TypeComposelinuxaxllent/mailpit:v1.30.55000:50001025:1025/data : mailpitdataMP_UI_BIND_ADDR=0.0.0.0:5000MP_SMTP_BIND_ADDR=0.0.0.0:1025MP_UI_AUTH=${MP_UI_AUTH}MP_DATABASE=/data/mailpit.dbMP_MAX_MESSAGES=5000unless-stoppedTemplate by deployable-sh·Source
Report issueStandalone Install
Select an install method, to see config/commands for deploying Mailpit
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Mailpit, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
Original stackfile
The compose file this template deploys, straight from its repo:
name: mailpit
services:
mailpit:
image: axllent/mailpit:v1.30.5
restart: unless-stopped
environment:
MP_UI_BIND_ADDR: 0.0.0.0:5000
MP_SMTP_BIND_ADDR: 0.0.0.0:1025
MP_UI_AUTH: ${MP_UI_AUTH}
MP_DATABASE: /data/mailpit.db
MP_MAX_MESSAGES: "5000"
ports:
- "5000:5000"
- "1025:1025"
volumes:
- mailpitdata:/data
volumes:
mailpitdata:
Or deploy it directly from the source:
git clone https://github.com/deployable-sh/stacks
cd stacks
docker compose -f mailpit/compose.yaml up -dMore install options in our documentation, or see axllent/mailpit for app-specific guidance.
Mailpit - email testing for developers
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.

Features
- Runs entirely from a single static binary or multi-architecture Docker images
- Modern web UI with advanced mail search to view emails (formatted HTML, highlighted HTML source, text, headers, raw source, and MIME attachments
- SMTP server with optional STARTTLS or SSL/TLS, authentication (including an "accept any" mode)
- A REST API for integration testing
- Real-time web UI updates using web sockets for new mail & optional browser notifications when new mail is received
- Optional POP3 server to download captured message directly into your email client
- HTML check to test & score mail client compatibility with HTML emails
- Link check to test message links (HTML & text) & linked images
- Spam check to test message "spamminess" using a running SpamAssassin server
- Create screenshots of HTML messages via web UI
- Mobile and tablet HTML preview toggle in desktop mode
- Message tagging including manual tagging or automated tagging using filtering and "plus addressing"
- SMTP relaying (message release) - relay messages via a different SMTP server including an optional allowlist of accepted recipients
- SMTP forwarding - automatically forward messages via a different SMTP server to predefined email addresses
- Fast message storing & processing - ingesting 100-200 emails per second over SMTP depending on CPU, network speed & email size,
- Chaos feature to enable configurable SMTP errors to test application resilience
List-Unsubscribesyntax validation- Optional webhook for received messages
Running in docker
An basic example of running Mailpit within Docker:docker run -d \
--name=mailpit \
--restart unless-stopped \
-p 8025:8025 \
-p 1025:1025 \
axllent/mailpit
You need to ensure you map the correct ports (default Web UI on 8025 and SMTP on 1025). Setting Mailpit options
Refer to the website for a list of runtime options. Environment variables can be set using the-e flag when starting your docker container, for instance:docker run -d \
--name=mailpit \
--restart unless-stopped \
-v /path/to/mailpit-data:/data \
-e MP_DATABASE=/data/mailpit.db \
-e MP_UI_AUTH_FILE=/data/authfile \
-e TZ=Europe/London \
-p 8025:8025 \
-p 1025:1025 \
axllent/mailpit
For team features, multiple inboxes, and a hosted setup, try Mailtrap, our friendly companion.