cMail docs

cmail documentation

This page is the map for all cmail documentation. cmail is pre-1.0 software: operators should read the deployment and security guides before sending real mail through it.

Use cmail

Deploy cmail

For engineers and operators setting up a deployment, roughly in this order:

  1. Getting started — choose resource names, install dependencies, create Cloudflare storage, and start local development.
  2. Configuration reference — set the deployment origin, mail domain, OAuth providers, safety limits, and organisation defaults.
  3. Email authentication and sender requirements — read before changing mail DNS or enabling external delivery.
  4. Architecture and trust boundaries — read before changing authentication, authorisation, mail flow, public data, or storage.
  5. Deployment and verification — the production sequence, including identity providers, DNS, bootstrap, and controlled mail tests.
  6. Security checklist and Operations checklist — complete both for every environment.
  7. Running cmail — upgrade, back up, restore, roll back, monitor, and rotate secrets on a live deployment.

For staff-portal links and optional provider-session reuse, see the staff sign-in contract, including the Cloudflare Access identity boundary and live configuration checks.

Customisation and governance

Command reference

Run commands from the repository root:

Command Use
pnpm run setup Create ignored local configuration from committed templates
pnpm dev Start the SvelteKit development server
pnpm dev:worker Start the email Worker with wrangler dev
pnpm db:migrate:verify Apply every migration to a throwaway local D1 and check the schema
pnpm test:mobile Run the Playwright mobile and accessibility suite (see the Developer guide)
pnpm db:migrate:local Apply migrations to isolated local D1 state
pnpm db:migrate:preview Apply migrations to the explicitly isolated preview D1 database
pnpm config:check Verify committed and active Wrangler bindings remain isolated and fail closed
pnpm deploy:email-worker:preview Deploy the isolated, non-sending preview email Worker
pnpm push:keys Generate a VAPID pair for optional browser notifications
pnpm validate Run source, lint, type, test, migration, build, and dependency checks
pnpm release:check Run validation plus the reachable Git-history secret gate

The README has the shortest deployment path. These guides give the operational and security context behind it.