Mailpit is an email testing tool that functions as an SMTP server with a web interface and API for inspecting and testing emails. The architecture is a monolithic Go application that includes an SMTP server (port 1025), POP3 server (port 1110), HTTP server for web UI and API (port 8025), WebSocket server for real-time updates, and an embedded Vue.js frontend. Key entry points are main.go (application entry), cmd/* (CLI commands), and sendmail/main.go (sendmail replacement). Primary data flows involve email ingestion via SMTP/storage, parsing with enmime, storage in SQLite/rqlite, indexing for search/tagging, and retrieval via HTTP/WebSocket for UI/API consumption. External dependencies include Go modules (enmime, sqlf, goquery, etc.) and npm packages (Vue.js, Bootstrap, axios) for the frontend.
chasquid is a production-grade SMTP (email) server written in Go, focusing on simplicity, security, and ease of operation. It handles incoming and outgoing email with full support for modern email security standards including STARTTLS, DKIM signing and verification, SPF checking, MTA-STS enforcement, and per-domain security level tracking. The server architecture is modular: the main daemon delegates SMTP protocol handling to the internal/smtpsrv package, manages a persistent email queue via internal/queue, performs alias resolution with hooks via internal/aliases, and delivers mail either locally through an LMTP-based MDA (cmd/mda-lmtp) or remotely via SMTP courier with TLS and MX fallback. Authentication integrates with Dovecot or a local user database using scrypt password hashing. Configuration is defined via protobuf text format, supporting hot reload of domains, users, and aliases without restart. The repository includes CLI tools for administration (chasquid-util), SMTP connectivity checking (smtp-check), and Dovecot authentication testing (dovecot-auth-cli). A comprehensive test suite covers unit, integration, and fuzz tests, with test data for DKIM, SPF, aliases, and various protocol edge cases. The repository also provides a Dockerfile for containerized deployment and extensive documentation in Markdown and man pages. While primarily an application, the codebase contains several well-designed internal packages that could be extracted for reuse, such as the network tracing library, safe I/O utilities, and OpenMetrics exporter.
MailCrab is an email test server written in Rust, inspired by MailHog and MailCatcher. It provides an accept-all SMTP server and a web interface to view and inspect incoming emails.
This is a lightweight SMTP server written in Go, designed to receive large volumes of email, parse MIME content, and store messages in MongoDB. It includes a web interface for viewing messages, managing greylisting, and real-time notifications via WebSockets (using the embedded Incus library). The server implements core SMTP commands (HELO/EHLO, MAIL, RCPT, DATA, AUTH, STARTTLS, XCLIENT) and supports TLS, greylisting, and spam filtering via regex. The architecture is monolithic: a single binary runs both the SMTP listener and an HTTP server for the web UI. The codebase is functional but shows signs of age: it uses deprecated dependencies (gopkg.in/mgo.v2, github.com/robfig/config, github.com/gosexy/redis), lacks a go.mod file, and has no automated tests. The SMTP protocol handling is reasonably robust, and the MIME parsing is non-trivial, but the overall project would benefit from modernization and testing.