Roundcube Community Forum

 

Sieverules (managesieve) plugin

Started by zoc, May 09, 2009, 05:35:25 AM

Previous topic - Next topic

alavaliant

Thanks,  I'll do some testing with that logging line and get back to you with a sample if I don't make progress next week (right now I'm having trouble narrowing things down to a consistent working example)

alavaliant

for now it's looking like my filter import problems was actually something I was somehow creating?   I'd been testing several of my user's filters by coping their sieve rules into a test account (using the thunderbird sieve extension for the editing) and then running the import on them.    

Via that method I was having trouble but I had a user try doing the import on their account and it worked.    I suspect the thunderbird sieve editor was adding extra white space/odd line returns or some other X factor that the import system got upset at.  (and changing the order of rules in squirrelmail was removing whatever that odd factor was hence why it looked like rule order was effecting things initially)    I'll return to debugging if I see future imports fail but for now it's looking good.

totoche

hello
I am new and I have a problem roundecube plugin configuration sieve
I installed the plugin by modifying the line
Quote$ Rcmail_config ['plugins'] = array ('sieverules');

tab appears in
Quotepreferences

but when I click on the tab, the displayed page is empty

ps: excuse my English googlelisé :)

thank you

OlivierShop

Hi

I'm a new RC user and I have installed "Sieverules plugin" (thank you for this plugin) but I have a problem to install.

My configuration :
RC : 0.4.2
Sieverules plugin : 1.9

I have install RC in my server :
"/etc/roundcube" and "/etc/roundcube/plugins/sieverules"

For main.inc.php, I've active :
// List of active plugins (in plugins/ directory)
$rcmail_config['plugins'] = array('sieverules');

I've rename "config.inc.php.dist" on "config.inc.php"

If I connect in RC, I've "Filter" but the error message is "Impossible to connect on server sieve"
And no filters appear.

Can you help me to configure this ?

Thanks you very much :)

Olivier

JohnDoh

#274
have you changed $rcmail_config['sieverules_host'] in /plugins/sieverules/config.inc.php to the correct hostname for your managesieve server and similarly the correct port in $rcmail_config['sieverules_port']? also please check the rc error log for any other information.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

OlivierShop

I have no changed this, I don't know what I must change :(

$rcmail_config['sieverules_host'] = 'localhost';
$rcmail_config['sieverules_port'] = 2000;

And I don't know where the Log RC is ! I must configure it ?

JohnDoh

sieverules is a managesieve client, it connects to your server and allows you to setup filtering rules which are used when delivering mail. I can't tell you what the values for these config options should be since it depends entrily on your setup the sieverules_host is probably going to be the same as your imap host though.

QuoteAnd I don't know where the Log RC is ! I must configure it ?

by default the logs are written in [rc root]/logs/
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

modules

Greate plugin :)

Is it possible to have a "Filter messages like this" button(like in gmail). After selecting a mail (or multiple) you will get the "add new filter" form with prefilled header informations.

madal

The sieverules is good and works. But i come up with one issue. we have a squirell mail earlier so i setup up lots of rules there. When I connect rouncube to imaphost and click on filter plugin it detects the sieverules on the server so it asked to import those rules and message pops up as this :

No existing filters detected!

Import filters: Another set of filters from Squirrelmail (Avelsieve) has been found. Would you like to import these filters into your current set?

Then when I click on Import Filters it does not do anything.

Here is the error message when importing filter rules:

14-Jan-2011 08:21:21] {57}script errors: line 3: syntax error, unexpected HEADER (3):
[14-Jan-2011 08:21:31 +0000]: PHP Error: SieveRules plugin: Unable to open default rule file in /var/www/html/roundcube/plugins/sieverules/sieverules.php on line 407 (GET /roundcube/?_task=settings&_action=plugin.sieverules.setup&_framed=1)
[14-Jan-2011 08:29:54] {57}script errors: line 3: syntax error, unexpected HEADER (3):

can anybody give me some hint on this or this is a bug too.

Madal

ambolt

I can't get this plugin to work. When I click the "Filters" tab, I get a blank window. I haven't changed anything in the default settings.

I'm pretty much a newbie when it comes to sieve, but I did get the managesieve plugin to work without any problems. I'm using Roundcube 0.4.2, running on a Mac OS X Server.

JohnDoh

medal: looks like you have 2 problems 1. the import - you just have to fiddle with the importfilter for that, the one that distributed is very simple proof of concept. 2. "SieveRules plugin: Unable to open default rule" in your config you have specified a default rule file that the webserver cant read.

ambolt: a few people have posted this, if you look back though this tread you'll see that downloading the right version of the plugin for your version of RC usually sorts it ;)
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

ambolt

Thanks - that did it. :-)

madal

Hello JohnDoh

thanks for your prompt response. I am assuming managesieve and sieverules are not the same pluginn. I tried both to see the outcome. With the sieverules is there a working import file config ??

With managesive, when i enable this pluginn - I can see all my message filter that I added in sqirellmail and works but then when i go back to my squirell mail message filter there are no filters listed and message looks like this :

Debug: Using Backend: ManageSieve.

Is there a way to keep these rules in both roundcube and squirell mail or maybe not

Madal

JohnDoh

yes sieverules and managesieve are different. you could try this version of the import filter, not sure if its better or worse https://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/blob/a9fe874a184ec16e17d12ca00387655a44795c4b/importFilters/avelsieve.php

sieverules was based on the managesieve plugin so they both use the same structure for the rule file. the squirrelmail plugin wont understand it. for the same reason as you have to do an import to get the filters created by squirrelmail into something sieverules/managesieve can understand.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

fritz001

Hello JohnDoh

Finally I've managed to find howto enable folder autocreation if not exists::

require ["fileinto","mailbox"];

# rule:[important]
if anyof (header :contains "From" "postmaster")
{
   fileinto :create "INBOX.admin";
}

My second problem is : the use of default rule:

cat /etc/dovecot/sieve/global.sieve

require ["fileinto","mailbox"];

# rule:[[spam]]
if (header :contains "X-Spam-Flag" "YES")
{
   fileinto :create "INBOX.Spam";
#   stop;
}

cat /srv/www/mailcube/plugins/sieverules/config.inc.php

.....
// Allow users to use multiple rulesets
$rcmail_config['sieverules_multiplerules'] = TRUE;

// Default (or global) sieve rule file
$rcmail_config['sieverules_default_file'] = '/etc/dovecot/sieve/global.sieve';

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

So, if both default rule exist ( global.sieve) and user defined rules, default rule is not load and not applied.

Am I missing something ?!!?!