Koozali.org: home of the SME Server

Roundecube not sending email, Horde does

Offline axessit

  • ****
  • 211
  • +0/-0
Roundecube not sending email, Horde does
« on: January 05, 2023, 03:48:11 AM »
I have just upgraded me server to SME 10, and getting things working again. Did backup to USB, clean install, then recover from USB as recommended. Has issues getting Roundcube working - initially it worked OK, but I installed the letsencrypt certificates I was using (auto updating via Dehydrate) and they all worked properly on the server-manager pages. But RC stopped working. Renabled Horde and logged in OK and could send email.
Had to change the template /etc/e-smith/templates/etc/roundcubemail/config.inc.php/30IMAP and manually put in the server name and port to allow me to log in properly. (I've obviously not shown my actual server and domain name in this post)

Code: [Select]
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
       $config['default_host'] = 'ssl://myactualservername.myactualdomain.co.nz';


// TCP port used for IMAP connections
   $config['default_port'] = 993;

So tried the same for the 40SMTP section, but I'm still getting
Quote
SMTP Error (): Connection to server failed.
when I go to send, even to a local user.

Roundcube errorfile shows

Code: [Select]
[05-Jan-2023 15:38:08 +1300]: <b817003e> PHP Error: stream_socket_client(): unable to connect to ssl://myactualservername.myactualdomain:465 (Unknown error) (POST /roundcube/?_task=mail&_unlock=loading1672886295423&_framed=1&_lang=en_US&_action=send)
[05-Jan-2023 15:38:08 +1300]: <b817003e> PHP Error: Failed to connect socket: stream_socket_client(): unable to connect to ssl://myactualservername.myactualdomain:465 (Unknown error) (POST /roundcube/?_task=mail&_unlock=loading1672886295423&_framed=1&_lang=en_US&_action=send)
[05-Jan-2023 15:38:08 +1300]: <b817003e> SMTP Error: Connection failed:  (Code: -1) in /usr/share/roundcubemail/program/lib/Roundcube/rcube.php on line 1795 (POST /roundcube/?_task=mail&_unlock=loading1672886295423&_framed=1&_lang=en_US&_action=send)

However I have changed the smtp server port to 587, rebooted etc, but it still shows port 465.

Here's my /etc/roundcubemail/config.inc.php SMTP section

Code: [Select]
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
    $config['smtp_server'] = 'ssl://myactualservername.myactualdomain';


// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
    $config['smtp_port'] = 587;

Not sure where to next.


Offline Jean-Philippe Pialasse

  • *
  • 2,743
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Roundecube not sending email, Horde does
« Reply #1 on: January 05, 2023, 04:29:29 PM »
enable sqpsmtpd and imap over ssl

horde use non ssl connexion.  qpsmtpd is always enabled by default

horde uses non ssl imap connexion to auth users and to read email. in same manet imap is enabled by default but not imaps. 

to use roundcube you need
- valid ssl certificate
- imap over ssl enabled
- sqpsmtpd enabled. 

please stop editing templates and issue your certificate for your actual domain, and use it as primary domain!