• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Roundcube 1.5.2 SMTP(-1) Error

DailyPleskEnjoyer

New Pleskian
Server operating system version
Ubuntu 20.04.4 LTS
Plesk version and microupdate number
Obsidian 18.0.44.0
Hello friends!

since Plesk itself hasn't implemented the new RoundCube versions yet, many of us (including me) are manually upgrading from 1.4.13 to 1.5.x (1.5.2 in my case).

On RoundCube v1.4.13 I can normally send and receive mails - no problem

However, after manually upgrading to RoundCube v1.5.2, I get the following error when sending mails (I can still receive them with no errors tho)
Code:
SMTP Error (-1): Connection to server failed

Any ideas? Kind regards!
 
It could be missing a certificate:


or the wrong smtp_port in roundcubemail/config/defaults.inc.php:


There's lots of info available online. Google "Roundcube SMTP Error Connection to server failed" and I'm sure you will find a solution.
 
It could be missing a certificate:


or the wrong smtp_port in roundcubemail/config/defaults.inc.php:


There's lots of info available online. Google "Roundcube SMTP Error Connection to server failed" and I'm sure you will find a solution.

I've already tried that, it seems like the certificate is fine.
stmp_server is localhost and the port is 587.
 
UPDATE:
After a auto-update from Plesk itself (which reset the Roundcube version back to 1.4.13) and my manual update back to Roundcube version 1.5.2 I get the same error! I haven't changed the config.inc.php which fixed the problem last time.

My thought is that after my manual update or Plesk's update, that the databse password changed.
DB password can be found in config.inc.php:
Code:
$config['db_dsnw'] = 'mysql://roundcube:YOUR_PASSWORD_HERE@localhost/roundcubemail';

Any ideas on how I can see the current password? If it matches the password in the file, then I can exclude this error.
 
The rondbcube password is stored in the config file: /usr/share/psa-roundcube/config/config.inc.php

You can test it as follows:
Code:
# mysql -uroundcube -p
<enter the password from config.inc.php>

MariaDB> show databases; 
+--------------------+
| Database           |
+--------------------+
| information_schema |
| roundcubemail      |
+--------------------+

Also, have a look at this instruction:

 
The rondbcube password is stored in the config file: /usr/share/psa-roundcube/config/config.inc.php

You can test it as follows:
Code:
# mysql -uroundcube -p
<enter the password from config.inc.php>

MariaDB> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| roundcubemail      |
+--------------------+

Also, have a look at this instruction:


I've now upgraded to 1.6.0.
I've also took a look at both default.inc.php files for v1.4.13 and v1.6.0 (since everythink worked fine for me in 1.4.13).
The only difference I could see for sending mail is that the smtp port is now included in "smtp_host".

These were my previous settings that worked (for v1.4.13 and v1.5.2):
Code:
$config['smtp_server'] = 'ssl://localhost';
$config['smtp_port'] = 465;
$config['smtp_auth_type'] = 'PLAIN';

Im guessing that these settings should look like this in v1.6.0:
Code:
$config['smtp_host'] = 'ssl://localhost:465';
$config['smtp_auth_type'] = 'PLAIN';

It still doesn't work sadly. I've tried everything ('ssl://localhost:465', 'localhost:465', 'tls://localhost:587', 'localhost:587' and so on..) but I can't get it to work. :/
 
change/adjust your config.inc.php to:

Code:
$config['smtp_host'] = 'localhost:25';
$config['smtp_auth_type'] = 'PLAIN';

You most likely have some problem with the SSL certificate/configuration on your SMTP service, thus Roundcube refuses to connect via SSL (port 465) or StartTLS (port 587)
 
change/adjust your config.inc.php to:

Code:
$config['smtp_host'] = 'localhost:25';
$config['smtp_auth_type'] = 'PLAIN';

You most likely have some problem with the SSL certificate/configuration on your SMTP service, thus Roundcube refuses to connect via SSL (port 465) or StartTLS (port 587)
Thanks, that worked! But why does SSL not work anymore, I haven't changed anything on the certificate. Do you know a fix for that since I would like to use SSL/465 for my SMTP.
 
Back
Top