Roundcube Community Forum

 

Sievefilter and dovcot

Started by anuschka, June 04, 2015, 04:53:56 AM

Previous topic - Next topic

anuschka

Hello,

I installed the version 2.2 of sievefilter on roundcube 1.1.1.

Why do I get the following error in [04-Jun-2015 10:55:02 +0200]: <me9jh0n8> PHP Error: SieveRules plugin: Unable to open file /etc/dovecot/sieve/example in /usr/share/roundcubemail/plugins/sieverules/sieverules.php on line 2874 (POST /roundcubemail/?_task=settings&_action=plugin.sieverules.save)?

I do not have dovcot. Do I need to install it and how do I configure it?

Please advice.


JohnDoh

QuoteWhy do I get the following error in [04-Jun-2015 10:55:02 +0200]: <me9jh0n8> PHP Error: SieveRules plugin: Unable to open file /etc/dovecot/sieve/example in /usr/share/roundcubemail/plugins/sieverules/sieverules.php on line 2874 (POST /roundcubemail/?_task=settings&_action=plugin.sieverules.save)?

That error would suggest that you have made an error in the configuration of the sieverules plugin. You need to correct the $config['sieverules_example_file'] option in the sieverules config file.

QuoteI do not have dovcot. Do I need to install it and how do I configure it?

You do not have to have Dovecot but you do need a IMAP server which supports sieve and the managesieve protocol.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

anuschka

#2
Hello,

We use Cyrus instead of Dovecot.

The sieverules config files has the following entires pointing to the dovcot installation:
// Default (or global) sieve rule file
$config['sieverules_default_file'] = '/etc/dovecot/sieve/default';

// Auto load default sieve rule file if no rules exist and no import filters match
$config['sieverules_auto_load_default'] = FALSE;

// Example sieve rule file
$config['sieverules_example_file'] = '/etc/dovecot/sieve/example';

Can I point it somewhere else for the sieveruls_example_file and for the sieverules_default_file. What is sieverules expecting there?

Best regards!

JohnDoh

Those paths are just exmaples you can set them to anything you want (as long as the user that php/webserver runs as can read them. Or remove the paths to not use those options.

The files themselves should be rule files in the same format as those generated by SieveRules
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

anuschka

#4
Hi,

I changed the example and default file location to a new location where root:apache has read rights.

I also created an example and default file but I am still getting the following error:
[08-Jun-2015 11:51:17 +0200]: <rbfu27se> PHP Error: SieveRules plugin: Unable to open file /etc/dovecot/sieve/example in /usr/share/roundcubemail/plugins/sieverules/sieverules.php on line 2874 (POST /roundcubemail/?_task=settings&_action=plugin.sieverules.save)

I am not refering to /etc/dovcot/sieve/example in my config file:
// Default (or global) sieve rule file
$config['sieverules_default_file'] = '/usr/share/roundcubemail/plugins/sieverules/default';

// Auto load default sieve rule file if no rules exist and no import filters match
$config['sieverules_auto_load_default'] = FALSE;

// Example sieve rule file
$config['sieverules_example_file'] = '/usr/share/roundcubemail/plugins/sieverules/example';


I also do not see any default rule in my UI if I do not have any sieverules configured under my user ID.

JohnDoh

Looks like you changed the wrong config file
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

anuschka

#6
I changed the config.inc.php in the sieverules directory. What is the correct location for changing the configuration that currently points to /etc/dovecot/sieve/example? From what I understand the configuration for sieverules is in config.inc.php.

JohnDoh

QuoteI changed the config.inc.php in the sieverules directory.
That is the normal place for it but since the changes had no effect I'm guessing that in your setup you've got the config files somewhere else. There is no way I can guess where they might be.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

anuschka

Hi,

When I comment the example file in the config.inc.php, I do not get the error message:

// Example sieve rule file
//$config['sieverules_example_file'] = '/usr/share/roundcubemail/plugins/sieverules/example';


How can I get the example and default sieverule to work?

Best regards and thanks!

JohnDoh

First you said that when you changed the config it had no effect and that you still not the error in your log:
Quote[08-Jun-2015 11:51:17 +0200]: <rbfu27se> PHP Error: SieveRules plugin: Unable to open file /etc/dovecot/sieve/example in /usr/share/roundcubemail/plugins/sieverules/sieverules.php on line 2874 (POST /roundcubemail/?_task=settings&_action=plugin.sieverules.save)
Then you said:
QuoteWhen I comment the example file in the config.inc.php, I do not get the error message:
The message you got would have had the new path in not the default one so you must have done something else. All I can suggest is you check you are changing the correct config files, that you make sure that the file is correctly formatted (the easiest way to do that is to use SieveRules to make a rule file and then copy it) and that the user that the webserver/php runs as can access the file.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...