Error connecting to IMAP server: <server_name>.
0:
described in https://squirrelmail.org/wiki/MailServerIMAPProblem
Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in .../read/src/configtest.php on line 703
Call Stack
1 0.0016 577704 {main}( ) .../configtest.php:0
2 0.0377 1097560 stream_socket_enable_crypto ( ???, ???, ??? ) .../configtest.php:703
FATAL ERROR: Failed to enable encryption on SMTP STARTTLS connection.
please add a description message to error in this case that this is caused by "certificate verify failed " and in problem links an possible case tahat cert could be expired :) this way we do not need to dig for source of the error
This also happens, when using tls on localhost, where the hostname does not match, of course; Solution to use You have to use stream_socket_client with context - See https://stackoverflow.com/questions/41934329/how-to-make-fsockopen-to-ignore-certificates-when-using-tls
Thanks for your report and suggestions. As you've found, reading your error logs gives you the error which you can follow up on by doing a web search if you're not familiar with it. This is not a bug in SquirrelMail (you just have to make sure you've added $imap_stream_options to config_local.php - see source code for config_local.example.php in SquirrelMail version 1.5.2 for more details if you need assistance), so I'm closing this.