Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: leake2019 on May 06, 2019, 11:43:59 AM

Title: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: leake2019 on May 06, 2019, 11:43:59 AM
Following a PHP upgrade to 7.2 it broke my Roundcube software. I ascertained that Roundcube 1.3.9. was PHP7.2 compatible and so went ahead and upgraded it. Since the upgrade I, along with what appears to many others, are having problems establishing an SMTP connection for outgoing mails (incoming mails are fine). The error I am receiving is a rather meaningless "SMTP Error (-1): Connection to server failed". Following suggestions by Googling the problem I have tried all combinations of ports and ssl/tls configurations but without success. It is worth pointing out that I am able to access my email through an Outlook 2017 client. My email server is a postfix/dovecot combination. I would be greatful to hear from anyone who has experienced my problem and managed to find a solution. 
Title: Re: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: JohnDoh on May 07, 2019, 01:38:15 PM
It could be an SMTP certificate verification problem. May be try using $config['smtp_conn_options'] to disable cert verification and see what happens.

What version of PHP were you running before 7.2? Certificate verification was enabled by default in version 5.6.
Title: Re: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: leake2019 on May 07, 2019, 05:49:21 PM
Thanks for your reply. Previously I was running under php5.6. Please could you supply me with full 'smtp_conn_options' syntax to disable verification of the cert.
Title: Re: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: JohnDoh on May 09, 2019, 10:41:04 AM
try something like
Code: [Select]
$config['smtp_conn_options'] = array(
  'ssl' => array(
    'verify_peer_name' => false,
    'verify_peer'      => false,
  ),
);
Title: Re: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: leake2019 on May 10, 2019, 11:01:17 AM
Unfortunatley it still gives me the same "SMTP Error (-1)" error.

The following was logged in the maillog :
postfix/smtpd[9873]: connect from localhost[127.0.0.1]
postfix/smtpd[9873]: lost connection after UNKNOWN from localhost[127.0.0.1]
postfix/smtpd[9873]: disconnect from localhost[127.0.0.1]

Does RC have its own smtpd log which may shed some light on the problem?
Title: Re: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: leake2019 on May 10, 2019, 11:50:43 AM
I have subsequently run a test through the installer.

The following messages appeared in the RC error file in the logs directory:

 [10-May-2019 15:39:02 UTC] PHP Deprecated:  idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /var/www/html/roundcubemail/installer/test.php on line 291
[10-May-2019 15:39:02 UTC] PHP Deprecated:  idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /var/www/html/roundcubemail/installer/test.php on line 292
[10-May-2019 15:39:02 UTC] PHP Warning:  stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /var/www/html/roundcubemail/vendor/pear/net_socket/Net/Socket.php on line 159
[10-May-2019 15:39:02 UTC] PHP Warning:  stream_socket_client(): Failed to enable crypto in /var/www/html/roundcubemail/vendor/pear/net_socket/Net/Socket.php on line 159
[10-May-2019 15:39:02 UTC] PHP Warning:  stream_socket_client(): unable to connect to ssl://xxxx-test.org.uk:25 (Unknown error) in /var/www/html/roundcubemail/vendor/pear/net_socket/Net/Socket.php on line 159
[10-May-2019 15:39:02 UTC] ERROR: stream_socket_client(): unable to connect to ssl://xxxx-test.org.uk:25 (Unknown error) (0)
[10-May-2019 15:39:02 UTC] ERROR: Failed to connect socket: stream_socket_client(): unable to connect to ssl://xxxx-test.org.uk:25 (Unknown error) ()
Title: Re: Unable to establish SMTP connection since migrating to version 1.3.9
Post by: alec on May 10, 2019, 03:38:48 PM
You can't use ssl on port 25.