API and inbound processing
Serve authenticated mailbox routes and process Email Routing events.
Yes, if your team is prepared to own domain, data, sender configuration, migrations, monitoring, abuse controls, and incidents.
Yes. mails0 is MIT licensed and documents a self-hosted architecture on Cloudflare Workers, D1, R2, and Email Routing. You provide the Cloudflare account, domain, secrets, database and bucket, outbound sender provider, quotas, retention, monitoring, and operational response. Self-hosting gives control but does not eliminate email operations.
The documented Cloudflare architecture
Serve authenticated mailbox routes and process Email Routing events.
Store identities, token state, message indexes, labels, threads, and quotas.
Preserve MIME and attachments under explicit retention and access policy.
Serve authenticated mailbox routes and process Email Routing events.
Store identities, token state, message indexes, labels, threads, and quotas.
Preserve MIME and attachments under explicit retention and access policy.
Provision D1 and R2 and apply the current schema with compatibility checks.
Store secrets in Cloudflare and verify the Worker health endpoint.
Use a dedicated subdomain and send an external message through Email Routing.
Verify the sender provider and track acceptance and delivery states independently.
Set limits, retention, cleanup, monitoring, backups, and incident controls.
Self-hosting is valuable when your domain, data location, source review, quotas, or integration behavior are requirements. It is not automatically simpler or cheaper than a managed provider.
Your team must own DNS, sender reputation, migrations, secret rotation, Cloudflare limits, monitoring, backups, abuse response, and updates. Choose a managed service when reducing those operations is the higher priority.
| Requirement | Use hosted sandbox | Self-host when |
|---|---|---|
| First proof | You need one temporary receive-only mailbox. | You already know the production requirements. |
| Domain | Hosted domain is acceptable. | The agent must use your domain. |
| Data | Hosted service boundary is acceptable. | Mailbox data must stay in your account. |
| Sending | Hosted capability and limits fit. | You need your own sender and policy. |
| Operations | You want minimal setup. | Your team can own the full lifecycle. |
The architecture is practical, but production readiness includes more than deployment. Assign ongoing responsibility for DNS, provider configuration, migrations, retention, monitoring, backups, abuse controls, key rotation, and incident response before moving durable agent identities onto the service.
Product behavior is verified against the mails0 source and documentation. External comparisons link to official vendor documentation checked on 2026-08-15.
mails0 is MIT licensed. Cloud, provider, domain, and engineering costs remain separate.
No. It routes inbound email. Configure a verified outbound sender provider for sending.
You can, but a dedicated subdomain is usually safer when the root domain already handles human email.
Start with a receive-only temporary mailbox. Move to a permanent identity or self-hosted deployment only after the workflow reaches a real email value event.