Because the mail server protocol is old, and needs to take a REST…
A modern REST-native email server that speaks SMTP to the world and HTTPS to its peers. When two REST Mail servers find each other, they automatically upgrade — no configuration needed.
Running your own email server has always been painful. You need to configure Postfix for SMTP, Dovecot for IMAP, worry about SPF, DKIM, DMARC, manage queues, deal with bounces, set up TLS certificates, fight spam — all with protocols designed in the 1980s.
These protocols served us well, but they were built for a different era. It is time for them to rest.
REST Mail replaces the internal complexity with a clean REST API. Every mailbox operation — send, receive, search, label, filter — is an HTTP endpoint. Your webmail, mobile app, or automation scripts talk REST.
But REST Mail still speaks SMTP, IMAP, and POP3 to the outside world through protocol gateways. The rest of the internet never knows the difference. Full compatibility, modern internals.
Protocol gateways translate legacy protocols into REST API calls, preserving full compatibility while modernizing the internals.
mail1 and mail2 communicate over standard SMTP. When either talks to mail3 (a REST Mail domain), the connection automatically upgrades to HTTPS/REST — faster, richer, end-to-end encrypted.
When two REST Mail servers discover each other, they skip SMTP entirely and deliver natively over HTTPS.
The sending server looks up a DNS TXT record at _restmail.recipient-domain.com.
If the record exists, the recipient is running REST Mail.
$ dig TXT _restmail.example.com
;; ANSWER:
_restmail.example.com. TXT "v=restmail1 endpoint=https://mail.example.com/v1"
During the SMTP EHLO handshake, both servers advertise their REST Mail capability. If both sides support it, the upgrade is negotiated.
S: 250-mail.example.com Hello
S: 250-STARTTLS
S: 250-SIZE 52428800
S: 250 X-RESTMAIL v1 https://mail.example.com/v1
Instead of continuing the SMTP transaction, the sending server delivers the message directly via an authenticated HTTPS POST to the recipient's REST API endpoint.
POST /v1/deliver HTTP/2
Host: mail.example.com
Content-Type: application/json
Authorization: Bearer <signed-jwt>
{
"from": "alice@sender.com",
"to": ["bob@example.com"],
"subject": "Hello from REST Mail",
"body_html": "<p>Delivered over REST!</p>",
"delivered_via": "restmail/https"
}
Everything you need to run email as a first-class service.
Full SMTP, IMAP, and POP3 gateways. Use Thunderbird, Apple Mail, Outlook, or any standard email client. The outside world never knows.
Every mailbox operation is an HTTP endpoint. Send, receive, search, label, and manage mail with standard REST calls.
16+ built-in filters: SPF, DKIM, DMARC, greylisting, rate limiting, Sieve scripts, webhooks, JavaScript, and more. Chain them in any order.
Industry-standard Sieve scripting for server-side mail filtering. Users write their own rules without touching server config.
A modern webmail client built with React and Vite, served directly from the stack. Real-time updates via Server-Sent Events.
A terminal-based admin interface built with Bubble Tea. Manage domains, users, mailboxes, and pipelines from the command line.
Server-Sent Events push new messages and status updates to connected clients instantly. No polling required.
Content-addressable attachment storage. Identical files are stored once regardless of how many messages reference them.
Per-user and per-domain storage quotas with real-time tracking. Prevent runaway usage before it becomes a problem.
A complete email stack built on proven technology.
The REST API, protocol gateways, outbound queue, console admin, and all tooling are written in Go 1.24+. Single static binaries, fast compilation, excellent concurrency.
All data lives in PostgreSQL via GORM with AutoMigrate. Messages, attachments, domains, users, pipelines, queue state — everything in one reliable store.
Lightweight, idiomatic Go HTTP routing. Middleware chains for JWT auth, logging, CORS, rate limiting, and request validation.
Vite-built React frontend with real-time SSE updates. Compose, read, search, and manage mail from the browser.
Terminal admin interface for managing the entire stack. Domains, users, mailboxes, pipelines — all from your terminal.
One command brings up the entire stack: Postfix, Dovecot, PostgreSQL, dnsmasq, API, gateways, webmail. Production-ready from the start.
REST Mail is an open-source project exploring what email infrastructure looks like when you start from REST and work backward to legacy protocol compatibility, rather than the other way around.
It is a love letter to the engineers who built SMTP, IMAP, and POP3 — and a gentle suggestion that after 40+ years of faithful service, these protocols have earned their rest.
The entire stack is designed to be self-hosted, developer-friendly, and transparent. No vendor lock-in. No cloud dependency. Just a modern email server you can understand, modify, and trust.