splitbrain / dokuwiki-plugin-smtp

Send DokuWiki mails via a configured SMTP server
https://www.dokuwiki.org/plugin:smtp
12 stars 14 forks source link

Start TLS failed to enable crypto after update to 2019-03-21 #31

Open paweljasinski opened 5 years ago

paweljasinski commented 5 years ago

It used to work. After an update, I started to get this error. The change which appears to cause the problem:

<         if(!stream_socket_enable_crypto($this->smtp, true, STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT)) {
---
>         if(!stream_socket_enable_crypto($this->smtp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {

I can only speculate, that STREAM_CRYPTO_METHOD_TLS_CLIENT is TLS 1.0 only. Please, check the first comment: https://www.php.net/manual/en/function.stream-socket-enable-crypto.php

And details of communication:

There was an unexpected problem communicating with SMTP: Start TLS failed to enable crypto
SMTP log:

Set: the server
Set: the auth
Set: a message will be sent
Connecting to mail.eamod.ch at 587
Got: 220 mail.eamod.ch ESMTP Postfix (Debian)
Sent: EHLO [172.20.0.12]
Got: 250-mail.eamod.ch
Got: 250-PIPELINING
Got: 250-SIZE 10240000
Got: 250-ETRN
Got: 250-STARTTLS
Got: 250-ENHANCEDSTATUSCODES
Got: 250-8BITMIME
Got: 250-DSN
Got: 250 SMTPUTF8
Sent: STARTTLS
Got: 220 2.0.0 Ready to start TLS
cybermcm commented 5 years ago

2nd for that, my postfix reports

postfix/submission/smtpd[8031]: SSL_accept error from unknown: -1
postfix/submission/smtpd[8031]: warning: TLS library problem: error:1417D102:SSL routines:tls_process_client_hello:unsupported protocol:../ssl/statem/statem_srvr.c:989:

other SMTP traffic works without problems...