Platform email: short, unique mail alias per project on the shared sender domain, independent of the project slug
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- backend
研究方向
Start with the cited email admission, inbound router, runtime inbound handler, and router compile entry points, then trace how the shared recipient service creates and reconciles routing rules and how projects are stored and migrated. The issue identifies the affected integration suites: email admission and email shared recipients. Before implementation, maintainers need to decide the alias ownership rules, whether aliases can change, and whether the original slug remains valid; done means those choices are implemented across routing, runtime, persistence, and tests.
由索引模型根據 Issue 內容生成。
描述
Use case
We run a self-hosted Void platform serving several brands. Our apps put a signed token in the sub-address so that a reply can be matched to its conversation without storing state, in the shape <slug>+reply+<token>@<mail domain>, with a 50-character token (c|t + 26 + . + 22). The shared domain ties the whole mailbox name to the project slug, and that collides with the RFC 5321 limit on the local part.
Problem
On the shared domain, the project slug is also the mailbox name:
- Sender admission requires the part of the From local part before the first
+to equal the project slug (admission.tsL388-L391). - The inbound router splits the recipient on the first
+and requires that prefix to equal the authoritative route's slug (proxy/src/email-router.tsL244-L270). - The runtime then strips
<slug>+frommessage.to(runtime/email/inbound.tsL200-L216); the slug is injected inrouter/compile.tsL1205-L1211.
The local part is limited to 64 octets (RFC 5321 section 4.5.3.1.1). With the shape above, the fixed part is +reply+ (7) plus the 50-character token, which is 57 octets. That leaves at most 7 characters for the slug. Descriptive slugs such as brand-feedback cannot be used for mail on the shared domain. The only choices are a shorter token, which weakens the scheme, or a different project name.
Slugs cannot be renamed, so a different name means recreating the project, which changes its URL and loses its deployments.
Proposal
An optional email_alias per project:
- Short, lowercase and unique across the installation, validated with the slug rules and against
EMAIL_RESERVED_SLUGS(reserved-slugs.tsL28-L34) so no project can claim a platform address. It should also be rejected when it equals another project's slug. - When set, admission and the router accept
<alias>+...in place of<slug>+....nullkeeps today's behaviour exactly. - The runtime strips the same prefix:
stripSlugFromAddressand__VOID_PROJECT_SLUGwould carry the alias when one is set. - Settable by an administrator or by the project owner (your call). The shared-recipient service creates one exact Cloudflare routing rule per receiving project, so changing the alias needs a reconcile of that rule.
I would expect to touch admission.ts, email-router.ts, the shared recipient service, the projects schema plus an additive migration, and the compile step above, with tests in the email-admission and email-shared-recipients integration suites. Happy to send a PR if you prefer this direction.
Questions for maintainers
- Do you prefer an alias field like this, or another approach, for example a shorter token format in apps, or sub-address handling that does not count the slug against the limit?
- Should the alias be permanent once mail has been sent from it, or freely changeable? Reply tokens already in flight would break on a change.
- Should the old slug keep working as a secondary address while an alias is active?
Related: #509, #510
- 主要語言
- TypeScript
- 星號
- 402
- 分支
- 32
- 平均合併
- 10 小時 51 分鐘
- 30 天內合併 PR
- 100
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
voidzero-dev/void 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
voidzero-dev/void#529 ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1-3 小時 新手友好度 78/100
voidzero-dev/void#428 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 56/100
voidzero-dev/void#527 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 54/100
voidzero-dev/void#525 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 67/100
voidzero-dev/void#524 ·
維護者通常 1 天內回覆
查看 voidzero-dev/void 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
endora-commerce/endora-commerce#397 ·
維護者通常 1 天內回覆
-
level/task
難度 2/5 1-3 小時 新手友好度 68/100
wazuh/wazuh-dashboard-plugins#9472 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 63/100
維護者通常 1 天內回覆
-
ready-for-agent
難度 2/5 1-3 小時 新手友好度 68/100
xavxyz/bei-shan-lin-shui#57 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
opennextjs/opennextjs-cloudflare#1461 ·
維護者通常 1 天內回覆