Open eduardo-santos opened 6 years ago
Hello,
Same problem for me, using my ISP mail server (OVH). This configuration is working on my desktop and smartphone mail client (Mail) : port 587, TLS, auth with password.
On test page I've got this message
There was an unexpected problem communicating with SMTP: Start TLS failed to enable crypto
With this debug log
Set: the server
Set: the auth
Set: a message will be sent
Connecting to mail.ot-zm.com at 587
Got: 220 hr3127649084.reseller.mis.ovh.net ESMTP Postfix (Debian/GNU)
Sent: EHLO [aaa.bbb.ccc.ddd]
Got: 250-hr3127649084.reseller.mis.ovh.net
Got: 250-PIPELINING
Got: 250-SIZE 26214400
Got: 250-ETRN
Got: 250-STARTTLS
Got: 250-ENHANCEDSTATUSCODES
Got: 250-8BITMIME
Got: 250 DSN
Sent: STARTTLS
Got: 220 2.0.0 Ready to start TLS
I'm using a docker image for my dokuwiki instance : https://hub.docker.com/r/mprasil/dokuwiki/
I tried this configuration on another dokuwiki I own (but different installation) with same result.
I figured out what's happening.
I tried to connect with a DNS TLD that was not the same than the one used in the SSL certificate.
Replacing mail.xxxx.com
with hr3127649084.reseller.mis.ovh.net
worked for me.
This command helped me to debug :
openssl s_client -connect mail.server.com:587 -starttls smtp
@eduardo-santos can you tell me if the smtp server you configured in the plugin is smtp.gmail.com
or something else ? If not try to replace your entry with smtp.gmail.com
. If not, I don't have a clue of what's happening :)
@sstolz yes, it is smtp.gmail.com. Until now i can't solve the problem, so i'm using the xampp php.ini mail configuration.
I am getting the same issue, but with a pretty opaque log line in my nginx error log:
2018/12/14 17:01:57 [error] 20936#20936: *82 FastCGI sent in stderr: "PHP message: PHP Warning: stream_socket_enable_crypto(): SSL: Success in /var/www/dokuwiki/lib/plugins/smtp/subtree/txtthinking/Mailer/src/Mailer/SMTP.php on line 201" while reading response header from upstream, client: 12.34.56.78, server: wiki.mydomain.com, request: "POST /doku.php?id=start&do=admin&page=smtp HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "wiki.mydomain.com", referrer: "https://wiki.mydomain.com/doku.php?id=start&do=admin&page=smtp"
I don't understand why there's an error saying SSL: Success
. This is with a different SMTP server (SparkPost), and sending mails from the command line with swaks works as expected:
swaks -server smtp.sparkpostmail.com:587 -tls --auth-user SMTP_Injection --auth-p
assword $PASSWORD --to $EMAIL --from noreply@wiki.mydomain.com
same issue here with a mailcow server..
I have configured my smtp gmail server and i'm already using and sending e-mail through another application with exactly the same configuration i'm using on doku wiki smtp plugin. I'm using de TLS with smtp.gmail.com host, port 587, but having the 'Start TLS failed to enable crypto' error. Check the complete log:
SMTP Log Set: the server Set: the auth Set: a message will be sent Connecting to smtp.gmail.com at 587 Got: 220 smtp.gmail.com ESMTP m8-v6sm16393850qth.24 - gsmtp Sent: EHLO [XXX.XXX.XX.XXX] Got: 250-smtp.gmail.com at your service, [XXX.XXX.XXX.XXX] Got: 250-SIZE 35882577 Got: 250-8BITMIME Got: 250-STARTTLS Got: 250-ENHANCEDSTATUSCODES Got: 250-PIPELINING Got: 250-CHUNKING Got: 250 SMTPUTF8 Sent: STARTTLS Got: 220 2.0.0 Ready to start TLS
Error Message: There was an unexpected problem communicating with SMTP: Start TLS failed to enable crypto