mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-04 23:17:34 +08:00
feat(subdomain): add random second-level mailbox support (#924)
Summary: add random second-level subdomain mailbox creation for web, admin, and Telegram. Scope: worker config, UI toggle, and README/VitePress documentation. Co-authored-by: wufei <fwu@creams.io>
This commit is contained in:
@@ -9,3 +9,29 @@ Mail channel is no longer supported. The reference below is limited to the recei
|
||||
Reference
|
||||
|
||||
- [Configure Subdomain Email](https://github.com/dreamhunter2333/cloudflare_temp_email/issues/164#issuecomment-2082612710)
|
||||
|
||||
## Create Random Second-level Subdomain Addresses
|
||||
|
||||
If your base domain mail routing is already configured, you can also let users create mailbox
|
||||
addresses with an automatically generated random second-level subdomain, for example:
|
||||
|
||||
- Base domain: `abc.com`
|
||||
- Created address: `name@x7k2p9q1.abc.com`
|
||||
|
||||
This is useful for mailbox isolation and reducing repeated hits on the same address.
|
||||
|
||||
Add these worker variables:
|
||||
|
||||
```toml
|
||||
RANDOM_SUBDOMAIN_DOMAINS = ["abc.com"]
|
||||
RANDOM_SUBDOMAIN_LENGTH = 8
|
||||
```
|
||||
|
||||
- `RANDOM_SUBDOMAIN_DOMAINS`: base domains that allow optional random second-level subdomains
|
||||
- `RANDOM_SUBDOMAIN_LENGTH`: random string length, range `1-63`, default `8`
|
||||
|
||||
> [!NOTE]
|
||||
> This feature only appends a random second-level subdomain when the mailbox is created.
|
||||
>
|
||||
> It does not automatically create Cloudflare-side subdomain mail routes or DNS records for you,
|
||||
> so make sure the base-domain/subdomain routing is already available first.
|
||||
|
||||
Reference in New Issue
Block a user