Docs
/Introduction
Cloudflare
Email Routing Setup.
Leverage the power of the edge to process and forward emails to your personal infrastructure.
1
Domain Verification
First, ensure your domain's MX records are managed by Cloudflare. Navigate to Email Routing and follow the automatic setup wizard to configure the required records.
MX Configuration
Point your domain's mail exchange to Cloudflare's edge servers.
DMARC & SPF
Automatically generated security records for your domain protection.
2
Deploy the Worker
Deploy the forwarding worker located in apps/worker. This worker intercepts incoming mail and sends the payload to your Dub API.
cd apps/worker
bun deploy:worker3
Configuration
In the Cloudflare dashboard, under Email Routing > Routing Rules, select Edit Worker as the action and point your desired address to your newly deployed Dub worker.