Connection to imap server failed on Roundcube

rctest picture rctest · Jan 17, 2011 · Viewed 10.1k times · Source

I have installed Roundcube on local machine and it works fine, but with same configuration, it is not working on server. It's giving an "Connection to IMAP Server failed" error.

$rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';

Log:

> [17-Jan-2011 03:05:06 +0400]: IMAP
> Error: Login failed for
> [email protected] from xxx.xxx.xx.xx.
> Could not connect to
> imap.gmail.com:143: Connection timed
> out in
> /home/xxxxx/public_html/rc/program/include/rcube_imap.php
> on line 183 (POST
> /mail/?_task=login&_action=login)

I'm wondering - why is it trying on port 143, when port #993 is written in config.

Answer

Dinesh Arumugam picture Dinesh Arumugam · Aug 21, 2014

You have to set the configurations as follows

$rcmail_config['default_host'] = 'ssl://imap.gmail.com';
$rcmail_config['default_port'] = '993';

it should work , if not check with the below commands whether it is possible to connect to the sever through commands as shown below:

  1. ping imap.gmail.com
  2. telnet imap.gmail.com 993 [for Windows] or telnet imap.gmail.com:993 [for UNIX]

If you are able to get the successful output. you will be able to connect to the IMAP Gmail server via Roundcube.