fix: clarify account and address terminology (#1113)

* fix: clarify account and address terminology

* fix: narrow account and address terminology changes

* fix: simplify mailbox settings label

* fix: align mailbox translations and send docs
This commit is contained in:
Dream Hunter
2026-08-19 13:31:55 +08:00
committed by GitHub
parent a3c62de42f
commit 3bcc0c19ce
10 changed files with 112 additions and 60 deletions
@@ -150,12 +150,30 @@ cd worker
wrangler secret put SMTP_CONFIG
```
## User Accounts, Email Addresses, and Send Permission
These concepts are related, but they identify different objects:
| Concept | Description |
|---------|-------------|
| User account | Signs in to the user center and can bind and manage multiple email addresses. The user account's login email is not automatically a sending or receiving address |
| Email address | The identity that actually receives and sends mail, such as `name@example.com`. The address currently selected on the frontend home page is authenticated by its Address JWT |
| Send permission and balance | Permission and balance records in `address_sender` are managed independently **per email address**; user roles configured by `NO_LIMIT_SEND_ROLE` can bypass address balance checks |
Multiple email addresses bound to the same user account therefore do not share send permission or balance. To request permission for an address:
1. Switch to the email address that needs to send mail
2. Open the **Send Mail** page
3. Click **Request Access**
The request affects only the address selected at that time. After switching to another address, check that address's own balance and request permission separately if needed. An email address can also hold send permission without being bound to a user account.
## Send Balance Mechanism
Users need a send balance to send emails. The balance mechanism works as follows:
An email address needs its own send balance to send emails. The balance mechanism works as follows:
1. **Auto-initialize Default Quota**: When `DEFAULT_SEND_BALANCE > 0`, the system automatically initializes the default quota when the user opens the send page or calls the send-mail API for the first time
2. **Manual Request**: If `DEFAULT_SEND_BALANCE = 0`, users can still click "Request Send Permission" in the frontend to create a pending send-access record for admins to review
2. **Manual Request**: If `DEFAULT_SEND_BALANCE = 0`, switch to the target email address in the frontend and click **Request Access** to create a pending send-access record for the current address
3. **Unlimited Sending**: The following methods can bypass balance checks:
- Add the address to the "No Limit Send Address List" in the admin console
- Configure the `NO_LIMIT_SEND_ROLE` environment variable to specify roles that can send without limits
@@ -150,12 +150,30 @@ cd worker
wrangler secret put SMTP_CONFIG
```
## 用户账号、邮箱地址与发信权限
这三个概念相互关联,但不是同一个对象:
| 概念 | 说明 |
|------|------|
| 用户账号 | 用于登录用户中心,可绑定和管理多个邮箱地址;用户账号的登录邮箱本身不等于用于收发信的邮箱地址 |
| 邮箱地址 | 实际收信和发信的身份,例如 `name@example.com`;前端首页当前选中的地址由该地址的凭证(Address JWT)认证 |
| 发信权限与额度 | `address_sender` 中的权限和额度以**邮箱地址**为单位独立管理;`NO_LIMIT_SEND_ROLE` 配置的用户角色可以绕过地址额度检查 |
因此,同一用户账号绑定的多个邮箱地址不会共享发信权限或余额。为某个地址申请发信权限时:
1. 先在前端切换到需要发信的邮箱地址
2. 打开「发送邮件」页
3. 点击「申请权限」
申请只作用于当时选中的邮箱地址。切换到另一个地址后,需要查看该地址自己的额度,并在需要时单独申请。邮箱地址不必绑定用户账号也可以独立持有发信权限。
## 发信余额机制
用户发送邮件需要有发信余额。余额机制如下:
邮箱地址发送邮件需要有该地址的发信余额。余额机制如下:
1. **自动初始化默认额度**:当 `DEFAULT_SEND_BALANCE > 0` 时,用户打开前端发信页或第一次调用发信接口时,系统会自动为该地址初始化默认额度
2. **手动申请**:如果 `DEFAULT_SEND_BALANCE = 0`用户仍可以在前端界面点击「申请发信权限」按钮,创建待管理员处理的发信权限记录
2. **手动申请**:如果 `DEFAULT_SEND_BALANCE = 0`使用者可以在前端切换到目标邮箱地址并点击「申请权限」,为当前地址创建待管理员处理的发信权限记录
3. **无限制发送**:以下方式可以跳过余额检查:
- 在 admin 后台将地址加入「无限制发送地址列表」
- 配置 `NO_LIMIT_SEND_ROLE` 环境变量,指定可以无限发送的用户角色