Question

Roundcube webmail and IMAP with GMAIL

Asked by: baxleyb

Hi,

I would like to know if anyone has successfully used either of these 2 to access GMAIL via IMAP:

Gmail Lite: http://gmail-lite.sourceforge.net/wordpress/
Roundcube: http://roundcube.net/

So far I have come pretty close to accessing gmail via imap using roundcube but I get the following error message:

[13-Nov-2007 18:54:03 -0500] IMAP Error: Could not connect to ssl://imap.gmail.com at port 993: Connection refused in  on line 0
[13-Nov-2007 18:55:04 -0500] IMAP Error: Could not connect to imap.gmail.com at port 993: Connection refused in  on line 0

I've tried connecting using ssl://imap.gmail.com and this imap.gmail.com.

Any assistance would be greatly appreciated.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-11-13 at 16:24:11ID22958855
Tags

roundcube

,

gmail

,

imap

Topics

PHP Scripting Language

,

Internet Message Access Protocol (IMAP)

,

Email Clients

Participating Experts
2
Points
500
Comments
22

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Gmail and IMAP with SquirrelMail
    Hi, I would like to know if anyone has configured Squirrelmail for use with a gmail account using IMAP access. If you have not successfully configured Squirrelmail but use another phpbased web mail solution to access GMAIL via IMAP then please let me know. I am using Squir...
  2. IMAP Path Prefix for GMAIL
    I am brand new to exchange, and I am looking to move our 20 clients to the GMAIL premiere. Before I do, I am testing one account. In the setup it is asking me for my IMAP Path Prefix. I am clueless to what this is? I have made sure that IMAP and POP are enabled on the Exc...
  3. Gmail IMAP Folder setup
    I've setup Windows Mail with a Gmail account using IMAP. My question concerns what the difference is between the folders under the [Gmail] heading to the other folders listed. Under [Gmail] are the folders: All Mail, Drafts, Sent Mail, Spam, Starred, and Trash. I would ver...
  4. gmail imap to Outlook 2003
    I have two gmail accounts using IMAP to link with Outlook 2003 under Windows XP and a mobile PC device. One of the gmail accounts generates this message during Outlook Send/Receive: Outlook error: Your IMAP server wishes to alert you to the following: Too many simultaneous...
  5. Gmail IMAP server
    i am having problem with my owndomain account. i regiestred the dmaon mydomain.com at gmail. configured windows live using imap.gamil.com and smtp.gmail.com for my email. some reason i get this timeout error. i do get same error when i confgure outlook express. -------------...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: nizsmoPosted on 2007-11-13 at 17:02:37ID: 20276871

It should be doable, in theory. the error you are getting means that it is finding the server, but cannot connect due to authentication issues...maybe a password and username is needed?

 

by: darron_chapmanPosted on 2007-11-13 at 18:11:23ID: 20277135

I have been successful using RoundMail and GMail... make sure openssl is turned on in.  Here is what the top of my main.inc.php file looks like, you will need to logon using your full email address if you use the following code...

<?php

/*
 +-----------------------------------------------------------------------+
 | Main configuration file                                               |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

*/

$rcmail_config = array();


// system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace
$rcmail_config['debug_level'] = 4;

// enable caching of messages and mailbox data in the local database.
// this is recommended if the IMAP server does not run on the same machine
$rcmail_config['enable_caching'] = TRUE;

// lifetime of message cache
// possible units: s, m, h, d, w
$rcmail_config['message_cache_lifetime'] = '10d';

// automatically create a new RoundCube user when log-in the first time.
// a new user will be created once the IMAP login succeeds.
// set to false if only registered users can use this service
$rcmail_config['auto_create_user'] = TRUE;

// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';

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

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['username_domain'] = '';

// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = '';

// Path to a virtuser table file to resolve user names and e-mail addresses
$rcmail_config['virtuser_file'] = '';

// Query to resolve user names and e-mail addresses from the database
// %u will be replaced with the current username for login.
// The query should select the user's e-mail address as first col
$rcmail_config['virtuser_query'] = '';

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
$rcmail_config['smtp_server'] = 'ssl://smtp.gmail.com';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 465;

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

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

 

by: baxleybPosted on 2007-11-13 at 19:27:30ID: 20277440

Thanks for the info. I tried modifying my config similar to yours and still get an error.

I believe openssl is enabled based on my php info output:

OpenSSL support       enabled
OpenSSL Version       OpenSSL 0.9.6g 9 Aug 2002

Here is my config:
------------------------------------------------


$rcmail_config = array();


// system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace
//$rcmail_config['debug_level'] = 1;
$rcmail_config['debug_level'] = 4;

// enable caching of messages and mailbox data in the local database.
// this is recommended if the IMAP server does not run on the same machine
$rcmail_config['enable_caching'] = TRUE;

// lifetime of message cache
// possible units: s, m, h, d, w
$rcmail_config['message_cache_lifetime'] = '10d';

// automatically create a new RoundCube user when log-in the first time.
// a new user will be created once the IMAP login succeeds.
// set to false if only registered users can use this service

$rcmail_config['auto_create_user'] = TRUE;

// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
//$rcmail_config['default_host'] = '';

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



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

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['username_domain'] = '';

// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = '';

// Path to a virtuser table file to resolve user names and e-mail addresses
$rcmail_config['virtuser_file'] = '';

// Query to resolve user names and e-mail addresses from the database
// %u will be replaced with the current username for login.
// The query should select the user's e-mail address as first col
$rcmail_config['virtuser_query'] = '';

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
$rcmail_config['smtp_server'] = 'ssl://smtp.gmail.com';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 465;

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login

$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login

$rcmail_config['smtp_pass'] = '%p';

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

// SMTP HELO host
// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
// Leave this blank and you will get the server variable 'server_name' or
// localhost if that isn't defined.
$rcmail_config['smtp_helo_host'] = '';

// Log sent messages
$rcmail_config['smtp_log'] = TRUE;
------------------------------------------------

Any help would be great, thanks!

 

by: darron_chapmanPosted on 2007-11-13 at 19:37:15ID: 20277476

Have you enabled IMAP in your gmail account?  Also, do you have an IMAP client like Outlook Express or something like that to test and make sure that for some reason you can't get to that port?

 

by: baxleybPosted on 2007-11-13 at 20:01:11ID: 20277561

IMAP is enabled and it works perfect with Outlook Express.

 

by: darron_chapmanPosted on 2007-11-13 at 20:17:18ID: 20277618

Are you logging in using your full gmail email account, user@gmail.com, and using the correct password? ...  I'm sure this is a silly question, but after that, I'm out of ideas, except for deleting the RoundCube directory and starting over.

 

by: nizsmoPosted on 2007-11-13 at 23:10:39ID: 20278099

your error looks like an authentication error, not an error where you cannot connect through to the IMAP server, so either something is wrong with the settings, or your username or password somehow doesn't work. Have you tried another Gmail account and see if that works? remember to enable IMAP on that account.

 

by: baxleybPosted on 2007-11-14 at 04:27:26ID: 20279309

I've tried another gmail account with imap enabled and it is still not working.
I've disabled pop3 and enabled imap in my account and I get this error:

IMAP Error: Could not connect to ssl://imap.gmail.com at port 993: Connection refused

Any ideas?

 

by: nizsmoPosted on 2007-11-14 at 04:31:57ID: 20279322

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['username_domain'] = '';

this looks interesting, have you tried putting your username/email in there?

 

by: baxleybPosted on 2007-11-14 at 05:42:04ID: 20279700

nizsmo: I'll try that out.

darron_chapman: Do you use the .htaccess files included with the install? I don't think that would be the cause but I'm looking at even the most obscure things now.

Thanks to both of you for your help thus far.

 

by: darron_chapmanPosted on 2007-11-14 at 06:21:31ID: 20280045

I've never actually even opened that file.  Are you using the latest version of RoundCube?   I decided to go ahead and install RoundCube on another computer with PHP/MySQL on it, and I was able to get it to work again.  What I would recommend is downloading the latest  version of RoundCube from here: http://roundcube.net/downloads and starting over.  Here are the steps I took:

-- Extracted files to directory roundmail in the root of my website
-- created mysql database according to directions in the INSTALL file
-- edited db.inc.php and changed the user id and password to match my mysql username and password
-- edited main.inc.php and ONLY changed this line (for testing purposes) ... $rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';

I was then able to go to http://localhost/roundmail and log in successfully

 

by: darron_chapmanPosted on 2007-11-14 at 06:30:33ID: 20280133

Another question:  Are you running your webserver on the same computer you used to test your Gmail account with Outlook Express?

 

by: baxleybPosted on 2007-11-14 at 16:55:44ID: 20285679

nizsmo: I tried that and it didn't work.

darron_chapman: I am using the latest version and it's still not working.

Does anyone know of any other web apps that would work or any other config options in roundcube?

 

by: nizsmoPosted on 2007-11-14 at 18:51:25ID: 20286121

what about giving squirrelmail a try?
http://www.nabble.com/Gmail-t4696937.html

not sure if it is what you are looking for, but a suggestion to look into.
http://www.squirrelmail.org/

 

by: baxleybPosted on 2007-11-14 at 19:29:43ID: 20286287

I am running squirrelmail with imap for a different email account and it works perfect.

I tried modifying the config in squirrelmail and i get the same error. My site is hosted on 1 and 1 so I am not sure if the issue is related to that specific webhost.

 

by: darron_chapmanPosted on 2007-11-14 at 20:44:34ID: 20286792

It almost has to be related to communication problems between 1 and 1 and gmail.  Everything else has been eliminated.

 

by: nizsmoPosted on 2007-11-14 at 20:57:27ID: 20286899

the final test: try it on another computer elesewhere (different internet connection) and see if it works? if it does then there must be something wrong with your setup.

 

by: darron_chapmanPosted on 2007-11-15 at 05:38:04ID: 20288748

I have a domain hosted on 1 and 1, I will load RoundCube on it and report back to you whether or not I get through.

 

by: darron_chapmanPosted on 2007-11-15 at 06:45:52ID: 20289216

Yes, it's definitely a communication problem between 1and1 hosted sites and gmail.  I just uploaded RoundCube up to my site ... http://www.lakeridgeintheburg.com/roundcubemail and I get the error you described ... this configuration worked perfectly hosted on my own servers.

 

by: baxleybPosted on 2007-11-15 at 08:28:03ID: 20290151

Whew!

I felt like I was taking crazy pills (zoolander)

Thanks darronchapman for investigating and confirming this issue. I guess I need another host for this purpose or just scracth the idea altogether.

Thanks again.

 

by: darron_chapmanPosted on 2007-11-15 at 08:29:56ID: 20290174

You could contact them and see if they're blocking 993 for some reason and see if it can be unblocked.

 

by: baxleybPosted on 2007-11-15 at 08:31:39ID: 31409131

It was great to confirm that the error was related to my web host and not the code or configuration. darronchapman really helped in this effort!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...