-
Notifications
You must be signed in to change notification settings - Fork 969
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
Investigate why smtps fails but smtp does not #781
Comments
I can verify that
My demo system is reverse proxied behind a Nginx, if that make any difference. I also verified with swaks that I can actually use smtps with StartTLS against Sparkpost
|
I'm getting no errors, but no email at all:
With that environment variable after completing the self-service registration flow I get this log:
But no errors at all, and nothing. I'm using MailHog instead of MailSlurper, and I tested it with
|
There's also no logs on the MailHog, whereas usually there would be logs if I access it from another system. Also if I configure it from the |
Hello there, I believe that the tag "legacy_ssl" is a bit misleading and refers more to postfix description (and support in kratos could be potentially dropped). The current trend in CyberSecurity is to avoid STARTTLS when possible and use "Implicit TLS", meaning that the case of SMTP dealing between two domains that are potentially not supporting encryption should be the only one that uses STARTTLS. In my opinion it would be best to use protocol scheme:
All of that is described in the RFC at https://datatracker.ietf.org/doc/html/rfc8314 Best regards |
Just as example OVH Cloud, Orange and GMail all use 465 with implicit TLS and do not allow STARTTLS. |
Thank you for the ideas! Adding legacy to the query param might indeed be misleading - I added it as having this set to true was breaking lots of clients trying to connect to AWS, GCP, ... I find having smtp:// misleading if we use an encrypted connection. Not sure if that is described in the RFC (couldn't find anything). It probably makes more sense to have explicit naming around force_start_tls. At the same time, the current set up works fine and is documented and breaking the behavior is worse than having a not so nice name! I would be open however to accept a PR which doesn't break the query param but adds it as a deprecated option (with log output) and that makes it obvious what SSL/TLS methodology is used. |
The way SMTP is handled by the RFCs history is quite misleading. For the protocols IMAP and POP for example we have: "At the same time, the current set up works fine and is documented and breaking the behavior is worse than having a not so nice name!" => We have full TLS smtp in our production, and when we upgraded from 0.6 to 0.7 it broke.... XD. The ideal situation to me and, I made a mistake in my previous post, is to enforce starttls by default on smtp and allow with an option to disable it and use another scheme for smtp with tls as protocols are different (same as http and https). But please note that using cleartext with smtps is also quite misleading and might be skipped during a security review of the configuration. I worked for three years as a Pentester and a Security consultant and having something that is simple to understand without the documentation is the way to go as administrators do not read the doc so often. So it is best to enforce, like Kratos is doing now, security by default and have naming that is corresponding to conventions or it becomes a mess: first in the mind of the people and then in the security implementation (i.e. configuration). Happy to discuss, Regards, |
To be more concise i would suggest:
with skip_starttls and skip_ssl_verify at false by default for security. Or if you want to enforce encryption at all costs and have sth more explicit:
|
That looks like a good proposal in my opinion! Would you be open to contribute this with:
? :) |
I believe we have a deal :) |
Nice :) |
Hello, also note if you are not seeing any output that SMTP has sent the message make sure you have started the courier via |
Describe the bug
https://community.ory.sh/t/unable-to-send-email-using-smtp-connection/2252/12
The text was updated successfully, but these errors were encountered: