You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can recreate the issue with all plugins disabled
Describe the issue
I'm using 1.5.9 LTS and have found that TLS configuration is taken from $config['smtp_server'], and that $config['smtp_host'] is not a valid configuration option.
In my case I ran tcpdump and saw that connections were defaulting to localhost rather than the host I specified in $config['smtp_host'], and weren't using STARTTLS because of it, which makes sense if you look at the code.
Here program/lib/Roundcube/rcube_smtp.php:91
$smtp_host = rcube_utils::parse_host($CONFIG['smtp_server']);
// when called from Installer it's possible to have empty $smtp_host here
if (!$smtp_host) $smtp_host = 'localhost';
You see that $smtp_host is a local variable set by rcube_utils::parse_host on $config['smtp_server']
And here program/lib/Roundcube/rcube_smtp.php:108
// remove TLS prefix and set flag for use in Net_SMTP::auth()
$use_tls = false;
if (preg_match('#^tls://#i', $smtp_host)) {
$smtp_host = preg_replace('#^tls://#i', '', $smtp_host);
$use_tls = true;
}
So my $config['smtp_host'] config entry was just ignored and instead defaulted to localhost, which was actually a valid host listening on port 587, which led to things partially working, except that STARTTLS wasn't working.
I simply fixed my problem by using the $config['smtp_server'] configuration option instead. Even though this doesn't exist in the example configurations.
The example configurations and defaults still point to $config['smtp_host'], which does not appear to be correct. config/config.inc.php.sample config/defaults.inc.php
...
$config['smtp_host'] = 'localhost:587';
...
I believe the documentation needs updating, and this might help a few other people with similar issues I've seen.
What browser(s) are you seeing the problem on?
Chrome
What version of PHP are you using?
8.3
What version of Roundcube are you using?
1.5.9
JavaScript errors
No response
PHP errors
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Describe the issue
I'm using 1.5.9 LTS and have found that TLS configuration is taken from $config['smtp_server'], and that $config['smtp_host'] is not a valid configuration option.
In my case I ran tcpdump and saw that connections were defaulting to localhost rather than the host I specified in $config['smtp_host'], and weren't using STARTTLS because of it, which makes sense if you look at the code.
Here program/lib/Roundcube/rcube_smtp.php:91
You see that $smtp_host is a local variable set by rcube_utils::parse_host on $config['smtp_server']
And here program/lib/Roundcube/rcube_smtp.php:108
So my $config['smtp_host'] config entry was just ignored and instead defaulted to localhost, which was actually a valid host listening on port 587, which led to things partially working, except that STARTTLS wasn't working.
I simply fixed my problem by using the $config['smtp_server'] configuration option instead. Even though this doesn't exist in the example configurations.
The example configurations and defaults still point to $config['smtp_host'], which does not appear to be correct.
config/config.inc.php.sample
config/defaults.inc.php
I believe the documentation needs updating, and this might help a few other people with similar issues I've seen.
What browser(s) are you seeing the problem on?
Chrome
What version of PHP are you using?
8.3
What version of Roundcube are you using?
1.5.9
JavaScript errors
No response
PHP errors
No response
The text was updated successfully, but these errors were encountered: