CASE STUDY

Custom Mail

Private outbound mail console on Cloudflare Workers — Rust runtime, brandable UI, pluggable ESP.

Custom Mail

01. Project Overview

Self-hosted web mail workspace written in Rust (workers-rs): session login, Markdown compose with email-safe preview, attachments, send history in KV, and drop-in ESP / theme / layout plugins — without running a mail server.

02. Problem

Why build this?

Teams needed a private compose UI they could brand and host on their own Cloudflare account — not another shared SaaS mailbox, and not a VPS mail stack to babysit.

03. Solution

How was it solved?

Shipped Custom Mail as a Workers + KV product with JSON-driven branding, pluggable providers (Brevo, Resend, SendGrid, …), Docker / GHCR images, docs, and a ClawHub skill for agent installs.

04. Architecture

System architecture

Runtime chain

  1. Session login
  2. Compose + Markdown preview
  3. Attachments
  4. ESP provider plugins
  5. KV send history
  6. Workers + static assets

05. Key Features

Core capabilities

  • Password-protected compose console on Cloudflare Workers
  • CommonMark + GFM body with email-safe HTML preview
  • Attachments (multi-file caps) and last-N send history in KV
  • Brandable config: name, domain, colors, logo, footer, copy
  • Pluggable ESP / theme / layout / logo catalogs
  • Docker Hub + GHCR images and ClawHub skill install path

06. My Role

What did I specifically do?

  • Owned product architecture from Workers runtime through ESP plugins.
  • Implemented Rust/wasm mail console, Markdown preview, and KV history.
  • Published Docker / GHCR images, docs site, and ClawHub packaging.

07. Tech Stack

What technologies power it?

  • Rust (workers-rs)
  • Cloudflare Workers
  • KV
  • Brevo / Resend / SendGrid
  • Docker
  • OpenClaw / ClawHub

08. Metrics

What results can we show?

95ClawHub installs
Workers · RustRuntime
Live · Docker · ClawHubSurfaces

09. Deployment

How do you run it?

Deploy on Cloudflare Workers with secrets + KV, or run locally via Docker / wrangler; configure branding and ESP in config/mail.json.

  1. Clone InnoNestX/Custom-Mail and copy .dev.vars.example.
  2. Set ADMIN_PASSWORD and provider API key, then npm run dev or docker run.
  3. Point wrangler routes + mail.json host at your domain and deploy.
  4. Optional: clawhub install custom-mail for the OpenClaw skill path.

12. Tradeoffs

  • Self-hosted Workers + KV over a SaaS webmail — credentials and branding stay on your account.
  • Outbound compose console instead of full IMAP inbox — focused on send workflows teams actually run.
  • Pluggable ESP adapters instead of one locked provider — swap Brevo / Resend / SendGrid via config.

13. What shipped

  • Private compose UI with session login on Cloudflare Workers
  • Markdown preview + attachments + KV send history
  • Install surfaces: Workers deploy, Docker / GHCR, and ClawHub

14. Inspectable proof

Documentation

EN/ZH docs for config, Docker, deploy, and OpenClaw.

Open docs

Source repository

Rust Workers app, plugins, and CI in the open.

GitHub

Contact:

Open for collaboration, consulting, and engineering opportunities.

  • AI Testing tools / ClawHub skill customization
  • QA / SDET consulting and team advisory
  • Test infrastructure / Docker environment enablement
  • Open-source collaboration with InnoNestX