-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
SMTP mail with starttls not working if mail server is not supporting TLS1 #7421
Comments
Perhaps a good idea to let them know? |
The fix has to work, I use this code of line in other projects and it is the supposed solution in https://secure.php.net/manual/en/function.stream-socket-enable-crypto.php#119122 . The fix uses a concatenation of tls1.0 tls1.1 and tls1.2. In background openssl do the work and normally uses the highest available tls version.
Maybe there is some missconfig by alexw65500... The easiest way to check is using |
The upstream code is of course fine, I just applied it wrong: I just commented out the original line and pasted the updated line from swiftmailer/swiftmailer@da58965 But upstream is using |
Ah, nextcloud is using swiftmailer |
@rullzer haven't you looked into updating swift mailer? swiftmailer/swiftmailer#935 looks quite good and says, that this only affects PHP 7.0 and 7.1. |
Yes I was looking into it. But it requires quite a bit of changes into the server. And frankly I did not have time yet |
Any update on this? Since my mail server does not offer TLS1 anymore (enforcing TLS1.2 now), my Nextcloud instance is unable to send mails anymore. |
Maybe this issue is fixed by upgrading to swiftmailer 6. As a workaround I've setup an old version of postfix to relay the mails using TLS1.2 to my mail server. |
Just a few minutes ago I tested if this issue disappeared with Nextcloud 14. I'm proud to confirm that I do not have the tls issue anymore. Sending emails to a mailserver, that enforces TLS 1.2, is working now |
Are you sure it's working with Nextcloud 14 and TLS >= 1.1? I still have to manually patch StreamBuffer.php:
And yes, I'm using STREAM_CRYPTO_METHOD_SSLv23_CLIENT since it's (despite its name) the TLS1.x default:
|
Fix applied in swiftmailer 6.1.x: But nexcloud uses 6.0.2
|
Nextcloud 16 ships Swiftmailer 6.1.3 🎉 |
Steps to reproduce
Expected behaviour
Mail can be sent with TLS1.2
Actual behaviour
Mail is not send / mail test fails if mail server is not offering TLS1.
Description
This is a known Swiftmail issue, see e.g. swiftmailer/swiftmailer#598
There is also a proposed fix, but that one is NOT working for me: swiftmailer/swiftmailer#935
Replacing "STREAM_CRYPTO_METHOD_TLS_CLIENT" with "STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT" in "3rdparty/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php" allows sending mails again, but of course now hard codes TLS1.2.
The text was updated successfully, but these errors were encountered: