docs: clarify wildcard MX requirement for random subdomain (#1036)

Random subdomain mailbox creation only generates addresses; mail delivery
depends on DNS / Cloudflare Email Routing covering *.<base-domain>.
Cloudflare Email Routing does not inherit apex configuration onto
subdomains, so a wildcard `*` MX record on the base domain is required
for random subdomains to actually receive mail.

- Add `[!IMPORTANT]` block in subdomain.md (zh/en) explaining the two
  deliverable paths: DNS-only wildcard MX (recommended for random
  subdomains) vs Cloudflare dashboard "Add subdomain"
- Link to Cloudflare Email Routing — Subdomains official docs from
  worker-vars.md and subdomain.md
- Instruct copying apex MX records to host `*` preserving each record's
  priority/target, instead of hardcoding specific MX targets
- Shorten frontend `randomSubdomainTip` for CreateAccount and Login
  views (6 locales: zh/en/de/es/ja/pt-BR), drop Markdown backticks
  (Vue text interpolation renders them literally), and point users to
  the docs instead of embedding DNS instructions
- Trim overlap between existing `[!NOTE]` and new `[!IMPORTANT]` in
  subdomain.md
- Update CHANGELOG.md / CHANGELOG_EN.md under v1.9.0(main)

Closes #1035
Closes #1026

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dream Hunter
2026-05-14 15:09:32 +08:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 74c8e8f7e4
commit 8324b133fb
11 changed files with 64 additions and 15 deletions
@@ -45,8 +45,18 @@ RANDOM_SUBDOMAIN_LENGTH = 8
> 这个功能只是在“创建地址”时自动补一个随机二级域名。
>
> 当前没有“全局强制随机二级域名”的后端开关;未传 `enableRandomSubdomain: true` 的 API 调用不会自动随机。
> [!IMPORTANT] 随机子域名需要 DNS 通配 MX 记录
> 程序只负责生成 `name@<random>.abc.com` 这样的地址,**能不能收到邮件完全取决于 DNS / Email Routing 是否覆盖到 `*.abc.com`**Cloudflare Email Routing 的子域名配置**不会**从基础域名继承。可参考 Cloudflare 的 [Email Routing — Subdomains](https://developers.cloudflare.com/email-routing/setup/subdomains/) 文档。
>
> 它不会自动帮你创建 Cloudflare 侧的子域名收件路由或 DNS 配置,请先确保基础域名/子域名路由本身已经可用。
> 让 `*.abc.com` 可投递有两种做法:
>
> 1. **DNS 通配 MX 记录(最简方案)** — 在 `abc.com` 的 DNS 中,把基础域名上**现有的每一条 MX 记录**都复制一份到 `*` 主机名上,**保留每条记录的 priority 与 target**。这样 `*.abc.com` 会解析到与 apex 相同的 MX 目标,邮件流向同一个 Cloudflare Email Routing zone,并由 apex 的 Catch-all 规则交给 Worker**Cloudflare 侧不需要额外配置**。
> 2. **Cloudflare 控制台 “Add subdomain”** — 在 Email Routing 后台显式添加该子域名,并单独配置其 DNS 与 Catch-all 路由规则。这只覆盖你添加的那个具体子域名,不适合随机生成的任意子域名。
>
> 随机子域名场景下推荐使用 **方案 (1)**。如果不做这一步,随机子域名功能在前端看起来正常,但实际邮件不会进入 Worker。
>
> 参考 issue[#1035](https://github.com/dreamhunter2333/cloudflare_temp_email/issues/1035)
## 允许 API 直接指定子域名