Author Topic: Could not connect to localhost:143: Unknown reason  (Read 4080 times)

Offline mars123

  • Newbie
  • *
  • Posts: 1
Could not connect to localhost:143: Unknown reason
« on: June 27, 2017, 04:00:58 AM »
Hi, after installing and setup roundcube, it can send email from installer page -> "Test SMTP config".

But I got this strange error on the installer page -> "Test IMAP config":

IMAP connect:  NOT OK(Login failed for my-account-name from 192.168.123.188. Could not connect to localhost:143: Unknown reason)

Then I try to login from roundcube login page, it shows "Connection to storage server failed.", while the roundcube errors log has below error:

Quote
IMAP Error: Login failed for myaccountname from 192.168.123.188. Could not connect to localhost:143: Unknown reason in /usr/local/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /roundcube/?_task=login&_action=login)

However, use telnet to connect "localhost 143" from the same machine seems ok:

Quote
root@pc1:~ # telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

and I can also use telnet to connect the 143 port from another machine too. (and I can also successfully login and list the directories)

My roundcube config.inc.php:
--------------------------------------
Code: [Select]
$config['enable_installer'] = true;
$config['mime_types'] = '/usr/local/www/roundcube/config/mime.types';
$config['imap_vendor'] = 'dovecot';
$config['db_dsnw'] = 'mysql://roundcube:aa123aa@localhost/roundcube';
$config['default_host'] = 'localhost';
$config['support_url'] = '';
$config['des_key'] = 'somekeyhere';

I have checked the MariaDB database, it seems ok because it has some roundcube records in sessions table, it records all the login sessions I have tried before.

I have ever tried to set $config['password_charset'] = 'UTF-8' but the same problems still exists.

what is the problems? how can I fix it?

Roundcube 1.2.5
Dovecot 2.2.29
Postfix 3.1.4
MariaDB 10.1
PHP 7.1.5 (with imap)
Nginx 1.10
Freebsd 10.3

any suggestions is welcome, many thanks.

Offline maico

  • Newbie
  • *
  • Posts: 1
Re: Could not connect to localhost:143: Unknown reason
« Reply #1 on: September 25, 2018, 08:52:42 AM »
Estou com o mesmo problema.