docs: clarify Email Routing setup order (#1006)

docs: clarify email routing setup order
This commit is contained in:
Dream Hunter
2026-04-25 21:35:14 +08:00
committed by GitHub
parent c9698d03f1
commit 46fbb4c099
8 changed files with 9 additions and 11 deletions

View File

@@ -14,7 +14,7 @@
- feat: |API| 新增服务端解析邮件接口 `/api/parsed_mails``/api/parsed_mail/:id`,直接返回 `sender` / `subject` / `text` / `html` / `attachments` 元信息(复用 `commonParseMail`AI agent 侧不再需要引入 MIME 解析器
- feat: |Skill| 新增仓库内置只读 skill `cf-temp-mail-agent-mail``skills/cf-temp-mail-agent-mail/`),让 OpenClaw / Codex / Cursor 等 AI agent 凭用户提供的 Address JWT + API 地址读取邮箱、轮询验证码,绕开创建邮箱时的 Turnstile 人机验证;可通过 `npx degit dreamhunter2333/cloudflare_temp_email/skills/cf-temp-mail-agent-mail` 安装
- docs: |文档| 新增"AI Agent 使用邮箱"文档(`guide/feature/agent-email`),说明 `parsed_mail` API 用法,并在 parsed API 不可用时给出对齐前端的 `mail-parser-wasm` + `postal-mime` 本地解析回退方案
- docs: |文档| 在 `quick-start` / `worker-vars` / `email-routing` 三个入口文档(中英文)显式补充"域名是部署前提条件"提示,强调需先在 Cloudflare 启用 Email Routing 并配置 Catch-all子域名需单独启用避免用户在没有可用域名时直接开始部署却收不到邮件issue #1004
- docs: |文档| 在 `quick-start` / `worker-vars` / `email-routing` 三个入口文档(中英文)显式补充"域名是部署前提条件"提示,强调需先在 Cloudflare 启用 Email Routing 并下发邮件 DNS 记录、Worker 部署后再绑定 Catch-all子域名需单独启用避免用户在没有可用域名时直接开始部署却收不到邮件issue #1004
### Bug Fixes

View File

@@ -14,7 +14,7 @@
- feat: |API| Add server-side parsed-mail endpoints `/api/parsed_mails` and `/api/parsed_mail/:id` that return `sender` / `subject` / `text` / `html` / `attachments` metadata directly (reuses `commonParseMail`), so AI agents no longer need a client-side MIME parser
- feat: |Skill| Bundle a read-only skill `cf-temp-mail-agent-mail` (`skills/cf-temp-mail-agent-mail/`) so AI agents like OpenClaw / Codex / Cursor can consume a mailbox with a user-supplied Address JWT + API base URL — list mails, poll verification codes, etc. — sidestepping the Turnstile challenge required to create a mailbox. Install via `npx degit dreamhunter2333/cloudflare_temp_email/skills/cf-temp-mail-agent-mail`
- docs: |Docs| Add "AI Agent Mailbox Usage" doc (`guide/feature/agent-email`) covering the `parsed_mail` API and a local-parse fallback using `mail-parser-wasm` + `postal-mime` (mirrors the frontend) when parsed endpoints are unavailable
- docs: |Docs| Make "a domain is a hard prerequisite" explicit at the top of `quick-start`, `worker-vars`, and `email-routing` (zh + en), spelling out that Cloudflare Email Routing must be enabled with a Catch-all rule and that subdomains do not inherit the parent domain's Email Routing — so users no longer start deploying without a usable domain and end up unable to receive mail (issue #1004)
- docs: |Docs| Make "a domain is a hard prerequisite" explicit at the top of `quick-start`, `worker-vars`, and `email-routing` (zh + en), spelling out that Cloudflare Email Routing must be enabled with email DNS records provisioned before deployment, the Catch-all rule must be bound after the Worker is deployed, and subdomains do not inherit the parent domain's Email Routing — so users no longer start deploying without a usable domain and end up unable to receive mail (issue #1004)
### Bug Fixes

View File

@@ -5,9 +5,8 @@
>
> - A domain whose DNS is hosted on Cloudflare.
> - Email Routing enabled on that domain in the Cloudflare dashboard, with the `Email DNS records` provisioned.
> - A Catch-all routing rule that delivers mail to your deployed Worker (this can only be selected after the Worker is deployed).
>
> Without all of the above, **no inbound mail and no verification code will ever be received**, even if the Worker / Pages deployment itself succeeds.
> After the Worker is deployed, you must also configure a Catch-all routing rule that delivers mail to that Worker. Without completing both phases, **no inbound mail and no verification code will ever be received**, even if the Worker / Pages deployment itself succeeds.
1. In the CF console for the corresponding domain under `Email Routing`, configure the `Email DNS records`. If there are multiple domains, you need to configure `Email DNS records` for each domain.

View File

@@ -4,7 +4,7 @@
> [!IMPORTANT] A domain is required first
> This project relies on Cloudflare Email Routing to receive emails, so **a domain is a hard prerequisite for deployment**.
> You must already own a domain (apex or subdomain) hosted on Cloudflare DNS, with Email Routing enabled and the corresponding email DNS records (including a Catch-all rule) configured. Without it, **mail will not be received and verification flows will fail**.
> You must already own a domain (apex or subdomain) hosted on Cloudflare DNS, with Email Routing enabled and the corresponding email DNS records provisioned. After the Worker is deployed, bind a Catch-all rule to that Worker. Without both steps, **mail will not be received and verification flows will fail**.
> See [Cloudflare Email Routing](/en/guide/email-routing) for the full setup.
You need a `good network environment` and a `Cloudflare account`. Open the [Cloudflare Dashboard](https://dash.cloudflare.com/)

View File

@@ -14,7 +14,7 @@
| `ENABLE_USER_DELETE_EMAIL` | Text/JSON | Whether to allow users to delete emails, disabled if not configured | `true` |
> [!IMPORTANT] `DOMAINS` and `DEFAULT_DOMAINS` must already be set up in Cloudflare
> Every domain you put here (including `DEFAULT_DOMAINS`, `USER_ROLES.domains`, `RANDOM_SUBDOMAIN_DOMAINS` further below) **must already have Cloudflare Email Routing enabled with a Catch-all rule pointing at the Worker**, otherwise inbound mail will never reach the Worker.
> Every domain you put here (including `DEFAULT_DOMAINS`, `USER_ROLES.domains`, `RANDOM_SUBDOMAIN_DOMAINS` further below) **must already have Cloudflare Email Routing enabled and its email DNS records provisioned**. After the Worker is deployed, bind the domain's Catch-all rule to that Worker; otherwise inbound mail will never reach the Worker.
> See [Cloudflare Email Routing](/en/guide/email-routing) for the setup steps.
## Console Related Variables

View File

@@ -1,13 +1,12 @@
# Cloudflare Email Routing
> [!IMPORTANT] 域名是部署的前提条件
> 本项目的收件能力**完全依赖** Cloudflare Email Routing。开始部署 Worker / Pages 之前,你必须先准备好域名并 Email Routing 配通
> 本项目的收件能力**完全依赖** Cloudflare Email Routing。开始部署 Worker / Pages 之前,你必须先准备好域名并完成 Email Routing 的基础配置
>
> - 域名 DNS 已托管在 Cloudflare。
> - 已在 Cloudflare 控制台为该域名启用 Email Routing并完成 `电子邮件 DNS 记录` 的下发。
> - 已配置 Catch-all 路由规则,目标指向你部署的 Worker部署完 Worker 之后才能选到)。
>
> 没有完成上述配置,即使 Worker / Pages 部署成功,也**收不到邮件、无法接收任何验证码**。
> Worker 部署完成后,你还必须配置 Catch-all 路由规则,把邮件投递到这个 Worker。没有完成这两个阶段的配置,即使 Worker / Pages 部署成功,也**收不到邮件、无法接收任何验证码**。
1. 在 CF 控制台网页的对应域名的 `Email Routing` 下,配置 `电子邮件 DNS 记录`, 如果是多个域名,需要配置多个域名的 `电子邮件 DNS 记录`

View File

@@ -4,7 +4,7 @@
> [!IMPORTANT] 必须先准备一个域名
> 本项目依赖 Cloudflare Email Routing 接收邮件,**域名是部署前提条件**。
> 你必须先准备一个域名(一级域名或子域名均可),并在 Cloudflare 中托管 DNS、配置 Email Routing对应的电子邮件 DNS 记录(至少包含 Catch-all 规则),否则将**无法接收邮件 / 无法完成验证码流程**。
> 你必须先准备一个域名(一级域名或子域名均可),并在 Cloudflare 中托管 DNS、启用 Email Routing、完成对应的电子邮件 DNS 记录下发。Worker 部署完成后,再把 Catch-all 规则绑定到这个 Worker两步缺一都会导致**无法接收邮件 / 无法完成验证码流程**。
> 详细配置见 [Cloudflare Email Routing](/zh/guide/email-routing)。
需要 `良好的网络环境``cloudflare 账号` 打开 [cloudflare控制台](https://dash.cloudflare.com/)

View File

@@ -14,7 +14,7 @@
| `ENABLE_USER_DELETE_EMAIL` | 文本/JSON | 是否允许用户删除邮件, 不配置则不允许 | `true` |
> [!IMPORTANT] DOMAINS 与 DEFAULT_DOMAINS 必须先在 Cloudflare 配置好
> 这里填写的所有域名(包括下文「邮箱相关变量」里的 `DEFAULT_DOMAINS`、`USER_ROLES.domains`、`RANDOM_SUBDOMAIN_DOMAINS` 等)必须是你**已经在 Cloudflare Email Routing 中启用并配置过 Catch-all 规则**的域名,否则邮件无法投递到 Worker。
> 这里填写的所有域名(包括下文「邮箱相关变量」里的 `DEFAULT_DOMAINS`、`USER_ROLES.domains`、`RANDOM_SUBDOMAIN_DOMAINS` 等)必须是你**已经在 Cloudflare Email Routing 中启用并完成邮件 DNS 记录下发**的域名。Worker 部署完成后,还需要把该域名的 Catch-all 规则绑定到这个 Worker,否则邮件无法投递到 Worker。
> 配置步骤见 [Cloudflare Email Routing](/zh/guide/email-routing)。
## 后台相关变量