Skip to content

Fix Cloudflare sending and catch-all delivery - #1

Merged
gentpan merged 1 commit into
mainfrom
fix/cloudflare-sending
Sep 16, 2026
Merged

gentpan merged 1 commit into
mainfrom
fix/cloudflare-sending

Conversation

@gentpan

@gentpan gentpan commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cloudflare Email Service 改走结构化 send(),不再把 Date/From/Message-ID 等平台托管头塞进旧 MIME,避免设置保存后仍然发不出去。
  • 设置页、安装脚本和 FAQ 明确:send_email 绑定只代表 Worker 能调接口,发件域仍须在 Email Sending 完成 onboarding。
  • 兜底邮件迁回收件箱并展示实际信封收件人;纳入原生 macOS 客户端。

Test plan

  • npm run verify(lint / typecheck / 302 tests / migrations)
  • npm run build:web
  • 在已完成 Email Sending onboarding 的域名上测试 Cloudflare 渠道「测试发送」
  • 未 onboarding 时确认失败提示指向 destination address / Email Sending
  • 给 catch-all 别名发信,确认出现在收件箱并显示原始收件地址

Made with Cursor

Treat send_email as a Worker API binding only, switch Cloudflare to structured send(), and keep catch-all messages in the inbox with the envelope recipient visible. Add the native macOS client that uses the same Worker API.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-16T12:46:12.273701Z 77b3540 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77b3540243

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +62 to +65
guard navigationAction.navigationType == .linkActivated,
let url = navigationAction.request.url
else {
return .allow

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Block form submissions from rendered email HTML

When a malicious email contains an HTML form, its submission has navigation type .formSubmitted, so this guard returns .allow and the embedded web view sends the request or navigates to the remote site. JavaScript being disabled does not prevent forms, and the CSP has no form-action 'none', allowing a phishing form to collect input without the explicit external-browser handoff used for links. Cancel all navigation except the initial document, or explicitly block forms in the CSP/delegate.

Useful? React with 👍 / 👎.

Comment thread src/email/inbound.ts
Comment on lines +36 to +38
// 精确地址与兜底地址都进入收件箱。实际信封收件人仍保存在 to 中,
// 因此列表可以展示命中的别名,而不会把兜底邮件藏进不可见的旧文件夹。
const folder = "inbox";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist the envelope recipient before merging catch-all mail

When the SMTP envelope recipient differs from the raw To header, such as Bcc or forwarded delivery to a catch-all alias, the claimed invariant here is false: storage still prefers parsed.to and only falls back to message.to when that header is empty. After moving every catch-all message into inbox, the list's alias indicator therefore shows an unrelated header recipient or no useful alias, and the actual matched address cannot be recovered; persist the envelope recipient explicitly (or ensure it is included in the stored recipient data).

Useful? React with 👍 / 👎.

@gentpan
gentpan merged commit 823b2fc into main Sep 16, 2026
1 of 2 checks passed
@gentpan
gentpan deleted the fix/cloudflare-sending branch September 16, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant