-
Notifications
You must be signed in to change notification settings - Fork 18k
Fails to connect to SMTP with STARTTLS protocol #13694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We will need a standalone program to reproduce the
bug. As I'm not a gogs user, the referenced bug doesn't
provide enough useful information about the potential
issue in net/smtp.
|
Ok, I will make a standalone program. |
This example:
Fails with STARTTLS on the SMTP account that works fine in thunderbird:
Same program works fine on the account expecting simple TLS. |
@yurivict, what is the domain? We don't need a username and password. Also, why is your example so long if it fails at STARTTLS? You can delete 80% of your code and still show the problem. |
I copy-pasted the whole example that would have worked had it not been for the problem. Domain is domain=doctorlan |
Well, if it's not a public host, we can't diagnose. The problem is almost certainly a bad certificate on the server or an incompatible set of ciphersuites supported on the server. You don't mention which version of Go. Please try Go 1.6 beta 1 which adds more TLS support. |
go-1.5.1 |
It also fails for the same host with TLS protocol on different port: mail.doctorlan.com:465. There is the testssl.sh https://testssl.sh/ script testing SSL/TLS connections. It doesn't find anything weird. The set of ciphers it finds is:
So I don't understand what's wrong with Go here. |
I can reproduce the problem with Go 1.5, but Go 1.6
has no trouble with the program and domain (except
for one small bugfix: it should call client.Hello before
calling Extension and StartTLS.
|
This is about https://golang.org/src/net/smtp/smtp.go
Originally this issue is spotted in gogs, which uses the library: gogs/gogs#2244 (comment) (detailed description of the symptoms there).
The text was updated successfully, but these errors were encountered: