Author Topic: Sievefilter and dovcot  (Read 6119 times)

Offline anuschka

  • Jr. Member
  • **
  • Posts: 13
Sievefilter and dovcot
« on: June 04, 2015, 04:53:56 AM »
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.

« Last Edit: June 04, 2015, 04:58:58 AM by anuschka »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: Sievefilter and dovcot
« Reply #1 on: June 05, 2015, 03:00:54 AM »
Quote
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)?

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.

Quote
I 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…

Offline anuschka

  • Jr. Member
  • **
  • Posts: 13
Re: Sievefilter and dovcot
« Reply #2 on: June 05, 2015, 03:57:49 AM »
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!
« Last Edit: June 05, 2015, 04:12:58 AM by anuschka »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: Sievefilter and dovcot
« Reply #3 on: June 05, 2015, 11:18:08 AM »
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…

Offline anuschka

  • Jr. Member
  • **
  • Posts: 13
Re: Sievefilter and dovcot
« Reply #4 on: June 08, 2015, 06:13:19 AM »
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:
Code: [Select]
// 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.
« Last Edit: June 08, 2015, 06:35:44 AM by anuschka »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: Sievefilter and dovcot
« Reply #5 on: June 08, 2015, 07:52:32 AM »
Looks like you changed the wrong config file
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline anuschka

  • Jr. Member
  • **
  • Posts: 13
Re: Sievefilter and dovcot
« Reply #6 on: June 08, 2015, 07:57:15 AM »
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.
« Last Edit: June 08, 2015, 08:17:18 AM by anuschka »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: Sievefilter and dovcot
« Reply #7 on: June 08, 2015, 12:43:20 PM »
Quote
I 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…

Offline anuschka

  • Jr. Member
  • **
  • Posts: 13
Re: Sievefilter and dovcot
« Reply #8 on: June 09, 2015, 02:07:42 AM »
Hi,

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

Code: [Select]
// 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!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: Sievefilter and dovcot
« Reply #9 on: June 11, 2015, 06:36:17 AM »
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:
Quote
When 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…