Self-hosted email on Cloudflare Email Workers
3 open-source email projects on Cloudsteading receive mail through Cloudflare Email Workers: Mailflare, mail2telegram and Cloud Mail. Email Routing hands each message for your domain to a Worker, which parses and stores it, usually in D1 with raw messages in R2. Email Routing itself is free. Sending differs by project, so check that first.
How each one is built
Every project uses Email Workers and is mapped to Gmail. The rest of its Cloudflare setup, and its license, decide how much work it is to run.
| Project | License | Cloudflare | Replaces |
|---|---|---|---|
| Mailflare | AGPL-3.0 | D1, Durable Objects, Email Workers, Images, Queues, R2, Workers, Workers AI | Fastmail, Gmail |
| mail2telegram | MIT | D1, Email Workers, R2, Workers, Workers AI | Fastmail, Gmail |
| Cloud Mail | MIT | D1, Email Workers, KV, R2, Workers, Workers AI | Fastmail, Gmail |
Frequently asked
Can these send email as well as receive it?+
Receiving is the part Email Routing does. Sending is separate, and each project handles it its own way: through Cloudflare's email sending for Workers, or a provider such as Resend or an SMTP relay. Check the README for how a project sends before you move a real mailbox to it.
Do I need my domain on Cloudflare?+
Yes. Email Routing works only for domains on Cloudflare DNS, and turning it on points the domain's MX records at Cloudflare. Mail for addresses with no rule or Worker is dropped or bounced, so map every address you use.
Is this a full Gmail replacement?+
For receiving, reading and searching mail on your own domain, often. Expect gaps: spam filtering, calendar, contacts and IMAP access for mobile apps are usually missing or basic. Treat these as inboxes you own, not a drop-in Google Workspace.
What else do these projects use besides Email Workers?+
Counting the 3 projects listed here: D1 (3), R2 (3), Workers (3), Workers AI (3), Durable Objects (1), Images (1). Each repository's Wrangler config shows exactly which bindings it needs.


