Using RoundCube Webmail With ISPConfig 3 On Debian Wheezy (Apache2)

Want to support HowtoForge? Become a subscriber!
Submitted by falko (Contact Author) (Forums) on Tue, 2013-06-11 16:53. :: Debian | ISPConfig | Web Server | Apache | Control Panels | Email

Using RoundCube Webmail With ISPConfig 3 On Debian Wheezy (Apache2)

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Follow me on Twitter
Last edited 06/06/2013

This guide explains how to install the RoundCube webmail application on a Debian Wheezy server running ISPConfig and Apache2, and how to enable the ISPConfig 3 plugins for RoundCube so that users can perform actions like changing their email passwords from within RoundCube. Roundcube webmail is a browser-based multilingual IMAP client with an application-like user interface; it comes with functions like MIME support, address book, folder manipulation, message searching and spell checking.

I do not issue any guarantee that this will work for you!


1 Preliminary Note

This tutorial assumes you are using Apache2 as the web server on your ISPConfig 3 server; this tutorial will not work for nginx. I'm going to install RoundCube from the Debian Wheezy repositories - it is a reasonably recent version ( vs 0.9.1 (current stable version)).

RoundCube will be configured in such a way that it can be accessed from each vhost over the alias /webmail (e.g.

If you are already using another webmail application like SquirrelMail, make sure you disable it completely or at least the alias /webmail. If you have installed SquirrelMail as a Debian package, you can find the alias in /etc/apache2/conf.d/squirrelmail.conf; either comment out the alias to just disable the /webmail alias or comment out the whole file to disable SquirrelMail completely. Don't forget to restart Apache afterwards.


2 Creating A Remote User In ISPConfig

The ISPConfig 3 plugins for RoundCube work through ISPConfig's remote API. To use this API, we need a remote user. To create such a user, go to System > User Management > Remote Users and click on the Add new user button:

Provide a username and password for the user...

... and enable the following functions:

  • Server functions
  • Client functions
  • Mail user functions
  • Mail alias functions
  • Mail spamfilter user functions
  • Mail spamfilter policy functions
  • Mail fetchmail functions
  • Mail spamfilter whitelist functions
  • Mail spamfilter blacklist functions
  • Mail user filter functions

Then click on Save.


3 Installing RoundCube

We can install RoundCube as follows:

apt-get install roundcube roundcube-plugins roundcube-plugins-extra

You will see the following questions:

Configure database for roundcube with dbconfig-common? <-- Yes
Database type to be used by roundcube: <-- mysql
Password of the database's administrative user: <-- yourrootsqlpassword (the password of the MySQL root user)
MySQL application password for roundcube: <-- roundcubesqlpassword
Password confirmation: <-- roundcubesqlpassword

This will create a MySQL database called roundcube with the MySQL user roundcube and the password roundcubesqlpassword.

Next open /etc/apache2/conf.d/roundcube...

vi /etc/apache2/conf.d/roundcube

... and add the line Alias /webmail /var/lib/roundcube. In addition to that, add the PHP configuration to the <Directory /var/lib/roundcube/> section (I've highlighted the changes):

# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
Alias /roundcube /var/lib/roundcube
Alias /webmail /var/lib/roundcube

# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
      Options Indexes MultiViews FollowSymLinks
      AllowOverride None
      Order allow,deny
      allow from all

<Directory /var/lib/roundcube/>
  Options +FollowSymLinks
  DirectoryIndex index.php

  <IfModule mod_php5.c>
    AddType application/x-httpd-php .php

    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_flag register_globals Off
    php_value include_path .:/usr/share/php

  # This is needed to parse /var/lib/roundcube/.htaccess. See its
  # content before setting AllowOverride to None.
  AllowOverride All
  order allow,deny
  allow from all

# Protecting basic directories:
<Directory /var/lib/roundcube/config>
        Options -FollowSymLinks
        AllowOverride None

<Directory /var/lib/roundcube/temp>
        Options -FollowSymLinks
        AllowOverride None
        Order allow,deny
        Deny from all

<Directory /var/lib/roundcube/logs>
        Options -FollowSymLinks
        AllowOverride None
        Order allow,deny
        Deny from all

Restart Apache afterwards:

/etc/init.d/apache2 restart


4 Configuring RoundCube

Open /etc/roundcube/

vi /etc/roundcube/

... and set $rcmail_config['default_host'] = 'localhost'; (or the hostname or IP address of your mail server if it is on a remote machine):

$rcmail_config['default_host'] = 'localhost';

Otherwise RoundCube will ask for a hostname before each login which might overstrain your users - we want to make usage as easy as possible.

Next install the ISPConfig 3 plugins for RoundCube:

cd /tmp
git clone
cd /tmp/ispconfig3_roundcube/
mv ispconfig3_* /var/lib/roundcube/plugins
cd /var/lib/roundcube/plugins
mv ispconfig3_account/config/ ispconfig3_account/config/

Open ispconfig3_account/config/

vi ispconfig3_account/config/

... and fill in the login details of your ISPConfig remote user and the URL of the remote API - my ISPConfig installation runs on, so the URL of the remote API is

$rcmail_config['identity_limit'] = false;
$rcmail_config['remote_soap_user'] = 'roundcube';
$rcmail_config['remote_soap_pass'] = 'Sw0wlytlRt3MY';
$rcmail_config['soap_url'] = '';

Finally open /etc/roundcube/ again...

vi /etc/roundcube/

... and enable the jquerui plugin plus the ISPConfig 3 plugins...

// ----------------------------------
// ----------------------------------

// List of active plugins (in plugins/ directory)
//$rcmail_config['plugins'] = array();
$rcmail_config['plugins'] = array("jqueryui", "ispconfig3_account", "ispconfig3_autoreply", "ispconfig3_pass", "ispconfig3_spam", "ispconfig3_fetchmail", "ispconfig3_filter");

... and change the skin from default to classic (otherwise the ISPConfig 3 plugins will not work):

// skin name: folder from skins/
$rcmail_config['skin'] = 'classic';

That's it; now you can access RoundCube under the alias /webmail (e.g. Log in with the email address and password of an email account created through ISPConfig:

This is how RoundCube looks:

Under Settings > Account you can use the ISPconfig 3 plugins for RoundCube to modify your settings, for example...

... you can set a new password for your email account without using ISPConfig:


5 Links

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by byman64 (not registered) on Tue, 2014-12-02 21:05.
I installed roundcube using this tutoria. It was great, all worked and works fine.

 Now I would like upgrade roundcube from 0.9x to 1.x ?

Any idea how to  do it? 


Submitted by Mojrem (registered user) on Sat, 2014-11-29 16:33.

Edit : 

 i changed the line 132 & 143 (where it's about DateTimeZone) in ispconfig_autoreply.php to $dt->setTimeZone(new DateTimeZone($this->rcmail_inst->config->get('timezone')));

It is working fine right now.


I followed this great tutorial, everything is working fine except the autoreply, it loads nothing,

I've got this on the log : - - [29/Nov/2014:16:27:40 +0100] "GET /roundcube/?_task=settings&_action=plugin.ispconfig3_autoreply&_framed=1 HTTP/1.1" 500 484 "" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"

 Any idea ?




Submitted by Anonymous (not registered) on Wed, 2014-10-22 17:25.

It is a very good idea to write the modified instructions in red and in underline.

 In this maner, it is impossible to see différence between "spacing caracter" and "underscore caracter" ! very good idea !!!

Submitted by N3RVE (not registered) on Thu, 2014-07-24 15:59.
I just wanted to point out that with PHP-FPM selected under Sites in ISPConfig, I was getting a blank screen even after following the guide meticulously. After switching to FastCGI and restarting Apache, it worked! Thanks for the guide. 
Submitted by recin (registered user) on Fri, 2014-10-03 11:14.
Same problem here.

I can access with serverIP/webmail but cannot access from because all my sites are with mod-PHP and they dont work with fastcgi.

What can i do?





Submitted by pinky (registered user) on Sun, 2014-07-06 17:25.
Note: It appears as though google pagespeed might break the plugins with the additions it makes to url requests... anyone confirm ?
Submitted by McLure (registered user) on Tue, 2014-06-10 15:47.
Something wrong in line 2 - fixed (line 3)

Missing line 3? Unpac?

cd /tmp 

#(git clone wget clone cd /tmp/ispconfig3_roundcube/ mv ispconfig3_* /var/lib/roundcube/plugins cd /var/lib/roundcube/plugins mv ispconfig3_account/config/ ispconfig3_account/config/

Submitted by Jay (not registered) on Mon, 2014-06-02 03:12.

Excellent series of guides! Here is a fix which will prevent identities from being changed or additional ones created by the email user.

change the 'identities_level' in /etc/roundcube/

// Set identities access level:
// 0 - many identities with possibility to edit all params
// 1 - many identities with possibility to edit all params but not email address
// 2 - one identity with possibility to edit all params
// 3 - one identity with possibility to edit all params but not email address
// 4 - one identity with possibility to edit only signature
$rcmail_config['identities_level'] = 3;

Submitted by Milleman (registered user) on Sat, 2013-12-07 17:54.

Followed the above, but only to end up with a non working mailserver. The mails can not be received or delivered afterwards. Removing Roundcube will make the mailserver work again. Tried the installation procedure serveral times, ending up with the same problem.

Clues anyone?

Submitted by Bjarne (not registered) on Sat, 2013-11-30 21:46.
Great guide thanks :)

Btw. I found no problems keeping the larry theme. 

 However the stable release of roundcube is rather outdated. To install 0.9.5 version I added to 


# Backports repository

deb wheezy-backports main contrib non-free

Then run to install Roundcube 0.9.5

aptitude update

aptitude -t wheezy-backports install roundcube roundcube-plugins roundcube-plugins-extra


Submitted by Abdullah (not registered) on Mon, 2013-10-21 00:15.
Danke für die ausführliche Anleitung. Jetzt kann ich wieder Roundcube bennutzen :)
Submitted by Olivier (not registered) on Fri, 2013-10-11 14:43.

 Thank you for this "how to" is working very well for me. 

Regards, Olivier 

Submitted by Linksdsd (not registered) on Fri, 2013-10-04 21:13.

I just want to say thank you for the guide on Roundcube. 


Submitted by tension (registered user) on Thu, 2013-09-05 08:44.
Great job everything is correct 
Submitted by Kralik (not registered) on Sat, 2013-08-17 11:49.
plugins are loaded and displayed data.
When I set up an automatic reply, so an error occurs:
Soap Error: Could not connect to host:

Login and password are correct.

please help
Submitted by pallermo (not registered) on Mon, 2013-11-11 20:48.

I am wrong...I have:
Soap Error: Error Fetching http headers

 Looking for soultion...

Submitted by Anonymous (not registered) on Thu, 2014-02-06 07:24.
This happens when you have configured ISPConfig to use HTTPS instead of HTTP.  Go edit /var/lib/roundcube/plugins/ispconfig3_account/config/ and change the soap_url to have 'https' instead of 'http'.
Submitted by pallermo (not registered) on Mon, 2013-11-11 20:46.

I still have this problem!
Still no solution...looking wazzup. If I find - I will post answer. 



Submitted by Gomez (not registered) on Sun, 2013-12-01 10:10.

Please i have the same error :

Soap Error: Error Fetching http headers

who can help me ???

Submitted by murraybiscuit (not registered) on Sat, 2013-12-21 17:52.

looks like you haven't installed the apache headers module. if you're debian install running apache 2, run this on the command line: 

~$: a2enmod headers

Submitted by Power Cords (not registered) on Thu, 2013-06-13 11:12.
One year ago, I can remember that the theme of Roundcube was not so much good but later many improvements were made in the theme. The problem in using mail server with hosting is that often emails go to spam or junk box if emails are sent to Gmail, Hotmail or Yahoo.
Submitted by radim_h (registered user) on Wed, 2013-06-12 08:19.
Everything works fine with Larry skin (tried yesterday after instalaltion of Roundcube 0.9.1.)
Submitted by kraft (not registered) on Fri, 2013-11-15 00:10.
Have you HowTo for install Roundcube 0.9 + ISPConfig 3 ?
Submitted by Anonymous (not registered) on Tue, 2013-09-03 14:22.
i can confirm this! everything works fine with larry's theme.
Submitted by Edson (not registered) on Wed, 2014-04-30 16:05.

Shows the error when I log in roundcube



[30-Apr-2014 11:50:40 -0300]: PHP Error: Could not perform encryption; make sure Mcrypt is installed or lib/ is available in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 752$

I'm using ubuntu -

any suggestions ??

Submitted by Nad (not registered) on Fri, 2014-05-02 23:45.

ok, found the solution on

Simply type: sudo php5enmod mcrypt



Submitted by Anonymous (not registered) on Sat, 2014-11-15 05:11.

And then do:

sudo service apache2 restart

Worked for me.

Submitted by Nad (not registered) on Fri, 2014-05-02 23:21.


Same config, same error... still searching...

Submitted by darkshadow (not registered) on Mon, 2014-06-23 16:01.


are the plugins running with roundcube 1.0.1?

Because since Update i got SOAP ERROR . NOT FOUND