Author Topic: Unable to login to gmail  (Read 5166 times)

Offline sweinst

  • Newbie
  • *
  • Posts: 3
Unable to login to gmail
« on: May 15, 2011, 05:53:35 AM »
Hi,

I'm trying to use roundcube for connecting to gmail. I can't connect to gmail IMAP interface. I get the error:
Quote

[14-May-2011 17:47:58 +0000]: IMAP Error: Login failed for serge.weinstock@gmail.com from 192.168.0.236. Could not connect to ssl://imap.gmail.com:993: Connection timed out in /srv/www/htdocs/mail/program/include/rcube_imap.php on line 192 (POST /mail/?_task=login&_action=login).


My configuration is:
Quote

$rcmail_config['default_host'] = 'ssl://imap.gmail.com';
$rcmail_config['default_port'] = 993;
$rcmail_config['imap_auth_type'] = 'LOGIN';
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['imap_force_lsub'] = false;
$rcmail_config['imap_timeout'] = 0;
$rcmail_config['imap_auth_cid'] = null;
$rcmail_config['imap_auth_pw'] = null;


  • I'm using 0.5.2 on OpenSuse 11.4
  • I've checked that I can connect to imap.gmail.com on port 443
  • it has worked for some time. Several PHP modules have been updated since. Maybe, there are some incompatibilities with recent versions of some PHP modules?
  • The connection seems to fail immediately.


Any idea on what's going on or on what I should investigate or try?

Thanks,
Serge

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Unable to login to gmail
« Reply #1 on: May 15, 2011, 11:34:32 AM »
Did you check to see if you can connect to imap.gmail.com port 993?

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Unable to login to gmail
« Reply #2 on: May 15, 2011, 03:30:14 PM »
Try this:

Code: [Select]
$rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline sweinst

  • Newbie
  • *
  • Posts: 3
Unable to login to gmail
« Reply #3 on: May 15, 2011, 03:49:22 PM »
Yes,
  • I've tested my connection to gmail and it works fine
  • I have tried ssl://imap.gmail.com:993 and it gave me the same result


As I was saying in my original post, I have my configuration working for some time so I guess that the configuration is OK. My guess is that an update to some PHP module have broken something. The problem is that I'm completely ignorant about PHP.

Which PHP modules are used for the connection (socket, ssl, ...)? I don't think it's an IMAP problem but the problem occurs with the connection to the server itself.

Is there a way to have more debug output for the connection to the server?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Unable to login to gmail
« Reply #4 on: May 15, 2011, 10:51:27 PM »
The reason I asked if you could connect to imap.gmail.com port 993 was because you only said that you tested port 443 which isn't used. You could check the error log and see if it has any details on why its failing.

Offline sweinst

  • Newbie
  • *
  • Posts: 3
Unable to login to gmail
« Reply #5 on: May 16, 2011, 12:59:20 AM »
The only error I get in the error log is the one I've already shown in my original post:
Quote

[14-May-2011 17:47:58 +0000]: IMAP Error: Login failed for serge.weinstock@gmail.com from 192.168.0.236. Could not connect to ssl://imap.gmail.com:993: Connection timed out in /srv/www/htdocs/mail/program/include/rcube_imap.php on line 192 (POST /mail/?_task=login&_action=login).

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Unable to login to gmail
« Reply #6 on: May 16, 2011, 08:42:58 AM »
If you can access imap.gmail.com:993 from the server I'm not sure where the problem would be, RoundCube just uses a fsockopen command to connect which should be included in your base PHP install. It may possibly be a problem with openssl since the connection does use ssl but RoundCube checks if it available before it tries to connect.

Offline awitz

  • Newbie
  • *
  • Posts: 1
Same problem!
« Reply #7 on: August 30, 2011, 06:25:59 AM »
Did you  ever find a answer to your troubles? I am experiancing the very same porblem! I would appreciate any assistance.