RustMailer: A Self-Hosted IMAP/SMTP Middleware for Developers
Hey everyone,
Iβve been working on RustMailer for the past year, but until now I held off posting here because I felt it was missing key features and I needed to make frequent breaking changes to iterate quickly.
Today, Iβm happy to announce RustMailer 1.0! π
There are still a ton of things Iβd like to build, but the project is now in a place where I feel more confident sharing it with the r/selfhosted community.
π Key Features
π Modern APIs
Offers both gRPC and OpenAPI interfaces
Multi-version API documentation
π High Performance & Cost-Efficient
Written in Rust for safety and speed
Low memory usage, no Redis or external dependencies required
Ideal for production at minimal cost
π¬ Multi-account IMAP Support
Incremental sync using UID-based strategy
Supports folder selection
Windowed or date-range sync
π€ SMTP Sending
Manage outgoing email via SMTP
Connection pooling for better performance
π§Ύ Email Template Support
Dynamic templates for transactional and marketing messages
π‘ Flexible MTA Integration
Send via account-specific SMTP servers
Or use self-hosted MTA services / third-party providers
π Open & Click Tracking
Built-in support for tracking email opens and link clicks
π Webhooks with VRL
Send webhook payloads to external systems
Process them with VRL scripts for filtering and transformation
π NATS Integration
Push real-time events to NATS for seamless downstream integration
π₯οΈ Web UI & Client
Built-in web-based email client and admin dashboard
π OAuth2 Support
Built-in OAuth2 flow with web-based authorization UI
Automatically manages access & refresh tokens
π Proxy Support
IMAP, SMTP, and OAuth2 proxy support for restricted environments
π¦ Deployment
Single sub-60MB binary
Zero external dependencies (not even Redis)
No database required
β‘ Just run it and go.
π‘ License & Pricing
RustMailer is not free. A free trial is available for testing and evaluation, but production use requires purchasing a license key.
β Why RustMailer?
Most languages have IMAP/SMTP libraries β but theyβre just low-level tools, not a production-ready email infrastructure.
To build a truly reliable email service, you need:
β Incremental sync (with state tracking)
β Battle-tested MIME parsing (BODYSTRUCTURE, encoding, attachments)
β SMTP with deliverability (retries, DKIM, SPF, inbox placement)
β Search across folders & accounts (unified search, no IMAP limits)
β Webhooks & event-driven tasks (idempotency, retries, scaling)
β Templates & batch operations (without hitting rate limits)
β Flaky IMAP recovery (because servers love to disconnect)
πͺ What RustMailer Delivers
π Massive-scale sync β 100s of accounts, zero manual management
π Instant cross-account search β no IMAP roundtrips
β‘ Eventhooks API β extend functionality without modifying core logic
π¦ Still just one <60MB binary β no DB, no Redis, no containers needed
If you find this useful, Iβd really appreciate a β on GitHub β it helps more developers discover the project!