Author Topic: How does roundcube interface with Gmail?  (Read 23076 times)

Offline bigsend

  • Newbie
  • *
  • Posts: 4
How does roundcube interface with Gmail?
« on: July 11, 2008, 01:30:30 PM »
I know I could find this out on my own, but it will actually cost me some money to activate the features in my host to allow the Gmail IMAP ports to work..

With that said, I am wondering how Gmail would interface with roundcube...

Will all the folders (i.e., labels) be imported into the roundcube account? If I have 100000 messages in gmail, will it go through a long importation process? How fast does it interact with the google servers, etc etc?


Any ideas would be great, Thanks!

BigSend
« Last Edit: April 25, 2010, 01:12:00 PM by skaero »

Offline bigsend

  • Newbie
  • *
  • Posts: 4
How does roundcube interface with Gmail?
« Reply #1 on: July 14, 2008, 04:27:48 PM »
Bump...

I'm sure someone has experience integrating this with gmail.

Anyone?

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
How does roundcube interface with Gmail?
« Reply #2 on: July 14, 2008, 10:22:49 PM »
Hmm... now you have me wondering.  So I'll go install it and let you know how it goes ;)

I'm going to say no since GMail uses TLS on non-standard ports (at least for SMTP).  I have it set up to use gmail as the IMAP server, but I'm hanging on the login.  So for now, no, doesn't seem like it.
 
  

Offline bigsend

  • Newbie
  • *
  • Posts: 4
How does roundcube interface with Gmail?
« Reply #3 on: July 18, 2008, 10:13:06 PM »
Quote from: bpat1434;12890
Hmm... now you have me wondering.  So I'll go install it and let you know how it goes ;)

I'm going to say no since GMail uses TLS on non-standard ports (at least for SMTP).  I have it set up to use gmail as the IMAP server, but I'm hanging on the login.  So for now, no, doesn't seem like it.


I thought there were some people here who got it to fully work?


Anyone else?

Offline tobiasly

  • Newbie
  • *
  • Posts: 3
How does roundcube interface with Gmail?
« Reply #4 on: August 04, 2008, 10:59:48 PM »
I'm not sure why you're having any trouble; interfacing RoundCube with Gmail is very easy if you just follow Google's directions for setting up an IMAP client and the comments in main.inc.php. Here are the relevant sections from my config (I am using Google Apps mail; if you're using Gmail then just change the domain from EXAMPLE.COM to gmail.com):

// 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;

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = null;

// 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'] = 'EXAMPLE.COM';

// 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'] = 'EXAMPLE.COM';

// 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';

// SNIP bunch of default settings...

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = '[Gmail]/Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = '[Gmail]/Spam';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Gmail recommends *not* using this feature; any
// messages you send via SMTP will automatically show up
// in your Sent Mail folder anyway!
$rcmail_config['sent_mbox'] = '';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Gmail recommends *not* using a Trash folder,
// and just deleting messages directly, so that they remain
// under "All Mail" when you delete from inbox. You can set
// this to [Gmail]/Trash, but this will cause deleted messages
// to be permanently deleted
$rcmail_config['trash_mbox'] = '';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');



I haven't tested it extensively, but I verified that I can login using just my username (it automatically appends @EXAMPLE.COM, which prevents anyone from using this as an open email gateway), view and read all of my messages, and compose/send messages (which then are copied to Sent Mail automatically).

Useful links:
http://mail.google.com/support/bin/answer.py?answer=78799
http://mail.google.com/support/bin/answer.py?answer=78892

Offline tobiasly

  • Newbie
  • *
  • Posts: 3
How does roundcube interface with Gmail?
« Reply #5 on: August 04, 2008, 11:09:56 PM »
I'm not sure why you're having any trouble with this; reading your Gmail or Google Apps account is very easy if you just follow Google's directions for setting up IMAP clients here:

http://mail.google.com/support/bin/answer.py?answer=78799
http://mail.google.com/support/bin/answer.py?answer=78892

Here is my applicable main.inc.php; simply change EXAMPLE.COM to the appropriate domain (gmail.com if you're not using Apps):

Note Google's recommendations (in the second link) *against* setting the Sent Mail and Trash folders in IMAP clients, since their server will automatically handle these.


// 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;

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = null;

// 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'] = 'EXAMPLE.COM';

// 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'] = 'EXAMPLE.COM';

// 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'] = '';

// 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'] = '';

// SNIP bunch of default settings...

// only list folders within this path
$rcmail_config['imap_root'] = '';

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = '[Gmail]/Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = '[Gmail]/Spam';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Google recommends to *not* use this
$rcmail_config['sent_mbox'] = '';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Google recommends to *not* use this
$rcmail_config['trash_mbox'] = '';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');

// automatically create the above listed default folders on login
$rcmail_config['create_default_folders'] = FALSE;

// protect the default folders from renames, deletes, and subscription changes
$rcmail_config['protect_default_folders'] = TRUE;


I haven't had a chance to test it extensively, but viewing/reading folders and messages works, as well as sending messages (which automatically puts them in Sent Mail).

bpat1434: Some older Google instructions list non-standard ports but you can use the standard ones as well.

Offline tobiasly

  • Newbie
  • *
  • Posts: 3
Re: How does roundcube interface with Gmail?
« Reply #6 on: August 04, 2008, 11:16:05 PM »
I'm not sure why you're having any trouble with this; reading your Gmail or Google Apps account is very easy if you just follow Google's directions for setting up IMAP clients here:

http://mail.google.com/support/bin/answer.py?answer=78799
http://mail.google.com/support/bin/answer.py?answer=78892

Here is my applicable main.inc.php; simply change EXAMPLE.COM to the appropriate domain (gmail.com if you're not using Apps):

Note Google's recommendations (in the second link) *against* setting the Sent Mail and Trash folders in IMAP clients, since their server will automatically handle these.


// 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;

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = null;

// 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'] = 'EXAMPLE.COM';

// 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'] = 'EXAMPLE.COM';

// 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'] = '';

// 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'] = '';

// SNIP bunch of default settings...

// only list folders within this path
$rcmail_config['imap_root'] = '';

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = '[Gmail]/Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = '[Gmail]/Spam';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Google recommends to *not* use this
$rcmail_config['sent_mbox'] = '';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Google recommends to *not* use this
$rcmail_config['trash_mbox'] = '';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');

// automatically create the above listed default folders on login
$rcmail_config['create_default_folders'] = FALSE;

// protect the default folders from renames, deletes, and subscription changes
$rcmail_config['protect_default_folders'] = TRUE;


I haven't had a chance to test it extensively, but viewing/reading folders and messages works, as well as sending messages (which automatically puts them in Sent Mail).

bpat1434: Some older Google instructions list non-standard ports but you can use the standard ones as well.

Offline tobiasly

  • Newbie
  • *
  • Posts: 3
How does roundcube interface with Gmail?
« Reply #7 on: August 04, 2008, 11:20:04 PM »
I'm not sure why you're having any trouble with this; reading your Gmail or Google Apps account is very easy if you just follow Google's directions for setting up IMAP clients here:

http://mail.google.com/support/bin/answer.py?answer=78799
http://mail.google.com/support/bin/answer.py?answer=78892

Here is my applicable main.inc.php; simply change EXAMPLE.COM to the appropriate domain (gmail.com if you're not using Apps):

Note Google's recommendations (in the second link) *against* setting the Sent Mail and Trash folders in IMAP clients, since their server will automatically handle these.


// 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;

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
$rcmail_config['imap_auth_type'] = null;

// 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'] = 'EXAMPLE.COM';

// 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'] = 'EXAMPLE.COM';

// 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'] = '';

// 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'] = '';

// SNIP bunch of default settings...

// only list folders within this path
$rcmail_config['imap_root'] = '';

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = '[Gmail]/Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = '[Gmail]/Spam';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Google recommends to *not* use this
$rcmail_config['sent_mbox'] = '';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Google recommends to *not* use this
$rcmail_config['trash_mbox'] = '';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');

// automatically create the above listed default folders on login
$rcmail_config['create_default_folders'] = FALSE;

// protect the default folders from renames, deletes, and subscription changes
$rcmail_config['protect_default_folders'] = TRUE;


I haven't had a chance to test it extensively, but viewing/reading folders and messages works, as well as sending messages (which automatically puts them in Sent Mail).

bpat1434: Some older Google instructions list non-standard ports but you can use the standard ones as well.

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
How does roundcube interface with Gmail?
« Reply #8 on: August 05, 2008, 08:45:39 AM »
Yeah, I had that all before.  I guess I missed a configuration item somewhere along the way.  Thanks for pointing it out.  Not sure what was wrong, but gmail does work under RC, you just have to use IMAP instead of their POP service.
 
  

Offline alphonse

  • Newbie
  • *
  • Posts: 1
How does roundcube interface with Gmail?
« Reply #9 on: September 03, 2008, 11:22:55 PM »
I've tried gmail out in squirrelmail and found a couple problems:

1) the Squirrelmail Inbox does not show all the messages in the gmail inbox.  it appears that only the first message in the "conversation" shows up.  Fortunately, I can click on the [Gmail]/All Mail folder and see all the messages but i wish that I did not have to do this.

2) when I read a message in Squirrelmail it never gets marked as read.  I have to manually select the message and the click the "Transform as Read" button. This is utterly lame.  

I am thinking about switching to roundcube just to get around these problems but thought that I would ask you guys if these problems exist in roundcube before I attempt an install.  

Q1) Do all the messages show up in the roundcube inbox (not just the first message in the conversation) or do you have to choose some other folder to see all the messages in chronological order?

Q2) When you read a message with roundcube is it marked as read (unbold or something) without have to manually mark it as read?

Thanks!

Offline tobiasly

  • Newbie
  • *
  • Posts: 3
How does roundcube interface with Gmail?
« Reply #10 on: September 03, 2008, 11:57:12 PM »
Q1) I'm pretty sure that this is a function of how Gmail IMAP works, not your IMAP client. The Gmail web interface is "smart" enough to pull the rest of the conversation from All Mail in order to show it in the conversation, but an IMAP client would have no way of doing that, especially since they're kept in different folders. So the answer is no, RoundCube does not do this.

Q2) Yes, RoundCube will mark each message as read when you read it. And if you decide to use the Preview Pane, it will even mark them as read as you Preview each message, which is nice if you want to avoid switching back and forth between views.