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!

Similar Posts