Cloudflare Inbox
Email routing setup
Finish Cloudflare Email Service and catch-all routing after the Worker deploys.
Cloudflare Inbox depends on Cloudflare account and domain state that a repository template cannot fully automate.
Domain requirements
- The domain must use Cloudflare DNS.
- Email Service / Email Routing must be onboarded for the domain.
- Cloudflare will add or ask you to add MX/TXT records for routing and sending.
- New Email Service accounts may initially send only to verified recipients until account limits are raised.
Route mail to the Worker
In the Cloudflare dashboard:
- Open your domain.
- Go to Email Service / Email Routing.
- Create or enable a catch-all address, or create a specific custom address.
- Choose Send to a Worker.
- Select the deployed Cloudflare Inbox Worker.
- Save the rule and send a test email.
Optional API helper
The Cloudflare Inbox repo includes an email-routing helper script for destination and catch-all rules:
npm run cf:email-routing -- catch-all get --zone example.com
npm run cf:email-routing -- destination ensure --account-id <account-id> --email owner@example.com --create
npm run cf:email-routing -- catch-all set-worker --zone example.com --account-id <account-id> --worker cloudflare-inboxThe script needs a local Wrangler login or an API token with Email Routing permissions.
Test checklist
/docsloads on the deployed Worker./logincan send a magic link toFORWARDING_ADDRESS.- inbound mail stores a message in R2.
- the owner receives the forwarded copy.
/appshows the stored thread.- replying from
/appsends through Email Service.