eryajf / go-ldap-admin

🌉 基于Go+Vue实现的openLDAP后台管理项目
http://ldapdoc.eryajf.net
Apache License 2.0
1.53k stars 259 forks source link

🚀 发送邮件支持关闭SSL协议认证 #268

Closed SoWhatI closed 4 months ago

SoWhatI commented 10 months ago

您使用的场景? | 1. Your usage scenarios?

邮件发送失败如下,所以希望发送邮件支持关闭SSL协议认证 image

您期望的结果是怎样的? | 2. What is your expected outcome?

d.TLSConfig = &tls.Config{InsecureSkipVerify: true}

eryajf commented 10 months ago

您好 @SoWhatI👋,我已收到您的反馈,我将安排时间考虑您提交的信息并进行回复。-- 这条信息是由自动回复的机器人发出的。

Hello @SoWhatI. I have received your feedback, and I will arrange time to consider the information you submitted and reply. -- This message is sent by an automatic reply robot.

eryajf commented 10 months ago

这个问题我随后空了看一看

eryajf commented 10 months ago

我看了下源码,当你的端口改成非465的时候,就会自动关闭掉ssl,我这边没有非ssl的场景,所以你可以再试试

https://github.com/go-gomail/gomail/blob/81ebce5c23dfd25c6c67194b37d3dd3f338c98b1/smtp.go#L46

huxiangquan commented 10 months ago

certificate is not valid for any names, but wanted to match

我测试了使用25端口,还是会报这个证书不匹配错误,我这里就是自建邮箱没有证书的。

huxiangquan commented 10 months ago

certificate is not valid for any names, but wanted to match

我测试了使用25端口,还是会报这个证书不匹配错误,我这里就是自建邮箱没有证书的。 记得是要修改一个配置,不启跳过证书校验,我修改过代码测试过,跳过后它才能正常的发送非SSL或TLS的邮件。

eryajf commented 10 months ago

如果方便的话,你这边是否可以调试一下,主要我这边没有这个环境,不好调试。

用这个工具:https://github.com/eryajf/third-tools/tree/main/email

huxiangquan commented 10 months ago

如果方便的话,你这边是否可以调试一下,主要我这边没有这个环境,不好调试。

用这个工具:https://github.com/eryajf/third-tools/tree/main/email

测试了还是这个结果。 DAP server listening at: 127.0.0.1:58185 Type 'dlv help' for list of commands. x509: certificate signed by unknown authority Process 9284 has exited with status 0 Detaching dlv dap (9012) exited with code: 0

可以用docker 启动一个ewomail的项目测试一下复现呢。

Nyarime commented 4 months ago

能否使用TLS方式呢