Problem with roundcube

zstpro

Verified User
Joined
Aug 2, 2017
Messages
9
Hello, i have problem with send message from roundcube, in log:

RoundCube LOG:
Code:
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> PHP Error: SMTP server does not support authentication (POST /roundcube/?_task=mail&_unlock=loading1588359790352&_framed=1&_action=send)
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> SMTP Error: Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/html/roundcubemail-1.4.4/program/lib/Roundcube/rcube.php on line 1702 (POST /roundcube/?_task=mail&_unlock=loading1588359790352&_framed=1&_action=send)

SMTP LOG:
Code:
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Connecting to localhost:587...
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 220 hostname.com ESMTP Exim 4.93.0.4 Fri, 01 May 2020 21:03:10 +0200
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Send: EHLO hostname.com
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 250-hostname.com Hello hostname.com [127.0.0.1]
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 250-SIZE 52428800
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 250-8BITMIME
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 250-PIPELINING
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 250-STARTTLS
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 250 HELP
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Send: QUIT
[01-May-2020 21:03:10 +0200]: <dqr7l1v6> Recv: 221 hostname.com closing connection
 
Did you try:
Code:
cd /usr/local/directadmin/custombuild
./build clean   
./build update
./build exim   
./build dovecot
./build roundcube
./build exim_conf     
./build dovecot_conf
 
Okay, so Roundcube uses ‘localhost’ as the SMTP server which presumably defaults to a plaintext connection and an authentication failure if you've told Exim to reject any non-TLS connection. I fixed it by editing Roundcube’s config.inc.php file to force it to make a TLS connection to the server’s hostname.

The file is at /var/www/html/roundcube/config/config.inc.php. Back it up first of course, then change the following line:
Code:
$config['smtp_server'] = 'tls://%n';

tls:// enforces STARTTLS, and the %n variable points to the hostname.

I'm not sure if there's a better way to do it, but this worked for me.
 
Last edited:
I'm not sure if there's a better way to do it, but this worked for me.
Yes there is a better way, because on a new version of roundcube, your current changes will be overwritten.

Create a directory:
Code:
/usr/local/directadmin/custombuild/custom/roundcube/
copy the customized config.inc.php in there so you have this:
Code:
/usr/local/directadmin/custombuild/custom/config.inc.php

Then it won't be overwritten anymore.
Ah.. just found the according help file:
 
Okay, so Roundcube uses ‘localhost’ as the SMTP server which presumably defaults to a plaintext connection and an authentication failure if you've told Exim to reject any non-TLS connection. I fixed it by editing Roundcube’s config.inc.php file to force it to make a TLS connection to the server’s hostname.

The file is at /var/www/html/roundcube/config/config.inc.php. Back it up first of course, then change the following line:
Code:
$config['smtp_server'] = 'tls://%n';

tls:// enforces STARTTLS, and the %n variable points to the hostname.

I'm not sure if there's a better way to do it, but this worked for me.

Richard beat me to it. Yep do what he said. Pretty much never change a standard file if it’s managed by cb. There is a template somewhere to go in a custom folder and be saved. 👍
 
Oke but that is only needed if changes are made to .htaccess if I read it correctly. If no changes are made, this is not needed.
 

Thanks @ikkeben. (y) I try to avoid using .htaccess files when there are better alternatives, but the second method in that help file was really helpful.

Rather than have separate rules for each web app as described here, I tried making everything in /var/www/html redirect to https with a single rule in httpd-includes.conf:
Code:
<Directory /var/www/html>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>

This worked for everything except Roundcube. I have no idea why it didn't work for Roundcube, but adding that additional line to the Roundcube config did the trick:
Code:
$config['force_https'] = true;
 
Back
Top