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

19 Comment(s)

Add comment

Comments

By: Petros

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

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

By: Cesar Vasquez M

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

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

By: Taleman

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

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

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

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

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

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

By: fordwrench

Just did this on my new server and it works great!  Thanks for the tutorial!

By: Sarunas

Hi, just installed plugint to my new server with Debian10.

Added remote user as in tutorial. I did change last line to "false" and also added missing "?>" at the end of the file and now file looks like this:

?php

 

$config['identity_limit'] = false;

 

$config['remote_soap_user'] = 'my_remote_user';

 

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

 

$config['soap_url'] = 'https://192.168.x.xxx:8080/remote/';

 

$config['soap_validate_cert'] = false;

 

?>

After login to roudcube as mail user I can see all installed plugins but gettting error Soap Error: Could not connect to host.

Any ideas?

By: lonerunner

I am getting an error "Soap Error: Internal Server Error", i looked in log files and there's nothing related to the error in log files.

By: Taleman

As mentioned in Tutorial, the plugin author has troubleshooting instructions:

https://github.com/w2c/ispconfig3_roundcube/wiki/Troubleshooting---FAQ

By: kameleon1er

sorry man, i don't understand anything! i try to follow, but svn for example wasn't installed in my debian, and it's already a big weird thing to understand for me as linux-padawan. 

It's nice what you're doing, giving sources and experience for free to everyone, but try not to forget that in 'everyone' there are people who are not necessarily specialists like you.

Maybe you should indicate at the beginning of the tutorial the degree of skill required and the date of creation as well.

For example you write : 

"editor ispconfig3_account/config/config.inc.php"

 

I guess you have to understand "nano ispconfig3_account/config/config.inc.php"?

 

then it's in my configuration a file that doesn't exist. Is this normal? 

 

then you write : "the original file looks like this" ...

 

///// <?php

$rcmail_config['identity_limit'] = false; ////// etc...

 

original from where?

 

 

It's okay, but think about it. Thank you.

Translated with www.DeepL.com/Translator (free version)

By: DDArt

This doesn't work on Debian 10. I tried several options, fixed the close php and copied the full directory including the ispconfig3_.* folders in all areas, /etc/roundcube, the /usr/share/roundcube and even went as far as removing the .htaccess file in case it was too restrictive. did the cert false and true.. still No Account.

By: DDArt

My fix was the following. $config['plugins'], that was inside the config file twice, up top 20 lines and way lower towards the end of the file. Not sure why, commenting out the lower part and leaving the upper part the way it is in the tutorial worked for me. Reverted back to ssl true and put back my .htaccess and works just fine.

By: FredZ

When entering rules from within the plugin I now get the following error.

Error: Limit reached

However I can add them directly through the ISPconfig UI (as admin) and they appear in the plugin UI. So I can enter a rule within IPSC but no longer in the RC plugin.

By: Leoncio Jose Antonio Eder

a little problem

soap error could not connect to host Ubuntu 20.4 Ispconfig 3 3.2.8p1

 

<?php

$config['identity_limit'] = false;

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

$config['remote_soap_pass'] = ' rcmail-remote2020';

$config['soap_url'] = 'https://pppppp.com.ar:8080/remote/';

$config['soap_validate_cert'] = false;

?>

 

it'a ll ok with that