Mailpit

Ralph Slooten·axllent.mailpit

An email and SMTP testing tool with API for developers

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. Mailpit was originally inspired by MailHog which is no longer maintained and hasn't seen active development or security updates for a few years now.

winget install --id axllent.mailpit --exact --source winget

Latest 1.34.0·November 17, 2026

Release Notes

This release fixes a security vulnerability (GHSA-v887-64wg-qqc9):a specially crafted message could crash Mailpit's SMTP server. Updating is recommended.

It also includes a large number of smaller fixes and hardening changes from a review of the codebase. Almost all of them are under the hood:tighter limits on memory and CPU use, more careful parsing of messages and headers, and better handling of edge cases. For most users nothing should look or behave differently.

A few changes may need attention when upgrading:

• Flags and environment variables that have been deprecated for over two years have been removed. A relay config that still uses recipient-allowlist will now stop Mailpit from starting:rename it to allowed-recipients. • Some settings are now checked at startup and refused if invalid, where they were previously ignored or treated as 0:relay and forward ports, return-path, --max-age, integer environment variables, and empty authentication credentials. • The send API returns new responses:400 for a From address that cannot be parsed, 413 for a message over the maximum message size, and 503 (with Retry-After) when too many messages are being sent at once. • Messages are limited to 100 tags.

Chore

• Reduce CPU cost of message ingestion (#771) • Recover from panics in SMTP sessions • Use the SpamAssassin server's required score to decide what is spam • Limit the HTML parsing of the embedded message view • Refuse to render HTML over 10 MiB in the message view • Limit how many bytes of messages are stored at once • Treat a bare CR in headers as text, as Go and Postfix do • Stop the storage background goroutines before re-initialising • Limit the terms of a search and the memory a search holds • Cache host names of SMTP clients for a short time • Lower the size limit of proxied images and fonts to 10 MiB • Limit the size of the messages a websocket client can send • Remove deprecated flags and environment settings • Validate relay and forward ports and return-path at startup • Update Go dependencies • Update node dependencies • Update Github Actions dependencies

Fix

• Make field searches case-insensitive for non-ASCII characters • Show the current UTC offset in the timezone setting (#773) • Make dump paging and failure handling fail closed • Make credential loading and matching fail closed • Harden the HTML checker against slow and concurrent input • Bound and clean up link checking • Stop log messages injecting terminal control sequences • Silence the logger once for the POP3 tests • Correct POP3 TOP and dot-stuffing, and harden connection handling • Make the database last-action time safe for concurrent use • Limit the number of tags on a message to 100 • Bound the Prometheus tag series and harden the metrics server • Harden the Rspamd integration • Harden the snakeoil self-signed certificate generator • Harden the SpamAssassin integration • Reuse webhook connections to prevent dropped webhooks under load (#772) • Prevent SMTP crash on unparseable media type with RFC 2231 parameter (GHSA-v887-64wg-qqc9) • Stop the version lookup blocking requests and fix its backoff • Stop EXIF rotation copying large images and limit thumbnail decodes • Limit the size of progressive JPEGs that are thumbnailed • Remove List-Unsubscribe comments in a single pass and limit its length • Locate message headers by position when rewriting them • Use the text part for the snippet when the HTML has no text • Keep text that is the same as a skipped element's name • Trim truncated tags and stop PrepareSocket removing files • Make --smtp-strict-rfc-headers cover all non-CRLF header line breaks • Reduce the cost of HTML redirect stripping and text snippets • Set the start time when the stats package loads • Stream the message to Postmark without copying it • Stop thumbnails for requests whose client has gone • Reject messages with unreadable headers permanently • Send only CRLF line breaks when relaying, and keep the stored body • Remove whitespace before the colon of header names • Handle more IDs than SQLite has placeholders for • Tell the web UI about every message a search deleted • Do not fail searches for sizes beyond what a database can compare • Look up the client's host name without holding up other connections • Time out TLS clients who never start the handshake • Limit how much memory messages being received can use • Make SMTP Shutdown wait for the open sessions • Give relaying and forwarding time limits • End the transaction when a MAIL command is refused • Close the connections the proxy opens to fetch assets • Allow sending messages through the API over a Unix socket • Limit the cost of proxying a stylesheet • Limit and cache the SpamAssassin checks of messages • Make the Chaos settings and the HTML preview route safe for concurrent use • Release a message to the addresses which were checked • Rewrite the inline image links of a message in a single pass • Limit the memory used by messages sent through the API • Reject invalid integer environment variables instead of using 0 • Use the default sender when ingesting messages without a From address • Reject --max-age values too large to calculate the prune cutoff • Apply the return-path option to forwarded and auto-relayed messages • Keep the quotes of an address in the sender and recipients which are sent • Give the sendmail command and ingest time limits when sending • Send the messages of the sendmail command with CR LF line breaks • Reject line breaks in the From address of the send API • Resolve proxied CSS assets after redirects (#774) • Preserve inline data URLs in proxied CSS (#776) • Encode screenshot proxy query parameters (#775) • Send PLAIN credentials when relaying or forwarding over implicit TLS • Hold progressive JPEGs with skipped bytes to the progressive limit • End the SMTP transaction when a message is refused • Do not crash when reindexing an empty database • Return an error when parsing a message for the envelope cache panics • Give the readyz probe a time limit

Installer type: zip

x64—8F080D41374BF22686606374A0A483C8563C1BF29AE078179792392FF8C911D7
arm64—59CCB08FB30660E9F0E3F8A721ABC32A4ACA88BA37CEA004EC69940245D8554E

Details

Homepage
https://github.com/axllent/mailpit
License
MIT
Publisher
Ralph Slooten
Support
https://github.com/axllent/mailpit/issues
Copyright
Copyright (c) 2022-Now() Ralph Slooten
Moniker
mailpit

Tags

email-testinggogolangmailpitpop3-serversmtp-relaysmtp-serversmtp-testing

Older versions (11)

1.33.0
x64—47122DD828FF80DCAEF62B2952C478B178AFADADF066C990489608E537121BFD
arm64—467C480C53D9F29626326F6187ACCEAAA6131204E632F638FA1D40EF1C578DEA
1.32.0
x64—16915767A6C95DCA569336E8F561F91CF355E9A33C57B91DEEDCC10A4BBA7FD4
arm64—663A92D2741421EF33BE6AFF5EFF1C1AD95579D66A41D6067D1209FF78951ACB
1.31.6
x64—5D5AD094BFB3BAC9004F9D1105D2335FEA9F8952C09951DF73AE0A280E34D3B1
arm64—C04C77AC9FD9DA27C91259D0484B93B163E8534964682F543204CF3301A6B967
1.31.5
x64—9637E21C02B33185FE69268BA05317152A5D8AC7877115E8A70E29B7E199E8DC
arm64—020B64305FFD585CEB4704AFAE1C4B37154D19046D98A3F5DA6DDD4C24A9AF95
1.31.4
x64—0DD6EC909A6F5B2B66682B22D82ABCE97AB793E30766BF2F642B691E70A4A16B
arm64—DB337B96ACE79E7A8D837B31023159062F87DB35A12F8CB67304C32A09959056
1.31.3
x64—863E9502D4E0F14A78C0F91C5091797B1C7B7B7E3FC7E5EAB62E5770CE44B76E
arm64—B97D373441F56564A081F8BB0BD23CCCA2368FE2067704FD94C529CC31DBFB19
1.31.2
x64—42C20E5C3254125EA7489847811F10D70E39DE573FE41D03A61412C87913E995
arm64—721D37A29D57F4886FC848E4B9F524D138EF552651278D1D3FF458C61CB52234
1.31.1
x64—73FF05204741BD89CC96E6074573C4B22E1EDFADF1B3427536233FF20C751604
arm64—A6475D8E63AC92084D0A2A3CF22FF8A723B508CCC65283B2D4D54F71EF897CA0
1.31.0
x64—39B5F1B9A671A5F1738E3792E8495BEF2FEC8176B02EE1E22635626C5888C6E3
arm64—AF0013C31253BEFB73DD1974891D37921DE6454563D83074D27D443C40F2F0CE
1.30.7
x64—E4815D2C961A4AD024F4D942D0D286FD7B7DA49C49FC7F01C565FF296BD3FDCE
arm64—07EE2BEE83E5B54F8CD7B013CB4A9D1582665A5280DE3B2BDD47B24C7139AA84
1.29.5
x64—DF62B2E446B7037C30D0CC3ECCD248F3B0EFBD8FFC2472DF9ABF697376EADA99
arm64—34ED310683A707035CF6059CDAB783D56B531FDFB2721A93A35F2BEAB6530F8A