rouncube smtp problems

Jan Kowalsky jankow at datenkollektiv.net
Wed Oct 7 01:03:06 CEST 2015


Hi,

Am 06.10.2015 um 21:14 schrieb Jan Kowalsky:
> Hi Thomas,
> 
> thanks for reply.
> 
> Am 06.10.2015 um 20:25 schrieb Thomas Spuhler:
>> On Tuesday, October 06, 2015 07:04:31 PM Jan Kowalsky wrote:
>>> Hi all,
>>>
>>> maybe someone can help me with an roundcube smtp error. Just setup a new
>>> roundcube server and configured it to use another mailserver for postfix
>>> and cyrus.
>>>
>>> Everything is fine - except submission/sendig emails:
>>>
>>> I get the rouncube error:
>>>
>>> PHP Warning:  stream_socket_client(): unable to connect to
>>> 10.0.0.123:587 (Die Wartezeit für die Verbindung ist abgelaufen) in
>>> /usr/share/php/Net/Socket.php on line 139
>>>
>>> but the server 10.0.0.123 is definitely available:
>>>
>>>  nc -vz 10.0.0.123 587
>>> mail.datenkollektiv.net [10.0.0.123] 587 (submission) open
>>>
>>> The routing table is also ok as the firewall settings are in my opinion.
>>>
>>> Another roundcube server in the same subnet can access the mailserver
>>> without problems.
>>>
>>> I already set debug level of roundcube to 5 and smtp logs to true - but
>>> I don't get further informations.
> 

After looking deeper in it with tcpdump I realized it was a time
critical thing. The server was available and responded.

So it was in fact a timeout issue - the smtp_timeout does the trick.
Default is 0

In config.inc.php:

    // SMTP Server Settings
    $config['smtp_server'] = 'tls://mail.example.org';
    $config['smtp_port'] = 587;
    $config['smtp_user'] = '%u';
    $config['smtp_pass'] = '%p';
    $config['smtp_helo_host'] = $_SERVER["HTTP_HOST"];
    $config['smtp_timeout'] = 1;   // < --- this is the relevant line

Does anybody know more about this? In defaults.inc.php is written:

// SMTP connection timeout, in seconds. Default: 0 (use
default_socket_timeout)
// Note: There's a known issue where using ssl connection with
// timeout > 0 causes connection errors
(https://bugs.php.net/bug.php?id=54511)
$config['smtp_timeout'] = 0;

Hm, at least it works.

Jan


More information about the users mailing list