Roundcube Community Forum

 

Managesieve patch

Started by JohnDoh, November 30, 2008, 06:00:56 AM

Previous topic - Next topic

roe1234

I've been playing with the sieve add-on for Tbird as well as this one.  The only "negative" side affect is that rules created by the tbird patch are not seen by the roundcube plugin because of the the CRLF, as soon as I remove the CR, it shows up.

kokisan

Hi JohnDoh,
great work. I'm trying to run sieve script in Exim&Cyrus enviroment. There is a problem with generated .script file. Exim needs "# Sieve filter" on the first line of the file.
See Exim Filter Specification chapter 2 for specification. When I add this text on the first line, the sieve script works fine. Is there any variable where can I add this first line prefix?

JohnDoh

Hi Kokisan,
There is no config variable to set a header but its really easy to edit the script to do it. open plugins/sueverules/rcube_sieve_script.php, find this at the end of the as_text function:
// requires
$exts = array_unique($exts);
if (sizeof($exts))
$script = 'require ["' . implode('","', $exts) . "\"];\n" . $script;

return $script;

change it to something like:
// requires
$exts = array_unique($exts);
if (sizeof($exts))
$script = 'require ["' . implode('","', $exts) . "\"];\n" . $script;

return "# Sieve filter\n" . $script;
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

kokisan

Hi JohnDoh,
thank you for the patch. It works perfectly.

jalbstmeijer

It seems both the 'managesieve roundcube patch' and the 'avelsieve squirrelmail plugin' depend on custom commented lines in the sieve script.
This seems to make it impossible to use both sieve extentions side by side.
Or is there an other reason,  the 'managesieve roundcube patch' does not see the 'avelsieve squirrelmail plugin' created rules.
By adding a rule trough 'managesieve roundcube patch', all 'avelsieve squirrelmail' rules get overwritten.

Justin.

JohnDoh

Quote from: JohnDoh;15525The rule files on the server are written in a certain way that this code can understand so editing rules with other clients will not work.

In a future version there should be a way to import filters from avelsieve (or others) into this plugin i think but at the moment there are no plans. I dont use avelsieve and have no examples to work from.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

myo

Hi!

Sorry for hijacking this thread but is there a way of getting a managesieve-patch for roundcube 0.2.2 stable? The latest managesieve-patch (r2400) doesn't work because of rejected hunks and i don't want to upgrade to roundcube 0.3-beta. Or is it possible to get the roundcube 0.3-beta managesieve-plugin working for roundcube 0.2.2?

I would be glad if someone could help me with my problem.

Greets
myo

JohnDoh

I moved your post to the thread about the patch rather than the plugin, I hope thats OK. I'm guessing the only rejected hunks are in app.js, is that right? If so try renaming app.js.src to app.js and the patch r2400 patch might work.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

deichels

Hi,

I tried to rename app.js.src to app.js to get the sieverules.BETA.r2400.patch running with roundcube 0.2.2, but it didn't work. There is no "filter"-tab in the preferences in the frontend shown.

The problem seems to be regarding that output:

patching file plugins/sieverules/sieverules.php
patching file program/js/app.js
Hunk #1 FAILED at 287.
Hunk #2 FAILED at 300.
Hunk #3 FAILED at 1079.
Hunk #4 FAILED at 2843.
4 out of 4 hunks FAILED -- saving rejects to file program/js/app.js.rej

Is there any possibility to get the sieve-features running under the actual stable version of roundcube?

Thanks a lot,
Peter

JohnDoh

Hi,

I just tried it and it defiantly works for me. The filter tab shows up just as expected. Can you track down why the patch didn't apply? Have you applied any other patches? The only message I got was about an offset in program/localization/en_US/labels.inc. I think 0.3 stable will be out in a few weeks any way so if you really cant get it to apply then just wait till then and you can use the plugin. I know its an idea solution but its the best I can offer I'm afraid.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...