[GH-ISSUE #168] 可否实现 SMTP 协议? #57

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

Originally created by @oneisall8955 on GitHub (Apr 27, 2024).
Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/168

如第三方客户端使用邮箱+jwt 的密码登录使用,使用第三方客户端进行收发邮件

Originally created by @oneisall8955 on GitHub (Apr 27, 2024). Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/168 如第三方客户端使用邮箱+jwt 的密码登录使用,使用第三方客户端进行收发邮件
kerem 2026-02-26 20:35:23 +03:00
Author
Owner

@oneisall8955 commented on GitHub (Apr 27, 2024):

最近搭建了些开源项目玩,有个项目要填写 SMTP 的协议,想起搭建了临时邮箱,不知道可否使用这个服务?

image
<!-- gh-comment-id:2080681649 --> @oneisall8955 commented on GitHub (Apr 27, 2024): 最近搭建了些开源项目玩,有个项目要填写 SMTP 的协议,想起搭建了临时邮箱,不知道可否使用这个服务? <img width="806" alt="image" src="https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/dd5bc5dd-c163-4eb2-bfd5-d003b29d5a06">
Author
Owner

@dreamhunter2333 commented on GitHub (Apr 27, 2024):

感谢反馈,理论上可行,需要一个代理层,cf worker 可以通过 http 协议收发

<!-- gh-comment-id:2080818597 --> @dreamhunter2333 commented on GitHub (Apr 27, 2024): 感谢反馈,理论上可行,需要一个代理层,cf worker 可以通过 http 协议收发
Author
Owner

@oneisall8955 commented on GitHub (Apr 27, 2024):

感谢反馈,理论上可行,需要一个代理层,cf worker 可以通过 http 协议收发

十分期待!

<!-- gh-comment-id:2080955669 --> @oneisall8955 commented on GitHub (Apr 27, 2024): > 感谢反馈,理论上可行,需要一个代理层,cf worker 可以通过 http 协议收发 十分期待!
Author
Owner

@dreamhunter2333 commented on GitHub (Apr 29, 2024):

main 分支增加了下, 文档等打新的 tag 会更新到网站,可以先参考下面两个文件

搭建 SMTP 代理服务
发送邮件 API

<!-- gh-comment-id:2082855396 --> @dreamhunter2333 commented on GitHub (Apr 29, 2024): main 分支增加了下, 文档等打新的 tag 会更新到网站,可以先参考下面两个文件 [搭建 SMTP 代理服务](https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/zh/guide/feature/config-smtp-proxy.md) [发送邮件 API](https://github.com/dreamhunter2333/cloudflare_temp_email/blob/main/vitepress-docs/docs/zh/guide/feature/send-mail-api.md)
Author
Owner

@oneisall8955 commented on GitHub (Apr 30, 2024):

@dreamhunter2333

灰常感谢,开发速度飞快!

搭建了,但是不成功,有以下问题,有些我自己解决了,最主是用最新的worker.js部署上去,通过api形式调用后,返回400 No balance。
搭建 smtp_proxy_server 的问题具体如下:

  1. 没有arm64 架构的docker镜像,这部分我重新构建镜像解决了
  2. docker没有监听全部网卡接口,容器的8025端口不通,建议aiosmtpd 的 Controller 构造函数加入 hostname参数,当为空字符串""时,监听所有接口。我修改源码加上了才行
    image
    来源:https://aiosmtpd.aio-libs.org/en/latest/controller.html
  3. 好像兼容处理TLS邮件的情况,我用一些工具测试发送邮件,发送SSL/TLS 的邮件会报错
    https://smtpserver.com/cn/smtptest
    image
  4. 不需要加密的情况下,发送邮件仍然失败,提示:No balance,是否我漏了配置?
    image
    检测后端日志如下:
    image

使用work的http接口/api/send_mail发送仍然是一样的情况
image

<!-- gh-comment-id:2084465101 --> @oneisall8955 commented on GitHub (Apr 30, 2024): @dreamhunter2333 > 灰常感谢,开发速度飞快! 搭建了,但是不成功,有以下问题,有些我自己解决了,最主是用最新的worker.js部署上去,通过api形式调用后,返回400 No balance。 搭建 smtp_proxy_server 的问题具体如下: 1. 没有arm64 架构的docker镜像,这部分我重新构建镜像解决了 2. docker没有监听全部网卡接口,容器的8025端口不通,建议aiosmtpd 的 Controller 构造函数加入 hostname参数,当为空字符串""时,监听所有接口。我修改源码加上了才行 ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/8ea1eac9-13c1-4fac-a8f6-8c5d48add5c3) 来源:https://aiosmtpd.aio-libs.org/en/latest/controller.html 3. 好像兼容处理TLS邮件的情况,我用一些工具测试发送邮件,发送SSL/TLS 的邮件会报错 https://smtpserver.com/cn/smtptest ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/b3e96537-2d61-4134-ae22-32095f61c6cf) 4. 不需要加密的情况下,发送邮件仍然失败,提示:No balance,是否我漏了配置? ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/04d33f45-f5a2-4436-8bc8-af635f7b7496) 检测后端日志如下: ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/249d5c29-6b66-404c-a617-07ed39e800a5) 使用work的http接口/api/send_mail发送仍然是一样的情况 ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/93c72adb-56f1-4108-9b8a-61b80fcd0497)
Author
Owner

@dreamhunter2333 commented on GitHub (Apr 30, 2024):

@dreamhunter2333

灰常感谢,开发速度飞快!

搭建了,但是不成功,有以下问题,有些我自己解决了,最主是用最新的worker.js部署上去,通过api形式调用后,返回400 No balance。

搭建 smtp_proxy_server 的问题具体如下:

  1. 没有arm64 架构的docker镜像,这部分我重新构建镜像解决了

  2. docker没有监听全部网卡接口,容器的8025端口不通,建议aiosmtpd 的 Controller 构造函数加入 hostname参数,当为空字符串""时,监听所有接口。我修改源码加上了才行

image

来源:https://aiosmtpd.aio-libs.org/en/latest/controller.html

  1. 好像兼容处理TLS邮件的情况,我用一些工具测试发送邮件,发送SSL/TLS 的邮件会报错

https://smtpserver.com/cn/smtptest

image

  1. 不需要加密的情况下,发送邮件仍然失败,提示:No balance,是否我漏了配置?

image

检测后端日志如下:

image

使用work的http接口/api/send_mail发送仍然是一样的情况

image

需要在发送权限中设置发送额度

只写了第一版,还没实现 ssl, arm 镜像和 hostname 我修改下

<!-- gh-comment-id:2084474038 --> @dreamhunter2333 commented on GitHub (Apr 30, 2024): > @dreamhunter2333 > > > 灰常感谢,开发速度飞快! > > > > 搭建了,但是不成功,有以下问题,有些我自己解决了,最主是用最新的worker.js部署上去,通过api形式调用后,返回400 No balance。 > > 搭建 smtp_proxy_server 的问题具体如下: > > 1. 没有arm64 架构的docker镜像,这部分我重新构建镜像解决了 > > 2. docker没有监听全部网卡接口,容器的8025端口不通,建议aiosmtpd 的 Controller 构造函数加入 hostname参数,当为空字符串""时,监听所有接口。我修改源码加上了才行 > > ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/8ea1eac9-13c1-4fac-a8f6-8c5d48add5c3) > > 来源:https://aiosmtpd.aio-libs.org/en/latest/controller.html > > 3. 好像兼容处理TLS邮件的情况,我用一些工具测试发送邮件,发送SSL/TLS 的邮件会报错 > > https://smtpserver.com/cn/smtptest > > ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/b3e96537-2d61-4134-ae22-32095f61c6cf) > > 4. 不需要加密的情况下,发送邮件仍然失败,提示:No balance,是否我漏了配置? > > ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/04d33f45-f5a2-4436-8bc8-af635f7b7496) > > 检测后端日志如下: > > ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/249d5c29-6b66-404c-a617-07ed39e800a5) > > > > 使用work的http接口/api/send_mail发送仍然是一样的情况 > > ![image](https://github.com/dreamhunter2333/cloudflare_temp_email/assets/44989283/93c72adb-56f1-4108-9b8a-61b80fcd0497) 需要在发送权限中设置发送额度 只写了第一版,还没实现 ssl, arm 镜像和 hostname 我修改下
Author
Owner

@oneisall8955 commented on GitHub (Apr 30, 2024):

@dreamhunter2333 刚刚看了源码,看到要加额度,加完了后测试发送成功了!🎉🎉🎉

<!-- gh-comment-id:2084481062 --> @oneisall8955 commented on GitHub (Apr 30, 2024): @dreamhunter2333 刚刚看了源码,看到要加额度,加完了后测试发送成功了!🎉🎉🎉
Author
Owner

@dreamhunter2333 commented on GitHub (Apr 30, 2024):

感谢反馈,hostname 和 arm 镜像已经更新

image
<!-- gh-comment-id:2084490592 --> @dreamhunter2333 commented on GitHub (Apr 30, 2024): 感谢反馈,hostname 和 arm 镜像已经更新 <img width="761" alt="image" src="https://github.com/dreamhunter2333/cloudflare_temp_email/assets/32295532/9b857a43-691d-456f-bcfb-0897555852ac">
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#57
No description provided.