Author Topic: Imap connection fails  (Read 7542 times)

Offline Francky45

  • Newbie
  • *
  • Posts: 1
Imap connection fails
« on: August 22, 2012, 01:08:43 PM »
Dear all !

I want to use round cube for a small company. Each user will be able to connect to roundcube, just entering his email address and password and get his emails.

I've installed it, I didn't get any errors excepted for IMAP. When I tried to test it, I got this error :
Quote
Connecting to imap.gmail.com...
IMAP connect:  NOT OK(Login failed for [MY USERNAME HERE] from [MY IP ADDRESS]. Empty startup greeting (imap.gmail.com:993))

After trying a few times, it still didn't work. So I went to the login screen


but I got the same problem. When I check the error log, this is what I get :

Code: [Select]
[21-Aug-2012 18:50:16 -0500]: IMAP Error: Login failed for [MY EMAIL ADDRESS] from [MY IP ADDRESS]. Empty startup greeting (imap.gmail.com:993) in /home/altochan/public_html/demo/webmail/program/include/rcube_imap.php on line 191 (POST /demo/webmail/?_task=login&_action=login)
In my file main.inc.php, this is the part concerning the IMAP :

Code: [Select]
$rcmail_config['default_host'] = NULL;

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['imap_auth_type'] = null;

// If you know your imap's folder delimiter, you can specify it here.
// Otherwise it will be determined automatically
$rcmail_config['imap_delimiter'] = null;

// If IMAP server doesn't support NAMESPACE extension, but you're
// using shared folders or personal root folder is non-empty, you'll need to
// set these options. All can be strings or arrays of strings.
// Folders need to be ended with directory separator, e.g. "INBOX."
// (special directory "~" is an exception to this rule)
// These can be used also to overwrite server's namespaces
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;

// By default IMAP capabilities are readed after connection to IMAP server
// In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
// after login. Set to True if you've got this case.
$rcmail_config['imap_force_caps'] = false;

// By default list of subscribed folders is determined using LIST-EXTENDED
// extension if available. Some servers (dovecot 1.x) returns wrong results
// for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
// Enable this option to force LSUB command usage instead.
$rcmail_config['imap_force_lsub'] = false;

// Some server configurations (e.g. Courier) doesn't list folders in all namespaces
// Enable this option to force listing of folders in all namespaces
$rcmail_config['imap_force_ns'] = false;

// IMAP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['imap_timeout'] = 0;

// Optional IMAP authentication identifier to be used as authorization proxy
$rcmail_config['imap_auth_cid'] = null;

// Optional IMAP authentication password to be used for imap_auth_cid
$rcmail_config['imap_auth_pw'] = null;

// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
$rcmail_config['imap_cache'] = null;

// Enables messages cache. Only 'db' cache is supported.
$rcmail_config['messages_cache'] = false;

If anyone can help it will be highly appreciated,

If you need more information to find the solution please do not hesitate.

Thank you !!


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Imap connection fails
« Reply #1 on: August 22, 2012, 05:27:36 PM »
I see your trying to connect to Google servers, what is the exact string your putting in the server box in the login page?

Offline Yoni

  • Full Member
  • ***
  • Posts: 164
    • MyRoundcube
Re: Imap connection fails
« Reply #2 on: August 22, 2012, 06:47:09 PM »
If anyone can help it will be highly appreciated,
If you need more information to find the solution please do not hesitate.

Thank you !!

Your configuration file is the problem. Please adjust your .../config/main.inc.php accordingly.

IMAP Host configuration should look like:

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

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 993;

Alternatively, you can also use "accounts" plugin to check Remote IMAP folders from within your Roundcube local account (in case of any).

That's all. Good luck.
« Last Edit: August 22, 2012, 06:53:20 PM by Yoni »