DEV Community

Cover image for Why I Built RustMailer โ€” A Self-Hosted Email Engine in Rust
rustmailer
rustmailer

Posted on

Why I Built RustMailer โ€” A Self-Hosted Email Engine in Rust

Hi everyone ๐Ÿ‘‹

Iโ€™ve been working with email protocols (IMAP, SMTP) for a while โ€” enough to know how painful they can be when you're building something serious. A lot of tools out there either:

  • Donโ€™t give you full control,
  • Rely on external services like Redis or heavy databases,
  • Or are simply too expensive to scale.

So I built RustMailer โ€” clean, async, self-contained, and fast.


๐Ÿ›  What is RustMailer?

RustMailer is a self-hosted email API engine, written in Rust, built to sync, send, and manage email with performance and reliability in mind.

No Redis. No Postgres. No cloud vendor lock-in.

It supports:

  • โœ… Multi-account IMAP sync (UID-based, selective folders, date/window range)
  • โœ… SMTP sending with connection pooling
  • โœ… Webhooks powered by VRL (filter/edit payloads before sending)
  • โœ… gRPC + OpenAPI interfaces with multi-version docs
  • โœ… Built-in web UI for viewing messages & configuring accounts
  • โœ… OAuth2 & proxy support for Gmail and other providers

And yes โ€” itโ€™s designed for real production use, not just a toy.


๐Ÿ’ฐ Why RustMailer?

Because I needed something I could run cheaply, with full control, and no external dependencies.

RustMailer runs well on a small VPS with 512MB RAM and 1 CPU.

Itโ€™s source-available and requires a license only if you're using it in production beyond 10 accounts.


๐Ÿค– Built for Developers

I made RustMailer for people like me โ€” backend developers who donโ€™t want to rebuild email infrastructure over and over again.

If youโ€™ve ever tried wiring together email sync, delivery, retries, webhooks, and token refresh, you know how chaotic it can get.

RustMailer handles all of that โ€” so you can focus on building your app.


Thatโ€™s it for now. Iโ€™ll write more about how it works under the hood soon (OAuth flow, sync strategy, webhook pipeline, etc).

If you have any questions or want to share your thoughts, feel free to ask in the comments โ€” Iโ€™m happy to help and discuss!

GitHub: github.com/rustmailer/rustmailer

Website: rustmailer.com

Discord: https://discord.gg/3R4scWCsxK

Top comments (0)