RoundCube Webmail
The RoundCube module integrates RoundCube Webmail with Drupal by automagically logging users in and out of RoundCube. It provides users with easy access to to their webmail, with support for Thickbox.
For more information about RoundCube Webmail, see the official website.
How the module works
Before going ahead and installing the module, you should know how it is designed to work.
The module automagically logs Drupal users in to (and out of) RoundCube, using the Drupal user's email address and password to authenticate against an IMAP server. The usernames and passwords of the email users on the IMAP server must therefore be identical to those of the site's users, or their login will fail.
If a setup like this is what you want, follow the instructions below to install and set up the RoundCube integration.
Installation
1. Download and install RoundCube Webmail
Download RoundCube Webmail 2.0-beta.
Install it by following these instructions, making sure to set a fixed IMAP host address in RoundCube's configuration file as explained on this wiki page.
2. Download and install RoundCube module
Download the RoundCube module.
To install the module, unpack it and place the entire roundcube folder into your modules directory (resulting in e.g. sites/default/modules/roundcube). Go to Administer > Site building > Modules and enable the RoundCube module.
3. Integrate the module with RoundCube
The module must be able to hook into RoundCube so that it can automagically login the user. To do this, RoundCube's index.php file must include the file roundcube.inc (from the module) at a particular location.
Copy the lines between <?php and ?> below and paste them into line 35 of the index.php file of your RoundCube Webmail installation:
<?php
#################### BEGINNING OF DRUPAL INTEGRATION ####################
require_once('/foo/bar/modules/roundcube/roundcube.inc');
####################### END OF DRUPAL INTEGRATION #######################
?>Change the dummy path (/foo/bar/...) so that it points to the roundcube.inc file of the module (e.g. '../sites/default/modules/roundcube/roundcube.inc').
The result should look something like this:
<?php
// init application and start session with requested task
$RCMAIL = rcmail::get_instance();
#################### BEGINNING OF DRUPAL INTEGRATION ####################
require_once('../sites/default/modules/roundcube/roundcube.inc');
####################### END OF DRUPAL INTEGRATION #######################
// init output class
?>4. Download and install Thickbox (optional)
To use RoundCube in a Thickbox, you will need to have the Thickbox module installed and enabled.
Configuration
Go to Administer > Site configuration > RoundCube and enter the absolute URL to the index.php file of your RoundCube Webmail installation (e.g. https://example.com/webmail/index.php). Change the remaining settings as you wish, and press Save configuration.
Next, visit Administer > User management > Access control to configure the permissions "access roundcube webmail" and "administer roundcube webmail" for the site's user roles.
A Webmail menu item will have been added to the Navigation menu, which will only be visible to users belonging to a role that has been granted the "access roundcube webmail" permission. Depending on the module's settings, it will present RoundCube in an IFrame or in a Thickbox when clicked.
This is a good time to try it out. If RoundCube has been correctly installed, and the logged in Drupal user has a matching IMAP account, you should now see RoundCube and its Inbox when clicking on the Webmail menu item.
Credits
The module is developed by Thomas Barregren and Joakim Stai at imBridge.
Its development has been sponsored by:
