Hello,
I am installing Roundcube with roundcubemail-1.2.1-complete.tar.gz.
But Test SMTP config on Roundcube Webmail Installer says like this:
QuoteTrying to send email...
SMTP send: NOT OK(Connection failed: Failed to connect socket: fsockopen(): unable to connect to ssl://mail.mydomain.com:465 (Unknown error))
And also Test IMAP config says like this:
QuoteConnecting to ssl://mail.mydomain.com...
IMAP connect: NOT OK(Login failed for user from fedc:ba98:7654:1:3:2:1:0. Could not connect to ssl://mail.mydomain.com:993: Unknown reason)
I can send and receive mails by Windows Live Mail and K-9 Mail for Android.
Actually mail server and web server is the same server. Looks like connection from the same server is unavailable although connection from outside is available.However I can connect to my mail server from web server by telnet as follows.
Quoteroot@myhost:~# telnet mail.mydomain.com 993
Trying 1234:5678:9abc:def::1234:5678...
Connected to myhost.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
root@myhost:~# telnet mail.mydomain.com 465
Trying 1234:5678:9abc:def::1234:5678...
Connected to myhost.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
root@myhost:~#
I tried "iptables -F" but the result was the same.
QuoteOS: Ubuntu 16.04 / Linux 2.6.32 64bit
Web server: Apache/2.4.18
Mail server: Dovecot 2.2.22, Postfix 3.1.0
IMAP hostname/port: mail.mydomain.com 993 (SSL)
SMTP hostname/port: mail.mydomain.com 465 (SSL)
Anyone can help me?
Thank you.
Yusui Tomikawa
Since its on the same server try localhost instead of mail.mydomain.com.
Thank you for the reply.
I tried it but localhost has the same result as follows.
Test SMTP config says:
QuoteTrying to send email...
SMTP send: NOT OK(Connection failed: Failed to connect socket: fsockopen(): unable to connect to ssl://localhost:465 (Unknown error))
Test IMAP config says:
QuoteConnecting to ssl://localhost...
IMAP connect: NOT OK(Login failed for user from fedc:ba98:7654:1:3:2:1:0. Could not connect to ssl://localhost:993: Unknown reason)
Here is additional information I forgot to say.
PHP version: 7.0.8
mysql version: 14.14 Distrib 5.7.13
/var/log/syslog says like this:
SMTP:
Sep 15 14:48:34 host postfix/smtps/smtpd[506]: connect from localhost[::1]
Sep 15 14:48:34 host postfix/smtps/smtpd[506]: SSL_accept error from localhost[::1]: 0
Sep 15 14:48:34 host postfix/smtps/smtpd[506]: warning: TLS library problem: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1472:SSL alert number 48:
Sep 15 14:48:34 host postfix/smtps/smtpd[506]: lost connection after CONNECT from localhost[::1]
Sep 15 14:48:34 host postfix/smtps/smtpd[506]: disconnect from localhost[::1] commands=0/0
IMAP:
Sep 15 14:50:09 host dovecot: imap-login: Error: SSL: Stacked error: error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca: SSL alert number 48
Sep 15 14:50:09 host dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, TLS handshaking: SSL_accept() failed: Unknown error, session=<mM1Y9ow8rtwAAAAAAAAAAAAAAAAAAAAB>
logs/errors says:
SMTP:
[15-Sep-2016 14:58:31 UTC] ERROR: fsockopen(): unable to connect to ssl://localhost:465 (Unknown error) (0)
[15-Sep-2016 14:58:31 UTC] ERROR: Failed to connect socket: fsockopen(): unable to connect to ssl://localhost:465 (Unknown error) ()
IMAP:
nothing
I get no idea why it can't connect....
So that defiantly looks like an SSL error, you may want to try setting the following settings.
// IMAP socket context options
// See http://php.net/manual/en/context.ssl.php
// The example below enables server certificate validation
//$config['imap_conn_options'] = array(
// 'ssl' => array(
// 'verify_peer' => true,
// 'verify_depth' => 3,
// 'cafile' => '/etc/openssl/certs/ca.crt',
// ),
// );
$config['imap_conn_options'] = null;
// SMTP socket context options
// See http://php.net/manual/en/context.ssl.php
// The example below enables server certificate validation, and
// requires 'smtp_timeout' to be non zero.
// $config['smtp_conn_options'] = array(
// 'ssl' => array(
// 'verify_peer' => true,
// 'verify_depth' => 3,
// 'cafile' => '/etc/openssl/certs/ca.crt',
// ),
// );
$config['smtp_conn_options'] = null;