ZZROTDesign / alpine-ghost

Ghost Container running in Alpine Linux
MIT License
14 stars 13 forks source link

Error connecting smtp with STARTTLS #19

Open thiagoalmeidasa opened 7 years ago

thiagoalmeidasa commented 7 years ago

I'm getting

ERROR: Error: 140500104592424:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:794

when try to connect my smtp server using STARTTLS.

I solved my problem following this instructions https://github.com/nodemailer/nodemailer/issues/358#issuecomment-67009829

We need to add the requireTLS option from nodeMailer in this image. I can use the PR #9 as a model and write my own PR, but I would like to receive your comments before I begin to write.

killianbrackey commented 7 years ago

Do the changes in the above PR cover some of the fixes you mentioned here and in #18 @thiagoalmeidasa ?

thiagoalmeidasa commented 7 years ago

Yes, it worked. Thanks 😄

killianbrackey commented 7 years ago

Awesome! I will close the issues after this get merged in. Let me know if anything else comes up!

thiagoalmeidasa commented 7 years ago

So, I did a research in nodemailer examples and found this: https://github.com/nodemailer/nodemailer/blob/5be7c902e953043be3618d747c349f02405f003b/lib/well-known/services.json#L88

Works by adding the TLS ciphers like in the example.

secureConnection: false,
 tls: {
  ciphers: 'SSLv3'
  },

I don't know which solution is better in this case, but with both instructions, the SMTP with STARTTLS works fine. Let me know what do you think.