WHAT IS IT?
RustMailer is a self-hosted email middleware that wraps IMAP, SMTP and the Gmail API behind a single REST and gRPC API. It handles multi-account synchronization, templated sending, open tracking and event dispatch, so your application no longer has to stitch three mail libraries together by hand. One ~60 MB binary, no external dependencies, no Redis.
WHY IS IT INTERESTING?
- One API, three protocols: IMAP, SMTP and Gmail API behind the same REST and gRPC interface. Your code doesn't branch on the account's provider.
- Serious incremental IMAP sync: UID-based strategy, folder selection, windowed or date-range synchronization. No full rescan on every pass.
- Scriptable outbound events: every mailbox change goes out as a webhook or into NATS, with VRL payload transformation to filter and reshape before delivery.
- Built-in OAuth2: full flow with a web authorization UI and automatic access/refresh token management. Gmail and Outlook wired up without custom code.
- No side infrastructure: written in Rust with an embedded key-value store, low memory footprint, deployable in a single
docker run. Prometheus exporter included. - Debug webmail included: a lightweight mail client and admin dashboard to inspect accounts, headers and synced messages without reaching for an external client.
USE CASES
- SaaS platform that must sync thousands of user mailboxes, over IMAP as well as Gmail.
- CRM that automatically attaches email threads to customer records through webhooks.
- Marketing automation tool with dynamic templates plus open and click tracking.
- Real-time customer support: new messages land in NATS and feed the ticket queue.
- Transactional sending backend routed to a self-hosted MTA or a third-party provider per account.
GOOD TO KNOW
The full source code is public and auditable, but the license is commercial: a 14-day free trial with unlimited accounts, then a license key is required in production. Pull Requests are not being accepted at this stage of the project.
