Exchange-style delegation
Shared mailboxes with Read, Send as, and Full access. Every permission check stays on the server.
Open source · MIT licensed
Personal and shared mailboxes, Exchange-style delegation, and accountable administration — built for small organisations and for teams spread across places and reporting lines. It runs in your own Cloudflare account, on your own domain.
MIT licensed source Your domain, your data Documented mail standards
Product tour
These are real cmail surfaces populated with fictional demonstration data. Personal mail, shared work, and administration stay connected without sharing passwords or hiding who can do what.
Capabilities
Everything a small organisation actually needs to run shared addresses accountably — and nothing that only exists to fill a comparison table.
Shared mailboxes with Read, Send as, and Full access. Every permission check stays on the server.
Use either identity provider, or both. No separate password database to hold, rotate, or leak.
Receive through Cloudflare Email Routing; send through the native Cloudflare Email Service or Postmark.
Delivery diagnostics and administrative audit folded into one investigation pane, the way an admin actually works.
Gate protected access on the current policy, layer personal and organisation signatures, and let managers lock centrally configured personal details.
Spam scoring, disguised-link and look-alike-domain detection, and a first-contact notice on unfamiliar senders.
Shared mailboxes
Every delegate signs in with their own invited Google or Microsoft identity. Managers create functional addresses, control delivery state, and grant each person the least access they need — and it is visible afterwards who did what.
Read state, folders, stars, and Sent history are shared operational state, while unfinished drafts stay private to their author. cmail uses familiar Exchange-style terminology in an independent, Cloudflare-native implementation; it is not a Microsoft Exchange server.
Security & assurance
The deployment guide walks SPF, DKIM, DMARC, MTA-STS, and TLS reporting. Where a capability depends on something upstream that does not yet exist, the documentation says so rather than implying coverage.
Deployment guidance covers SPF, provider-managed DKIM, and staged DMARC enforcement. cmail records trusted boundary results for investigation; the receiving provider remains responsible for applying its authentication policy.
Anchor text that names one domain but points at another is flagged, as are look-alike internationalised hostnames. Following one shows the real destination first.
Quarantine files a message into Junk and records why. Retention is destructive, so it stays switched off until an operator deliberately enables it.
Review the security and assurance summary, including current limitations and the upstream gap register.
Architecture
The web application and the inbound Worker share D1 and R2, while interactive and mail-routing duties stay in separate runtimes.
Email Routing invokes the Worker. It validates the recipient, enforces quota and rate guardrails atomically, parses the message, and stores metadata and content.
Email Routing → Worker → D1 + R2
Cloudflare Pages runs the SvelteKit application. Signed-in users read and compose; external delivery goes out through the configured provider.
Browser → Pages → D1 + R2 → provider
Deploy
Clone the repository, create D1 and R2, register your OAuth callbacks, store secrets in Cloudflare, and verify mail flow before routing real traffic.
# clone, configure, and validate
git clone https://github.com/Rob142857/cmail.git
cd cmail
pnpm install
pnpm setup
pnpm validate