Stalwart Mail Server

Modern Rust mail server — SMTP, IMAP, JMAP in one binary.

How MailKite fits

Self-hosting is an option — or skip the server and get SMTP/IMAP/JMAP-like access via MailKite's API.

Receive email into Stalwart Mail Server via MailKite

A minimal, copy-paste starter. Swap in your own domain and API key.

webhook.ts
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 }));
}
Read the inbound webhooks guide

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.

Key features

Pricing model

Open source (self-host, with paid support)

Open source

AGPL-3.0

View repository

Questions about Stalwart Mail Server

What protocols does Stalwart support?

SMTP, IMAP, and JMAP, all from a single Rust binary, plus built-in encryption and filtering.

Stalwart vs MailKite?

Stalwart is a self-hosted server you run. MailKite is managed — SMTP relay, IMAP access, and an API without operating a server.

Related

Similar tools

Try MailKite alongside Stalwart Mail Server.

Point a domain, drop in a webhook URL, and send your first email in minutes. Unlimited domains, no credit card.