ISPConfig 3 Roundcube Plugin on Debian 9 (Stretch)

  • Operating system version: Debian 9.4 and 9.5 Stretch
  • Roundcube version: 1.2.3+dfsg.1-4+deb9u1 and u2
  • ISPConfig 3 version: 3.1.11 and 3.1.13

This howto is based on ISPConfig3_roundcube Installation Instructions from Manual.

Prerequisites

Use the Roundcube version that comes with Debian 9, install it as instructed in the Perfect Server Guide for Debian Stretch.

Use current ISPConfig, now latest is version 3.1.13.

Add ISPConfig Remote User

Add ISPConfig remote user for Roundcube use. Choose a suitable name, I use rcmail-remote. Choose a good password, I usually generate passwords with apg, do apt-get install apg first.

apg -m 12 -l M NCL

Create the remote user in ISPConfig Panel, tab System, under User Management is "Remote Users". Click "Add new user" -button.

I did not tick Remote Access:, my setup has separate e-mail server where mail files and Roundcube and Dovecot are installed. So even though this is "remote user" it does not need remote access in my case.

For this user choose:

- 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

That list is in the order the items appear in ISPConfig Panel.

Install ISPConfig RoundCube Plugin

Fetch the ISPConfig3-plugins from Github. I used latest version for RoundCube 1.2.3. The plugin author writes in the manual to check out from Subversion directly to RoundCube root directory. I prefer to check out elsewhere, so I do not mess up the system directory where apt-get installs files.

The Readme.Debian in /usr/share/doc/roundcube advices to "Add your plugin in /var/lib/roundcube/plugins.". I checkout from svn to /root/ISPConfig3_plugins and copy from there to /var/lib/roundcube/plugins. The plugins from Debian packages are installed in /usr/share/roundcube and there is a symbolic link to those from /var/lib/roundcube/plugins. Install Subversion to get command svn. (apt-get install subversion).

cd /root
mkdir ISPConfig3_plugins
cd ISPConfig3_plugins
svn co https://github.com/w2c/ispconfig3_roundcube/trunk/ .
cd ispconfig3_account/config
cp config.inc.php.dist config.inc.php

Configure Plugin

Edit the file copied at last command of previous command lines. Fill in the remote user info created in Step 2.

cd /root/ISPConfig3_plugins
editor ispconfig3_account/config/config.inc.php

Original file looks like this:

<?php
$rcmail_config['identity_limit'] = false;
$rcmail_config['remote_soap_user'] = 'roundcube';
$rcmail_config['remote_soap_pass'] = 'roundcube';
$rcmail_config['soap_url'] = 'http://192.177.167.44:8080/remote/';
?>

Change the remote_soap_user, remote_soap_pass (user and pass created in Step 2) and soap_url. If you use ISPConfig panel with https://, use the same here for soap_url. You can use IP-address or hostname and domain in soap_url. Port number is the same as for ISPConfig panel.

Activate Plugin

Edit Roundcube configuration, in file /etc/roundcube/config.inc.php. Search for "List of active plugins". Debian Stretch does not enable any plugins by default, so the list is empty unless you have already enabled some plugins. If the list is empty, i.e. looks like this:

// List of active plugins (in plugins/ directory)
// Debian: install roundcube-plugins first to have any
$config['plugins'] = array(
);

just replace it with this:

$config['plugins'] = array(
"jqueryui","ispconfig3_account", "ispconfig3_autoreply", 
"ispconfig3_autoselect", "ispconfig3_pass", "ispconfig3_spam", 
"ispconfig3_fetchmail", "ispconfig3_filter", 
"ispconfig3_forward", "ispconfig3_wblist"
);

The order of plugins is important! Do not change the order unless you know what you are doing.

If it was non-empty, add the ISPConfig3 plugins after the existing plugins. If some plugin is not needed, remove it from the list and it is no longer enabled.

If you are using only one mail host, do remove the ispconfig3_autoselect plugin, since you do not need it that case and it creates just problems if you fail to configure it properly.

I removed ispconfig3_forward because I noticed errors in /var/log/roundcube/errors for line 135 in file ispconfig3_forward/ispconfig3_forward.php.

Copy Plugin to system location

Now you must copy the plugins from the checkout directory to /var/lib/roundcube. Do it for example like this:

cd /root/ISPConfig3_plugins
for f in ispconfig3_* ; do echo $f ; cp --recursive $f /var/lib/roundcube/plugins/ ; done

Testing

If the new Plugins are shown in Settings, but clicking them pops up error message "Soap Error: Not Found" or "Soap Error: Bad Request" check the soap_url setting. Maybe it is missing slash character "/" at the end.

Test and enjoy. There is a 5th item in the Settings menu created by these plugins.

RoundCube account

If you get errors, read Troubleshooting FAQ by ISPConfig3 plugins author from https://github.com/w2c/ispconfig3_roundcube/wiki/Troubleshooting---FAQ. If that does not help, read logs from /var/log/roundcube/errors. If you still have problems, see other logs in /var/log and /var/log/apache2 directories. If nothing helps, check you have installed the server according to the Perfect Server Guide. I have been told the VM image does not have php-soap installed, and the ISPConfig installed by script also lacks this PHP package.

Share this page:

Suggested articles

10 Comment(s)

Add comment

Comments

By: Petros at: 2018-12-05 22:55:06

To make your tutorial work with ubuntu 18.04 i had to change 

$config['soap_validate_cert'] = true; -> to false

Is this expected? Is something dangerous?

By: Taleman at: 2019-01-30 13:00:39

Do you have certificate for the host+domainname of the mail server?

By: Cesar Vasquez M at: 2019-06-13 23:28:12

Good evening, install the plugins for aroundcube in ISPConfig Version: 3.1.13p1 on CentOS 7.6 with PHP 7.2 login fine but when selecting in the configuration gear gives HTTP ERROR 500.

in the log error of the roundcube shows

[13-Jun-2019 20:10:09 America / Argentina / Buenos_Aires] PHP Parse error: syntax error, unexpected '<' in

/usr/share/roundcubemail/plugins/ispconfig3_account/config/config.inc.php.dist on line 6

 

Any idea that can be?

thank you

regards

Cesar

By: 30uke at: 2019-07-22 19:03:25

Thanks! I love this plugin and this great HOWTO. You are worth you weight in gold :-)

By: Taleman at: 2019-10-05 06:40:33

Author here.

This paragraph in tutorial is seem to be incorrect:

I did not tick Remote Access:, my setup has separate e-mail server where mail files and Roundcube and Dovecot are installed. So even though this is "remote user" it does not need remote access in my case.

So if you get the error message:

An error occurred. Soap Error: The login is not allowed from <host ip-number>

then turn turn on Remote Access.

This may be due to different OS versions doing things differently.

By: Taleman at: 2019-11-01 17:31:09

Author here again.

I tested tutorial on Debian 10 Buster. Works fine, except:

 Tutorial worked exactly on Debian 10 Buster, except that now ispconfig3_account/config/config.inc.php has one more line:

 

$config['soap_validate_cert'] = true;

This can stay at value true, if the certificate is properly set up and tested. If, however, host does not have a valid certificate, change this setting to false.

By: Taleman at: 2020-01-30 10:24:34

Discussions on Forum brought to my attention that current version has changed the name of configuration variable from 

$rcmail_config to $config. Otherwise the tutorial works for me on Debian 10. 

Also from Forum discussions: Author of the roundcube plugins has Installation instructions, they are linked to in the first paragraph of my Tutorial. Check those for updated installation instructions. 

By: AndiStern at: 2019-10-27 21:28:57

I'd sugest mentioning to specify the FQDN - so that certificate validation will work.

I had also to enable remote access and specify an IP Adress other than 127.0.0.1 to make it work ( using ISPConfig 3.1.13 )

regards

By: 30uke at: 2020-01-25 09:12:49

I did update from Debin 9 (Stretch) to 10 (Buster) a while ago. For some reason the plugin does not seem to work anymore since then. I did notice this error message "Soap Error: looks like we got no XML document". I did notice the comment of Taleman about "$config['soap_validate_cert'] = true;" in the config file on Buster. I did change this to "false"; it didn't help. I did also notice the line "?>" was missing (line of PHP code was not closed). I did add that too. My file looks like this:

?php

$config['identity_limit'] = false;

$config['remote_soap_user'] = 'rcmail-remote';

$config['remote_soap_pass'] = 'this_is_not_my_real_password';

$config['soap_url'] = 'https://s1.thisisnotmyrealdomain.nl:8080/remote/';

$config['soap_validate_cert'] = false;

?>

I did verify the soap remote password and the soap remote url. These seem to be correct. 

Any ideas? Thanks :-)

By: 30uke at: 2020-01-25 22:13:45

With regards to my previous comment: the problem has been resolved. I had a .htaccess file which was too strict. Thanks.