[GH-ISSUE #328] 添加子域名 #107

Closed
opened 2026-02-26 20:35:40 +03:00 by kerem · 7 comments
Owner

Originally created by @ghwnode02 on GitHub (Jul 1, 2024).
Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/328

复现步骤

预期行为

部署方式

  • cli 部署
  • [√ ] 用户界面部署

浏览器环境

edge

Originally created by @ghwnode02 on GitHub (Jul 1, 2024). Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/328 ## 复现步骤 ## 预期行为 ## 部署方式 - [ ] cli 部署 - [√ ] 用户界面部署 ## 浏览器环境 edge
kerem closed this issue 2026-02-26 20:35:40 +03:00
Author
Owner

@ghwnode02 commented on GitHub (Jul 1, 2024):

在域名的电子邮件路由添加一个子域subdomain.example.com, 这可以让cf自动生成一些DNS记录

添加/修改DNS记录

spf记录复制粘贴文档的就好,即v=spf1 include:_spf.mx.cloudflare.net include:relay.mailchannels.net ~all
_mailchannels.subdomain的内容复制原本_mailchannels的内容,subdomain可以写全但cf也会帮你自动缩写
mailchannels._domainkey.subdomain的内容复制原本mailchannels._domainkey的内容
_dmarc.subdomain的内容复制原本_dmarc的内容
一句话概括下,就是你的example.com的DNS有哪些TXT的解析记录,给要用来发邮件的子域名复制一份,名称里面就带上子域名。
把子域名添加到workers变量的DOMAINS里,部署即可.

按照上述的配置方法,MX和TXT,spf记录cloud flare会自动生成,但是DKIM我是用的resend,需要使用子域名添加到resend获取token吗?还是使用之前的DKIM就可以。

把子域名添加到workers变量的DOMAINS里
这个地方workers变量添加子域名的格式是怎样的?
我测试了["xxx.example.com"]["bbb.example.com"]和["xxx.example.com","bbb.example.com"]都无法使用

<!-- gh-comment-id:2199717237 --> @ghwnode02 commented on GitHub (Jul 1, 2024): 在域名的电子邮件路由添加一个子域subdomain.example.com, 这可以让cf自动生成一些DNS记录 添加/修改DNS记录 spf记录复制粘贴文档的就好,即v=spf1 include:_spf.mx.cloudflare.net include:relay.mailchannels.net ~all _mailchannels.subdomain的内容复制原本_mailchannels的内容,subdomain可以写全但cf也会帮你自动缩写 mailchannels._domainkey.subdomain的内容复制原本mailchannels._domainkey的内容 _dmarc.subdomain的内容复制原本_dmarc的内容 一句话概括下,就是你的example.com的DNS有哪些TXT的解析记录,给要用来发邮件的子域名复制一份,名称里面就带上子域名。 把子域名添加到workers变量的DOMAINS里,部署即可. 按照上述的配置方法,MX和TXT,spf记录cloud flare会自动生成,但是DKIM我是用的resend,需要使用子域名添加到resend获取token吗?还是使用之前的DKIM就可以。 把子域名添加到workers变量的DOMAINS里 这个地方workers变量添加子域名的格式是怎样的? 我测试了["xxx.example.com"]["bbb.example.com"]和["xxx.example.com","bbb.example.com"]都无法使用
Author
Owner

@dreamhunter2333 commented on GitHub (Jul 1, 2024):

应该 resend 添加域名的时候也要用子域名

<!-- gh-comment-id:2199919001 --> @dreamhunter2333 commented on GitHub (Jul 1, 2024): 应该 resend 添加域名的时候也要用子域名
Author
Owner

@ghwnode02 commented on GitHub (Jul 2, 2024):

我cloudns的域名测试了一下子域名好像无法添加到resend

<!-- gh-comment-id:2202014421 --> @ghwnode02 commented on GitHub (Jul 2, 2024): 我cloudns的域名测试了一下子域名好像无法添加到resend
Author
Owner

@dreamhunter2333 commented on GitHub (Jul 2, 2024):

我cloudns的域名测试了一下子域名好像无法添加到resend

那看起来 resend 无法使用子域名了,我文档中说明下这点

<!-- gh-comment-id:2202024581 --> @dreamhunter2333 commented on GitHub (Jul 2, 2024): > 我cloudns的域名测试了一下子域名好像无法添加到resend 那看起来 resend 无法使用子域名了,我文档中说明下这点
Author
Owner

@ghwnode02 commented on GitHub (Jul 2, 2024):

添加另外一个域名,要怎么配置

<!-- gh-comment-id:2202031200 --> @ghwnode02 commented on GitHub (Jul 2, 2024): 添加另外一个域名,要怎么配置
Author
Owner

@dreamhunter2333 commented on GitHub (Jul 2, 2024):

添加另外一个域名,要怎么配置

domains 是个列表,增加元素就可以

<!-- gh-comment-id:2203422941 --> @dreamhunter2333 commented on GitHub (Jul 2, 2024): > 添加另外一个域名,要怎么配置 domains 是个列表,增加元素就可以
Author
Owner

@dreamhunter2333 commented on GitHub (Jul 3, 2024):

建议使用主域名发送邮件,子域名可以用来接收邮件

<!-- gh-comment-id:2205123721 --> @dreamhunter2333 commented on GitHub (Jul 3, 2024): 建议使用主域名发送邮件,子域名可以用来接收邮件
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudflare_temp_email#107
No description provided.