1 (edited by mikekgr 2023-05-30 05:42:57)

Topic: *SOLVED* After upgrading roundcube 1.5.2 => 1.6.1 can't send emails

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.3
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu Server 20.04.6 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
In the alert box of roundcube I get: Connection Error (Failed to reach the server)!
====
Yesterday, I fully upgraded my server iRedMail to version 1.6.3 that is including upgrade to roundcube too from my version that was 1.5.2 to latest 1.6.1
After the above, I implemented all changes as shown in https://docs.iredmail.org/upgrade.iredm … .6.3.html:
1) /opt/www/roundcubemail/config/config.inc.php
// IMAP
///$config['default_host'] = '127.0.0.1';
///$config['default_port'] = 143;
$config['imap_host'] = 'tls://127.0.0.1:143';

// SMTP
///$config['smtp_server'] = 'tls://127.0.0.1';
///$config['smtp_port'] = 587;
$config['smtp_host'] = 'tls://127.0.0.1:587';

$config['auto_create_user'] = true;

2) /opt/www/roundcubemail/plugins/managesieve/config.inc.php
///$config['managesieve_port'] = 4190;
$config['managesieve_host'] = 'tls://127.0.0.1:4190';

After the above, I saw roundcube loaded correctly in my browser I can receive emqails and all seems OK til the moment that I tried to send an email. Then I got in the popup windows the error: Connection Error (Failed to reach the server)!

Looking at /var/log/mail.log at the moment of the error I saw:
May 27 21:38:04 mx postfix/submission/smtpd[2526341]: connect from localhost[127.0.0.1]
May 27 21:38:04 mx roundcube: PHP Fatal error:  Uncaught Error: Call to undefined method Net_SMTP::starttls() in /opt/www/roundcubemail/program/lib/Roundcube/rcube_smtp.php:164
May 27 21:38:04 mx roundcube: Stack trace:
May 27 21:38:04 mx roundcube: #0 /opt/www/roundcubemail/program/lib/Roundcube/rcube.php(284): rcube_smtp->connect()
May 27 21:38:04 mx roundcube: #1 /opt/www/roundcubemail/program/lib/Roundcube/rcube.php(1783): rcube->smtp_init()
May 27 21:38:04 mx roundcube: #2 /opt/www/roundcubemail/program/include/rcmail_sendmail.php(436): rcube->deliver_message()
May 27 21:38:04 mx roundcube: #3 /opt/www/roundcubemail/program/actions/mail/send.php(245): rcmail_sendmail->deliver_message()
May 27 21:38:04 mx roundcube: #4 /opt/www/roundcubemail/program/include/rcmail.php(282): rcmail_action_mail_send->run()
May 27 21:38:04 mx roundcube: #5 /opt/www/roundcubemail-/index.php(278): rcmail->action_handler()
May 27 21:38:04 mx roundcube: #6 {main}
May 27 21:38:04 mx roundcube:   thrown in /opt/www/roundcubemail/program/lib/Roundcube/rcube_smtp.php on line 164

What is wrong?

I just revert back my 1.5.2 roundcube backup directory and I found it to work without problem so the problem is related to 1.6.1

Please help me what to check or what to correct ?

Thanks and Best Regards,
Mike Kranidis

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: *SOLVED* After upgrading roundcube 1.5.2 => 1.6.1 can't send emails

Did you remove /opt/www/roundcubemail/composer.json before upgrading?

3 (edited by mikekgr 2023-05-29 14:23:11)

Re: *SOLVED* After upgrading roundcube 1.5.2 => 1.6.1 can't send emails

ZhangHuangbin wrote:

Did you remove /opt/www/roundcubemail/composer.json before upgrading?

yes actually I copy the one that is coming with 1.6.1 before upgrading as the guide says

4

Re: *SOLVED* After upgrading roundcube 1.5.2 => 1.6.1 can't send emails

I'm confused...

You should remove /opt/www/roundcubemail/composer.json before upgrading, so that Roundcube upgrade script "./bin/installto.sh" will upgrade/copy dependent packages.

5

Re: *SOLVED* After upgrading roundcube 1.5.2 => 1.6.1 can't send emails

ZhangHuangbin wrote:

I'm confused...

You should remove /opt/www/roundcubemail/composer.json before upgrading, so that Roundcube upgrade script "./bin/installto.sh" will upgrade/copy dependent packages.

Ok I will upgrade again. As far as I remember, your instructions said to upgrade this file not to delete.

When I have result I will post here.

Thanks

6

Re: *SOLVED* After upgrading roundcube 1.5.2 => 1.6.1 can't send emails

ZhangHuangbin wrote:

I'm confused...

You should remove /opt/www/roundcubemail/composer.json before upgrading, so that Roundcube upgrade script "./bin/installto.sh" will upgrade/copy dependent packages.

Dear Mr. Huangbin, after your last correction (to remove /opt/www/roundcubemail/composer.json before upgrading), all went fine!!!

Thanks and Best Regards,
Mike Kranidis