Fix Cloudflare sending and catch-all delivery - #1
Conversation
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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| guard navigationAction.navigationType == .linkActivated, | ||
| let url = navigationAction.request.url | ||
| else { | ||
| return .allow |
There was a problem hiding this comment.
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 👍 / 👎.
| // 精确地址与兜底地址都进入收件箱。实际信封收件人仍保存在 to 中, | ||
| // 因此列表可以展示命中的别名,而不会把兜底邮件藏进不可见的旧文件夹。 | ||
| const folder = "inbox"; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
send(),不再把 Date/From/Message-ID 等平台托管头塞进旧 MIME,避免设置保存后仍然发不出去。send_email绑定只代表 Worker 能调接口,发件域仍须在 Email Sending 完成 onboarding。Test plan
npm run verify(lint / typecheck / 302 tests / migrations)npm run build:webMade with Cursor