Last edited time
Jul 24, 2025 12:21 PM
password
AI summary
type
status
date
slug
summary
tags
category
icon
😀
前言: 首先你要注册一个域名,如果你要拿来注册一些网站或者游戏比如steam不要用top xyz 这种廉价域名有可能会网站被当临时邮箱拦截.
可以说说你的故事:阻碍、努力、结果成果,意外与转折。
 

📝 Cloud Mail 部署教程

 

1 绑定域名

注册账号登录到cloudflare 控制台,开始绑定域名(如果你已经绑定好了可以直接跳到第二步)
notion image
notion image
选择免费的计划
notion image
notion image
设置dns
notion image
不同的厂商的修改dns都差不多,这里以华为云为例
notion image
设置完成后可能要等几分钟,期间可以刷新浏览器看有没有完成
notion image
完成后的界面
notion image
这样子账户主页就会显示你的域名了,域名绑定完成
notion image

2 创建worker项目

到项目仓库fork项目代码到你的仓库
notion image
notion image
这样子仓库就会复制到你那边了
notion image
回到cloudflare控制台,找到workers页面导入你的github仓库代码
notion image
notion image
notion image
设置启动目录
notion image
等待构建部署完成
notion image
构建完成后的页面
notion image
这时候项目就会出现在worker列表了,点击名字进入可以查看和设置
notion image

3 设置环境变量

服务还需要设置一些环境变量和绑定数据库才能正常运行
notion image
添加以下变量,注意domain是json类型的
变量名
类型
作用
domain
["你的域名"], 示例:["mornglow.top"]
JSON
网站会使用这个域名作为邮箱域名
admin
管理员的邮箱,示例:admin@mornglow.top
纯文本
该邮箱用户注册后会成为网站管理员
jwt_secret
随便输入一串字符串,示例:Z7f!xPq8mV@L2bC$r9X&N1t
纯文本
登录身份令牌的安全密钥
notion image
设置完成自定义域名和环境变量的样子
notion image

4 绑定数据库

找到左侧菜单存储和数据库,创建kv数据库,数据库名字随意
notion image
创建d1数据库,数据库名字随意 位置选择离你近的地方
notion image
创建R2存储桶,并绑定域名
notion image
notion image
回到worker设置界面绑定刚刚创建的数据库
d1数据库 变量名为 db
kv数据库 变量名为 kv
kv存储桶 变量名为 r2
notion image
浏览器输入https://你的自定义域名/api/init/你绑定的的jwt_secret 会自动初始化数据库(如果之前部署过只会更新不会覆盖原有数据)
notion image
浏览器输入你绑定的自定义域名网站已经能打开了,注册登录了
notion image

5 启用邮件接收

设置完成后才能接收邮件了
回到cloudflare控制台,点击菜单账户主页,再点你的域名
notion image
菜单栏会发生变化
notion image
notion image
notion image
启用电子邮件
notion image
notion image
启用电子邮件完成后的样子
notion image
设置转发到worker
notion image
notion image
设置完成的样子
notion image
测试接收邮件
notion image

6 附件收发

设置完这一步后才能接收附件和发送附件
回到上一级菜单,找到r2对象存储,创建存储桶
notion image
桶名字可以随便填 位置选择离你近的地方
notion image
设置自定义域名
notion image
notion image
自定义域名添加到项目设置里面,域名前要加https://
notion image
回到worker绑定刚才创建的r2存储桶
r2存储桶 变量名为 r2
notion image

7 邮件发送

使用第三方服务resend发送邮件
浏览器输入resend.com注册
notion image
添加域名
notion image
notion image
notion image
notion image
等待验证完成
notion image
验证完成后的样子
notion image
创建apiKey
notion image
notion image
notion image
回到项目网站设置
notion image
设置邮件状态回调接口
notion image
回调接口 https://你的域名/api/webhooks
notion image
notion image

8 人机验证

设置这一步后可以开启人机验证,防止网站被机器人批量注册
菜单栏找到 turnstile
notion image
notion image
添加你的域名
notion image
名字随意
notion image
复制这两个密钥
notion image
回到项目设置页面设置密钥
notion image

9 TG和其他邮箱转发

在TG搜索找到这个机器人
notion image
创建机器人并且获取token
notion image
给机器人一条发消息
notion image
浏览器输入 https://api.telegram.org/bot你的机器TOKEN/getUpdates 获取chat_id
如果获取不到就再给机器人发几条消息
notion image
设置token 和 chat_id
notion image
转发到其他服务商邮箱
在cloudflare验证邮箱
notion image
设置邮箱
notion image
教程完结

🤗 总结归纳

项目更新教程

  1. 仓库代码更新后fork到你的仓库worker会自动重新部署,绑定的数据库 d1 kv r2 会掉,每次更新都要重新绑定 (目前没有更好的办法解决)
  1. 执行 https://你的项目域名/api/init/你的jwt_secret 更新数据库 (只会更新不会覆盖已有数据)
总结文章的内容

📎 参考文章

 
💡
有关Cloudmail安装或者使用上的问题,欢迎您在底部评论区留言,一起交流~
 
腾讯(EdgeOne)CDN加速免费二级域名pp.ua
Loading...
迷途
迷途
OR的博客,用知识和技术创造未来!!!
Latest posts
腾讯(EdgeOne)CDN加速
2025-7-26
Cloud Mail 部署教程
2025-7-24
免费.com域名和.site域名
2025-7-20
免费二级域名pp.ua
2025-7-20
giffgaff申请、开卡与常见问题攻略(合集)
2025-6-26
节点转换常用链接汇总
2025-6-24
Announcement
🎉OR科技,用心服务🎉
-- 分享知识,点亮生活 ---
保持热爱追逐远方
路虽远行则将至
事虽难不为不成
为之则易不为则难
👏欢迎您的来访👏
距离2024年春节已过去
-- 免责声明 ---
⚠️ 本站内容仅代表个人观点,可以转载,但请注明出处。 ⚠️ 本人分享内容仅供学习参考使用,请勿用于其他用途。