Identity as a platform resource
Name the service owner, environment, purpose, and expected lifetime.
Platform teams need a reusable path that application developers can adopt without sharing human inboxes, rebuilding inbound parsing, or bypassing operational policy.
Platform engineers can use mails0 as a shared mailbox capability for agents, CI, and internal tools while keeping each identity and credential scoped. The open-source Cloudflare deployment exposes the policy points a platform team normally needs to own: domains, routing, storage, retention, outbound provider, rate limits, event delivery, secret handling, pause, and revocation.
Application teams consume a narrow interface while the platform team owns shared infrastructure and policy.
Create a mailbox per environment, service, or agent trust boundary.
Offer HTTP, CLI, SDK, or MCP without sharing the operator credential.
Use bounded polling or verified webhooks with idempotent consumers.
Apply retention, migration, rate-limit, pause, and rotation policy.
Without a platform contract, teams solve the same problem with personal Gmail accounts, public disposable inboxes, provider-specific parsers, or secrets pasted into automation. The result is difficult to inventory and harder to revoke. A supported mailbox primitive makes ownership and lifecycle visible.
The contract should stay small: request a scoped identity, receive or send according to policy, retrieve bounded results, subscribe to events, and close the mailbox. Application teams should not need direct D1 access or an operator token to complete ordinary work.
Name the service owner, environment, purpose, and expected lifetime.
Use HTTP for services, CLI for operators, SDK for applications, and MCP for compatible agents.
Enforce scope, retention, direction, rate limits, and approval in trusted code.
A self-hosted mails0 instance is application infrastructure. Worker code, D1 migrations, R2 object policy, routing rules, secrets, sender configuration, and scheduled cleanup need the same review and release evidence as other platform services.
Production schema can lag source. Run compatibility checks before changing message or mailbox behavior, make migrations forward-aware, and validate the deployed Worker against its bound resources. A successful static deployment does not prove inbound routing or outbound acceptance.
| Layer | Platform check | Failure evidence |
|---|---|---|
| Email Routing | Domain and route target are active | Known inbound message never reaches Worker |
| Worker | Route, bindings, and runtime version match | Request and ingestion logs with trace ID |
| D1 and R2 | Migrations and retention jobs are current | Message metadata and object references disagree |
| Outbound provider | Domain and sender are authorized | Provider acceptance and delivery events |
The useful operational events are mailbox created, first message received, extraction attempted, extraction succeeded, webhook acknowledged, message sent, provider accepted, mailbox paused, credential rotated, and mailbox expired. Those transitions expose reliability and adoption without copying sensitive bodies into a central telemetry stream.
Use privacy-preserving identifiers for rate limits and aggregate funnels. Keep raw addresses, OTPs, attachment contents, and secrets out of general analytics. When an incident requires message-level evidence, retrieve it through a restricted path with a retention decision.
A platform capability converts when a developer can complete the first real loop without a ticket. Provide a bootstrap command, one end-to-end example, a local or hosted sandbox, and an explicit route to production. Avoid requiring the entire self-hosting stack before a team can evaluate the API shape.
Promotion should follow evidence. A package install is a weak signal. A current message received and a workflow completed is stronger. Repeated use by an owned application justifies durable identity and service-level investment. This funnel also shows where documentation, product behavior, or platform policy blocks teams.
Prove inbound delivery and retrieval with receive-only authority.
Verify the signup, invitation, reset, or notification outcome.
Choose SDK, HTTP, event, or MCP based on the caller.
Apply domain, retention, sending, and incident policy.
Product behavior is verified against the mails0 source and documentation. External comparisons link to official vendor documentation checked on 2026-08-15.
No. It is an email capability that a platform team can expose through its existing catalog, secret management, deployment, policy, and observability systems.
Not necessarily. A platform team can run the deployment and give callers mailbox-scoped API, SDK, CLI, or MCP access without broader Cloudflare permissions.
Measure mailbox bootstrap, first expected email receipt, successful extraction or retrieval, and completed application outcome as separate events.
Start with one scoped inbox and one expected message. Add durable identity, sending, and operational complexity only when the first loop works.