RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Third Party Contributions > API Based Plugins

For more information about the ads and why they're here, please see the FAQ

Reply
  2 links from elsewhere to this Post. Click to view. #1  
Old 11-30-2008, 11:00 AM
Super Moderator
 
Join Date: May 2007
Posts: 666
Default Sieverules plugin

Hi,

Here is a plugin to integrate management of Sieve filter rules into RC. The plugin uses the managesieve protocol to communicate with the server. The original code for this plugin was taken from Alec’s Roundcube managesieve patch Roundcube :: Managesieve plugin (now the managesieve plugin available from the RoundCube repo) I just changed the UI and added a new option or two, Alec did all the hard work! The plugin has been tested with Dovecot-managesieve.

The 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.

For more information or to download the plugin please visit RoundCube Patches & Plugins
__________________
RoundCube Patches & Plugins: Managesieve, SpamAssassin Prefs, and more…

Last edited by JohnDoh; 06-09-2009 at 06:31 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 05-09-2009, 10:35 AM
zoc zoc is offline
Registered User
 
Join Date: May 2009
Location: Antibes, France
Posts: 2
Send a message via AIM to zoc Send a message via MSN to zoc Send a message via Skype™ to zoc
Default Sieverules (managesieve) plugin

Hi

I'm using the sieverules plugin with roundcube trunk and It works like a charm. The lack of sieve support was one of the things that kept me using squirrelmail & avelsieve for months. I have to say that last week I trashed squirrelmail, and now roundcube is the only webmail I use on my server.

(The last thing I'm missing is the ability to manage spamassassin setting into an LDAP tree instead of SQL, but this is another story...).

So, first of all, many thanks to the sieverules author(s).

I have some questions/remarks about the plugin:
  1. The plugin generates a big if/elseif rule. So in my mind, the "stop processing more rules" action is useless because when entering an "action" block, no other block will ever be entered.
  2. Thinking about the previous remark, how can I execute 2 rules, for example: Mark every incoming mail as important if it contains specific words in the subject field, and then move the mail to a folder dedicated to each sender ?
  3. The "Sender" address does not work on my postfix/cyrus-imap server. It does not match the "From" header. How could I add the "Sender" header with postfix ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 05-09-2009, 05:21 PM
Super Moderator
 
Join Date: May 2007
Posts: 666
Default

Hi,

Thanks for the feedback, I’m glad you like the plugin .

Quote:
Originally Posted by zoc View Post
1. The plugin generates a big if/elseif rule. So in my mind, the "stop processing more rules" action is useless because when entering an "action" block, no other block will ever be entered.
You’re right, the way the rules are currently written there is no point in having a stop action. It is there for historical reasons and also from completeness. Whilst it will have no effect it does not do any harm. If you want you can turn it off in the config so it won’t appear in the UI.

Quote:
Originally Posted by zoc View Post
2. Thinking about the previous remark, how can I execute 2 rules, for example: Mark every incoming mail as important if it contains specific words in the subject field, and then move the mail to a folder dedicated to each sender ?
If you check the readme in the next version (should be out tomorrow I hope) you will find some instructions on how to make the plugin writes the rules as separate if statements rather than if … elsif. Changing the way the rules are written would be the only way to achieve this.

Quote:
Originally Posted by zoc View Post
3. The "Sender" address does not work on my postfix/cyrus-imap server. It does not match the "From" header. How could I add the "Sender" header with postfix ?
I’m sorry I have no idea, I know nothing about Postfix
__________________
RoundCube Patches & Plugins: Managesieve, SpamAssassin Prefs, and more…
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 05-09-2009, 07:39 PM
zoc zoc is offline
Registered User
 
Join Date: May 2009
Location: Antibes, France
Posts: 2
Send a message via AIM to zoc Send a message via MSN to zoc Send a message via Skype™ to zoc
Default

Thank you for your answers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 05-13-2009, 02:48 PM
Registered User
 
Join Date: May 2009
Posts: 3
Thumbs up

Hello,

I'm very impressed about the script but I have a problem.


I have a global sieve rule to move spam into the Junk folder. Not very impressing. But when I add a custom sieve rule in roundcube the global rule has no effect anymore.


Maybe someone can help me?

Dovecot deliver, amavis, sieve (of couse )

If you need further informations, ask

thanks,
kase

Last edited by kase; 05-13-2009 at 07:49 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 05-14-2009, 09:35 AM
Registered User
 
Join Date: May 2009
Posts: 3
Default

Maybe it's possible to put this in the user sieve rule file:

Code:
require ["include"];
include :global "/home/vmail/global-spam.sieve";
But I don't know in witch file I have to add this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 05-14-2009, 11:03 AM
Registered User
 
Join Date: Feb 2009
Posts: 1
Default Problems between info and managesieve patch

Hello JohnDoe

You plugin is wonderful, I have just one problem. I can't import ingo scripts with your importer by default.

Can you explain to what is the problem ? Because I have more than 20 sieve rules in ingo and they are not recognized by the plugin.

It's successful if I add them but it overwrite my rules, but I can't import them.

Is there a solution ?

I'm very sorry for my bad english.

Regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 05-14-2009, 06:10 PM
Super Moderator
 
Join Date: May 2007
Posts: 666
Default

kase: the plugin does not support the include extension but in recent versions of the plugin you have been able to specify a default rule file in the config, this was originally loaded automatically if you had no rule file of you own but in the latest version you are shown a setup screen which lets you “use default rules”. This will save the default rules to your rule file, meaning you don’t loose anything when you start adding your own. I’m guessing you lost your original ones because the server only uses the global rule file if you don’t have any of your own.

vincenth: the import filters are no where near perfect but I did make one little change to the INGO one that isn’t on the website yet which seems to help it pick up more rules. (attached file: ingo.txt should be renamed ingo.php and put in the importfilters folder, replacing the existing one).

I don’t have access to an INGO system so I can only work with the limited examples I have and I do not have much time to work on the filters. If you have the time perhaps you would like to create a better one.
Attached Files
File Type: txt ingo.txt (1.2 KB, 35 views)
__________________
RoundCube Patches & Plugins: Managesieve, SpamAssassin Prefs, and more…
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 05-14-2009, 07:51 PM
Registered User
 
Join Date: May 2009
Posts: 3
Default

Hello JohnDoh,

witch setup screen do you mean?

Thanks,
kase
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 05-16-2009, 12:11 PM
Super Moderator
 
Join Date: May 2007
Posts: 666
Default the setup screen

when a use loads the filters screen the plugin first checks to see if they already have a rule file (even if it is empty). If they have nothing then the plugin checks for the presence of a default rule file (set in the config) and if it can read it then it gives the user to option to load these default rules (screenshot attached).

The plugin also looks in the user's sieve folder to see if they have any other rule files and tests these against the import filters to see if they can be used. In the attached screenshot you will see that the plugin found a rule file from INGO and so the user has the choice to use the default file, the INGO one, or skip and start a fresh set of rules. If no default rule file is defined and no filters are available for import then no message is displayed. The user just has the option to create new rules like normal.
Attached Images
File Type: jpg sieverulessetup.jpg (23.0 KB, 133 views)
__________________
RoundCube Patches & Plugins: Managesieve, SpamAssassin Prefs, and more…
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/4878-sieverules-plugin.html
Posted By For Type Date
#1486078 (managesieve does not allow more than one match) ? RoundCube Webmail This thread Refback 09-02-2009 12:40 PM
RoundCube Patches & Plugins This thread Refback 06-09-2009 08:37 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:16 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2006-2008 RoundCube Webmail Community