Hi all, I need your help to test a script I wrote. This script allow you to import Roundcube sieve filters to Webtop. It is not simple to find a solution to import all filters, but it can works pretty fine.
Some Roundcube filters are not implemented in Webtop. Sometimes I found a workaround. The only filter type that is not supported by the script is “Answer with message”. Eventually you can create an Automatic Response directly in Webtop.
I can’t test all type of configurations, your help is really appreciated.
- Access at least one time with username without domain or impersonating (without @ and *root in username filed)
- Access and activate users in Webtop: if you can’t access users one by one you can activate them via admin panel, under Users management.
- Get Roundcube database password. It is in
/etc/roundcubemail/config.inc.phpfile and you can retrieve it whit this command:
grep db_dsnw /etc/roundcubemail/config.inc.php
The output will be:
$config['db_dsnw'] = 'mysql://roundcubemail:*dbroundcubepass*@localhost/roundcubemail';
- Import script into NethServer with the following command:
wget https://raw.githubusercontent.com/federicoballarini/webtop5-scripts/master/rcube2webtop.php. You can save it in any directory.
- Open the script with vim and insert database password by replacing text on line 14.
- You can execute the script with
/usr/bin/php /var/www/html/rcube2webtop.php user domain.ext
/var/www/htmlwith the path where you’ve saved the script. You can replace
allto import all users filters. Use main domain in case of multi-domain configurations.
- Actually the script shows the output but I think it will be better to save it into a log file.
- In case of “Answer with text” it will be show the following text
ERROR: ANSWER WITH TEXT NOT SUPPORTED.
- In case of problems with rules it will show an alert as this:
- At the end of the scripts each user had to go into Webtop and activate filters, after a check. To enable them, you have to change configuration on the right and set “webtop5”. Then you have to press “Save and Close” to write sieve filters file.
If you want to enable filters without user login, you can enter as user with impersonate (
- Check filters before activate them!
I wait some feedback to improve this script.
Thank you all!