Modern Rust mail server — SMTP, IMAP, JMAP in one binary.
Self-hosting is an option — or skip the server and get SMTP/IMAP/JMAP-like access via MailKite's API.
A minimal, copy-paste starter. Swap in your own domain and API key.
import { verifyWebhook } from "@mailkite/client";
// MailKite POSTs every inbound email at your domain as JSON.
// Point a route at this handler in the MailKite dashboard.
export default async function handler(req: Request) {
const raw = await req.text();
const sig = req.headers.get("x-mailkite-signature") ?? "";
// Reject anything not signed by your webhook secret
const ok = await verifyWebhook(sig, raw, process.env.MK_WEBHOOK_SECRET!);
if (!ok) return new Response("bad signature", { status: 401 });
const email = JSON.parse(raw);
// Route into Stalwart Mail Server: open a ticket, create a task, store a record
await routeIntoName(email); // email.from · email.subject · email.text
return new Response(JSON.stringify({ ok: true }));
} Stalwart Mail Server is a modern, secure open-source mail server written in Rust that combines SMTP, IMAP, and JMAP into a single binary. It's an ambitious project for teams that want a contemporary, performant self-hosted mail platform with protocol-level innovation (JMAP) beyond the classic stack.
Open source (self-host, with paid support)
SMTP, IMAP, and JMAP, all from a single Rust binary, plus built-in encryption and filtering.
Stalwart is a self-hosted server you run. MailKite is managed — SMTP relay, IMAP access, and an API without operating a server.
Point a domain, drop in a webhook URL, and send your first email in minutes. Unlimited domains, no credit card.