ISPConfig 3 + RoundCube Webmail

1) 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.

2) 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?
  • Database type to be used by roundcube:
  • Password of the database’s administrative user:
  • MySQL application password for roundcube:
  • Password confirmation:

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

Edit: /etc/apache2/conf-enabled/roundcube.conf
vi /etc/apache2/conf-enabled/roundcube.conf

… and add the line:

Alias /webmail /var/lib/roundcube

Restart Apache afterwards:

/etc/init.d/apache2 restart

3) Configuring RoundCube:

Open: /etc/roundcube/config.inc.php

vi /etc/roundcube/config.inc.php

and set (or the hostname or IP address of your mail server if it is on a remote machine):

$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.

4) Install the ISPConfig 3 plugins for RoundCube:

cd /tmp
git clone https://github.com/w2c/ispconfig3_roundcube.git
cd /tmp/ispconfig3_roundcube/
mv ispconfig3_* /var/lib/roundcube/plugins
cd /var/lib/roundcube/plugins
mv ispconfig3_account/config/config.inc.php.dist ispconfig3_account/config/config.inc.php

Open: /var/lib/roundcube/plugins/ispconfig3_account/config/config.inc.php…

vi /var/lib/roundcube/plugins/ispconfig3_account/config/config.inc.php

… and fill in the login details of your ISPConfig remote user and the URL of the remote API – my ISPConfig installation runs on https://192.168.0.100:8080, so the URL of the remote API is https://192.168.0.100:8080/remote/:

<?php
$config['identity_limit'] = false;
$config['remote_soap_user'] = 'remote user name';
$config['remote_soap_pass'] = 'remote user password';
$config['soap_url'] = 'https://192.168.0.1:8080/remote/';
?>

Finally open: /etc/roundcube/config.inc.php again…

vi /etc/roundcube/config.inc.php

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

// List of active plugins (in plugins/ directory)
$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/
$config['skin'] = 'classic';

That’s it; now you can access RoundCube under the alias your ip or domain name/webmail (e.g. http://www.example.com/webmail). Log in with the email address and password of an email account created through ISPConfig.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s