docs: highlight that a domain is a prerequisite for deployment (#1005)

In quick-start / worker-vars / email-routing (zh + en), explicitly
call out that a Cloudflare-hosted domain with Email Routing + Catch-all
must be set up before deploying, and that subdomains do not inherit
the parent domain's Email Routing. Closes #1004.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cloverstd
2026-04-25 18:57:32 +08:00
committed by GitHub
parent 5f955ccca6
commit c9698d03f1
8 changed files with 40 additions and 2 deletions

View File

@@ -1,5 +1,14 @@
# Cloudflare Email Routing
> [!IMPORTANT] A domain is a hard prerequisite for deployment
> Mail reception in this project is **entirely dependent on** Cloudflare Email Routing. Before deploying Worker / Pages, you must already have:
>
> - 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.
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.
2. Before binding an email address to your Worker, you need to enable email routing and have at least one verified email address (destination address).
@@ -9,4 +18,4 @@
![email](/readme_assets/email.png)
> [!WARNING] Subdomains must be configured separately
> If you want to receive mail on a **subdomain** (e.g. `mail.example.com`), you must enable `Email Routing` on **that subdomain** in the CF dashboard and configure its email DNS records and Catch-all rule separately. Enabling Email Routing only on the apex domain **does not cover subdomains**.
> If you want to receive mail on a **subdomain** (e.g. `mail.example.com`), you must enable `Email Routing` on **that subdomain** in the CF dashboard and configure its email DNS records and Catch-all rule separately. Enabling Email Routing only on the apex domain **does not cover subdomains**, and a subdomain **does not inherit** its parent domain's Email Routing configuration — mail to a subdomain that has not been individually enabled will **fail to deliver**.

View File

@@ -2,6 +2,11 @@
## Before You Begin
> [!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**.
> 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/)
Please choose one of the three deployment methods below:

View File

@@ -13,6 +13,10 @@
| `ENABLE_USER_CREATE_EMAIL` | Text/JSON | Whether to allow users to create mailboxes, disabled if not configured | `true` |
| `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.
> See [Cloudflare Email Routing](/en/guide/email-routing) for the setup steps.
## Console Related Variables
| Variable Name | Type | Description | Example |