Overview
This AMI runs Mailpit, an email and SMTP testing tool for developers, on Ubuntu 24.04 LTS. Your applications send mail to its SMTP server instead of a real mail server, and Mailpit catches every message and shows it in a web interface with an HTML preview, headers, raw source, attachments, search and tags, plus a REST API and live updates. Mail is only stored: Mailpit never delivers anything to the outside. The upstream vendor image is release v1.33.0, pinned and baked into the AMI, so first start does not depend on a registry. Messages are kept in a database on the instance.
What Perimattic adds
Closed by default: out of the box Mailpit's web interface, API and SMTP server need no login at all, and a mail catcher open to the internet can be abused. Here the web interface, the API (including the Send API) and the live-update websocket require a user name and a random 24-character password generated on your server at first login, and the SMTP server requires its own generated 24-character login. Both are stored only as salted hashes. Setup checks that the passwords work, that admin/admin, a wrong password and anonymous requests are refused on every interface, and that mail without a login is refused and mail with the SMTP login arrives in the inbox, before the site is published.
SMTP stays on the server: the SMTP port is published on the server's loopback interface only and is never opened to the network. Applications on the server use it directly; from your computer, reach it with an SSH tunnel (the exact command is printed at the end of setup). Only ports 22, 80 and 443 are open.
HTTPS and live updates: Apache is configured as a reverse proxy and a free Let's Encrypt certificate is requested for your domain with certbot. The live-update websocket works through Apache; the tests open a real websocket through Apache and receive a message sent over SMTP. Mailpit runs as an unprivileged user, accepts only your domain as the Host header, does not check GitHub for new versions, and does not fetch remote CSS or fonts for previews.
Retention: the newest 2000 messages are kept, none older than 30 days and none larger than 25 MB. Pinned and patched: the application version is fixed, not 'latest', and Ubuntu 24.04 LTS is built through an automated EC2 Image Builder pipeline with security updates applied at build time.
Limits you should know
The web login and the SMTP login are two shared logins, not separate accounts: everyone with the password sees the same mailbox. SMTP login is sent without TLS, which is safe inside the SSH tunnel or on the server itself. No relay, forwarding, POP3 or spam-check integration is configured. The link checker, HTML checker and screenshots, if you use them, make web requests from the server to public addresses only. Mailpit used 9 to 30 MB of memory in our tests (about 600 MB for the whole host), so a t3.small is a comfortable size.
Licence and attribution
Built on the open-source Mailpit (MIT licence), unmodified. Not affiliated with, endorsed by, or sponsored by Ralph Slooten; Mailpit is a trademark of its owner.
Getting Started Launch the AMI and open ports 22, 80 and 443 in the security group SSH in and answer the setup prompts (domain and admin email) Open https://your-domain/ and sign in as admin with the password printed at the end of setup Open an SSH tunnel to the SMTP port and point your application at localhost port 1025 with the SMTP login
A domain name with an A record pointing at the instance is required, because the site is served over HTTPS.
This AMI is built and supported by Perimattic.
Book a free setup consultation at https://cal.com/gaurav-pareek-perimattic/marketplace-setup-consultations