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.
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.
Is this plugin: Roundcube :: Managesieve plugin (http://alec.pl/roundcube/managesieve/) the same as the plugin the this thread?
no, Roundcube :: Managesieve plugin (http://alec.pl/roundcube/managesieve/) is the orginial managesieve patch made by Alec (one of the RC developers) this thread is about RoundCube Patches & Plugins (http://www.tehinterweb.co.uk/roundcube/#pisieverules) a plugin which was based on Alec's work but is totally seperate.
A little feedback with the latest plugin and current trunk.
1. I had to change sieverules.php line 683 to $rcmail->decrypt($_SESSION['password']).
2. It would be great to be able to customize the Filter drop-down, "Sender" doesn't work for me, I have to use "Envelope From".. (What's the difference between these anyway?)
3. I still can't use the "Mark message as" function (debug från pysieved):
=== S: 'NO "Info: line 80: flag \'\\\\flagged\': not a system flag"\r\n'
Changing line 1310 in sieverules.php to only \\Flagged instead of \\\\Flagged worked for me. The rule doesn't show up correctly when editing it though, it selects the first alternative instead of the Flagged alternative. But it saved ok, and filtered ok.
Since I updated Dovecot to 1.2, this plugin doesn't work anymore.
When I click New Filter nothiing happens, also when I click on Advanced editor nothing happens.. I still see the roundcube logo and "No filters found".
So no errors. Tested managesieve manually with a terminal connection and there it works fine.
How can I best debug this?
Also found that rcmail::get_instance()->action always returns plugin.sieverules.setup while I'm at the page webmail/?_task=settings&_action=plugin.sieverules.advanced or add filter page.. that's why I get no GUI update..
The problem with first time use should be fixed in the new version please give it a go. I don't want to keep old versions of the plugins knocking around, atleast not until the API is stable.
ok this should fix the JS error, I dont have time to test it properly right now but I think it will work: sieverules.js line 29
change:
rcmail.env.iid && !rcmail.env.eid
to:
rcmail.env.iid && rcmail.env.iid < rcmail.sieverules_list.rows.length && !rcmail.env.eid
looking at the Dovecot wiki it seems that they have swapped notify for enotify and added imap4flags. as far as i can see the syntax for imap4flags is the same as imapflags. looking at the RFC i think that is true for enotify too. I will add support to the plugin when i get time.
It works. Thanks for your support!
ah yes, I can see the error now. I think thats actually a bug in the password plugin, it shouldn't register the template handler when it does. It will stop all other plugins which use the default handler from working. I think the handler should only be registered for the password action or nothing else can add handlers.
Hello.
I'm using roundcube0.3-beta and sieverules associated on a FreeBSD server/php5.2. Sieverules does not work. I have this error:
[error] PHP Fatal error: Call to a member function show() on a non-object in /usr/local/www/roundcube/plugins/sieverules/sieverules.php on line 1162 when I want to create a new rule. I have a blank page.
Tracing enotices error, I have this:
[09-Jun-2009 16:05:20] PHP Notice: Undefined variable: select_id in /usr/local/www/roundcube/plugins/sieverules/sieverules.php on line 1162
[09-Jun-2009 16:05:20] PHP Fatal error: Call to a member function show() on a non-object in /usr/local/www/roundcube/plugins/sieverules/sieverules.php on line 1162
Hope this could help you.
Regards,
Is it possible that you do not have any identities setup in your RoundCube account (Personal settings -> Identities)
I was able to get a similar error by removing all my identities, however, I would like to confirm this is the problem.
Thanks
Thanks, I just wanted to make sure that was the problem. You are correct the plugin should not error if there are no identities and following the changes I made this morning (available in the repo) it will not.
I'm not sure why sieve_before in your Dovecot config as I understand from what it says in the manual it should allways be run before user scripts but I have never tried it myself.
Managesieve and the sieve plugin are not the same thing. Managesieve is a protcol via which a user's sieve rules can be managed. The sieve plugin is the thing that does the work.
For the default_file config option in the plugin, you want the non complied version of the file and make sure it can be read by what ever user your webserver runs as. Then you need to delete the roundcube.sieve file from your .sieve directory. The default file is only checked when non user defined rules exist (and the roundcube.sieve file doesnt exist).
hmmm ok so this looks like a bug, it shouldnt create a blank file when setting the default, unless ofcourse the default file is blank. What version of RC are you running? if its trunk then you can try with the lastest versioni of the plugin, I cant remember exactly when it was but I made some improvements to the way the files are loaded. Or could you attach your default sieve file? I can put it in my setup and see if I can figure it out.
easy, you have to use the 0.3-beta version of the plugin for 0.3-beta RC, not the latest development one. :)
ok, silly question then...
From your plugins page, is that the latest working version for the current codebase then?
If so, then where would I even get the 0.3 beta version of your plugin?
maybe it would be easier to just check out the latest version of roundcube from subversion, and that would get it working, right?
On the plugins page there are links to both the latest dev version, and the 0.3b version. The latest dev version works with the latest version of roundcube from subversion. 0.3b tar.gz file (http://tiw.ghost.sitespider.co.uk/roundcube/plugins/sieverules.0_3b.tar.gz)
0.3b Zip file (http://tiw.ghost.sitespider.co.uk/roundcube/plugins/sieverules.0_3b.zip)
ok, I got the sieverules plugin to work by updating everything to a recent SVN version...
but, it looks like the rule option for imapflags isn't showing any values.
i.e. when I choose to "Mark message as", there is nothing to the right that would let me choose anything...
Tim.
Just verified that I couldn't see any of the "Mark message as" choices in IE as well as Firefox...
It appears that in the source, the values are there, but when selected, it does not activate the menu to choose the imap flag value...
I do not see any javascript errors being produced either...
Tim.
i cant recreate this, the drop down shows up just as it should for me in both 0.3b and the latest dev. could you double check there are no JS errors, also try clearing your cache and check the RC error log for any PHP errors? thanks
hmmmmm....
ok, I just got the latest SVN build (2694) and installed it from scratch...
then I got the latest SVN of your sieverules plugin and installed that too...
Still have the problem where it does not show the "Mark message as" list to choose from...
I dont see any javascript errors in the javascript console either, or the errors log in the installation.
I have included a screenshot of what I see.
Kind of baffling...
Tim
it is indeed kind of baffling. look at the source of that page, find \\Seen, it should be in there twice, it is one of the options in the imapflags dropdown, make sure the code for both boxes is generated correctly.
I sent you a PM about a test login for our system that hopefully can help you in determining what you think my issue is...
let me know if you need anything else,
Tim.
I think the problems timtraver was seeing are now fixed in the latest development release. The problem was support for Dovecot 1.2. Thanks to timtraver for his help in debugging.
Latest development release also includes support for Body and Copy extensions and some other minor bug fixes.
The latest development version of the plugin does allow for filtering on the message body (if it is support by your server). latest development version requires the svn trunk version of RC.
To make the plugin write single if statements rather than elseif please check the readme.
looks like you haven't added all of the localization text fields needed by your plugin just yet...
When leaving the subject blank on an autoreply, I get the popup with the message :
[sieverules.vacnosubject]
but I can't find any vacnosubject entry in any of the localization files...
just a heads up
hmmm...well, 0.3 is definitely on the cutting edge, and I know there have been lots of improvements and fixes in the latest SVN builds.
I'm going to bet that the advice that you'll get from the developer will be to update your SVN build of RC as well as get the latest download of the sieverules plugin.
t
Hi All.
I'm trying to understand how to put sieve/managesieve in action on my server.
I'm running FreeBSD + PostFix + Dovecot + RoundCube
I activated managesieve plugin, but when I try to access it from RC, I receive the error: cant connect to managesieve server on port 2000.
The address option is optional, I checked it with my sieve just now and according to the RFC as well. what imap/sieve server are you using?
If you want to make them all checked by default its easy enough, you'll find where they are generated in sieverules.php around line 1294,
$curaddress = in_array($sql_arr['email'], $vacto_arr) ? $sql_arr['email'] : "";
and just change it to
$curaddress = $sql_arr['email'];
First, let me say that Sievefules has been great! I've got it to where I'm able to edit my rules without any problems and the setup has been straightforward so far. Well done!
However, I'm having a problem getting it to import the default_file when a user doesn't have any previous rules setup.
Here's the relevant portion of my setup:
$sieverules_config['default_file'] = '/home/vmail/globalsieverc';
$sieverules_config['auto_load_default'] = TRUE;
I know the file exists and is readable, as it's the global sieve filter and it's processing other users' email. I've even used my own sieve file build with Sieverules to create the global file so it shouldn't have any issues importing it.
I'm not finding any logs that would be useful in figuring out what the hang-up is. dovecot.log shows the managesieve portion but nothing is showing up in the Roundcube errors file.
What am I missing?
Thanks
Thanks! I'm glad you like the plugin.
Check the users .sieve folder on the server and make sure there is no roundcube.sieve file in there, the default file is only coppied if the user doesnt have a roundcube.sieve file. If they have simply deleted their existing rules and have an empty rule file then it will not be coppied.
Just checked. The mailboxes are virtual so I tried it both without the seive directory created at all, and with an empty directory. In both cases the directory showed up with a ./tmp subdirectory but no default rules.
It is working for me, so I am not quite sure what to suggest. Best thing is probably for you to do a bit of debugging and then we can see at what step it fails. You can find the code which coppies the default rule file in sieverules.php around line 208.
Heh. After some in-depth troubleshooting, I figured out that the main issue was PEBKAC.
Due to what I'm attributing as major cerebral flatulation, all of the checking I did was to ensure that the global sieve file was readable by the dovecot user. Astute readers will note that this by no means indicates whether said file is readable by the web server user. *facepalm*
Now that the file is *really* readable by Sieverules, the default file is imported properly. The only issue I see is that if the roundcube.sieve file doesn't exist, it gets imported, but the newly-imported rules aren't editable (or selectable) until I load the page a second time.
I noticed that too, something is wrong there. I will look into it.
D'OH I think i have fixed it, you can see what has to change here http://github.com/JohnDoh/RoundCube-Plugin-SieveRules-Managesieve/commit/f6d27bd4d114757808852f63bfd92fdd189e2996
are you using the plugin from RoundCube Plugins (http://tehinterweb.co.uk/roundcube/) or the one that came with 0.3s? The config variable in sieverules is called default_file not managesieve_default?
This thread is about the sieverules plugin, if you are talking about the one which came with 0.3s then please use a new thread to avoid confusion.
Sorry, I didn't know there are 2 sieve plugins. Yes, I talked about plugin which came with 0.3s called managesieve plugin.
I checked sieverules plugin. Looks better then managesieve, and the default_file works. I tried example_file and it also works but it has some character encoding problem. I created an example file with vacation autoresponse. The subject field contains characters with accents. If I load this example to use, the characters with accents change. I think the encoded version of the characters appears. (or?) This problem is not in the body. The characters are OK in there.
You'll find attached the French translation created using your web interface.
After installing it, all accentuated character looks wrong in roundcube 0.3.
Hope you'll figure out how to fix it ;)
New to this forum and Roundcube. Have Roundcube 0.3 stable with managesieve and sieverules plugins enabled (for comparison) and Dovecot 1.2.5. Both managesieve and sieverules write the sieve rule ok in the user's directory. However, the incoming messages are not being filtered to the chosen folder. They just remain in the In folder. I possible missed something in the Dovecot or Rouncube configuration. Any suggestions?
Check you dvecot deliver log and the dovecot config, make sure dovecot is looking in the right place for the sieve files etc, a guide to setting it up is here LDA/Sieve/Dovecot - Dovecot Wiki (http://wiki.dovecot.org/LDA/Sieve/Dovecot)
I realized this forum is for Sieverules managesieve plugin and not the managesieve plugin. So I enabled the Sieverules plugin but have exactly the same problem. Although the sieve rule is written and dovecot makes an alias to the roundcube sieve rule - no action is taken on incoming mail to filter it to folders. I should add that I have been using filters in other programs for a long time. My standard desktop email program is Evolution using bogofilter and SA filters - which work very well. I also use SA on the servers.
As far as I can tell from the dovecot.log and dovecot-info.log - dovecot 1.2 is working without errors. Also I built dovecot with the the sieve plugin. So I cannot figure out why Roundcube Sieverule is not acting on the rule. Is it relying on Roundcube to move the mail to the appropriate folder or is it relying on the Dovecot sieve plugin? Feeling stupidly baffled. Would appreciate pointers.
On my configuration, the sieverules plugin can't authenticate on the dovecot 1.1 managesieve server.
After some debugging and Wiresharking, I noticed that after the plugin sends and AUTHENTICATE "CRAM-MD5" command, the server sends back a challenge, and then sits waiting for an answer. Sieverules never sends any answer back because it's still waiting for others command to arrive, due to the way the _doCmd() function of Net_Sieve.php is written. It's in fact waiting for an "OK", a "NO" or a "BYE", indicating the end of a possibly multiline answer.
The code seems to support challenges, but only if the challenge length is announced with a string-length indicator, as in :
< AUTHENTICATE "CRAM-MD5"
> {30}
> abcdefghijklmnopqrstuvwxyz1234
But the ietf draft (see draft-ietf-sieve-managesieve-09 - A Protocol for Remotely Managing Sieve Scripts (http://tools.ietf.org/html/draft-ietf-sieve-managesieve-09#page-15)) also states that the server can send the challenge between quotes and without a length-indicator, if it's short enough, as in :
< AUTHENTICATE "CRAM-MD5"
> "abcdefghijklmnopqrstuvwxyz1234"
For some reason, my managesieve dovecot server uses the latter form. I wrote a patch to add support for this form to sieverules, and it now works. This is done adding another state to the class : NET_SIEVE_STATE_CONNECTED, which is set right after the TCP connection is established, and until we set either state AUTHORISATION or TRANSACTION, after establishing the TLS layer (if configured) and after querying the capabilities. I added more code than I intended to at first sight, but, well...
It has been tested with auth methods PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5, with and without TLS.
The "bypass auth" case is however untested.
Managesieve dovecot version : 1.13 (from debian lenny backports)
Roundcube revision : 2987
Patch attached : http://www.roundcubeforum.net/attachment.php?attachmentid=1064&stc=1&d=1253996253
I just tested with Dovecot 1.2.4, and I have the same problem.
It's strange nobody else seems to encounter this issue.
Anyway, I filed a bug at PEAR https://pear.php.net/bugs/bug.php?id=16647
$ wget -q 'http://svn.php.net/viewvc/pear/packages/Net_Sieve/trunk/Sieve.php?view=co' -O Sieve.php ; cat bug.php ; php bug.php
include('Sieve.php');
new Net_Sieve('user', 'pass', 'localhost' , 2000, '', '', true, false, false, null);
S:"IMPLEMENTATION" "dovecot"
S:"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include body variables enotify environment mailbox date"
S:"SASL" "CRAM-MD5"
S:"STARTTLS"
S:"NOTIFY" "mailto"
S:"VERSION" "1.0"
S:OK "Dovecot ready."
C:CAPABILITY
S:"IMPLEMENTATION" "dovecot"
S:"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include body variables enotify environment mailbox date"
S:"SASL" "CRAM-MD5"
S:"STARTTLS"
S:"NOTIFY" "mailto"
S:"VERSION" "1.0"
S:OK "Capability completed."
C:AUTHENTICATE "CRAM-MD5"
S:"PDAzNDI5MTA4MjI2MTEwNDEuMTI1NDA1MDY0NEBtZXJjdXJlPg=="
I am using Dovecot 1.2 from source with the Sieve plugin built with it as well as the dovecot managesieve plugin also. You guys are definitely more advanced on this than I am. It does indeed seem to be a problem with authentication - but I am wondering in my case if the problem lies with Dovecot's "Deliver" I initially missed the bit about reconfiguring Sendmail to allow for Dovecot as a mailer. Fixed that - but it still has not resolved the problem.
Maybe a stupd question.
Is there any way to use the sieverules plugin with hMailserver and RC0.3
If not, is there another plugin to roundcube to manage filetr funtions?
To my knowledge (which in some circles is considered very limited), hMailServer does not support RFC 3028 style filtering.
It does have its own server side filtering functionality but I am not aware of any RC plug-ins that can leverage it.
Do a search on the hMailServer forums
http://www.hmailserver.com/forum/index.php
i have no idea if hMailserver supports managesieve the protocol, there are lots of plugins for it made by rosali, you can see them here Plugin_Repository ? Roundcube Webmail (http://trac.roundcube.net/wiki/Plugin_Repository) may be one of them can help you.
hMailServer does not support managesieve the protocol. It does have its own server side filtering features, accessable via the hMail Administrator and/or scripting, but i am unaware of any RC plug-ins that leverage this functionality.
regards
You're quite right. Try this, a few lines above change
$vacto_arr = explode(",", $vacto);
To
$vacto = "";
And add this after the original line you changed
$vacto .= ((strlen($vacto) > 0) ? ',' : '') . $sql_arr['email'];
Finally look further up the file for this line
if (!empty($vacfrom) || !empty($vacto) || !empty($handle) || $charset != RCMAIL_CHARSET) {
And change it to
if (true) {
the advanced box should always be ticked and the :addresses line added
I have added a small hack to the repo version of the plugin to make the :addresses line always added when a vacation message is created, see README for more information.
thanks for the bug report, this is also fixed in the repo version
glad it works. about the checkbox, may be in the future but surely you could make a predefiined or example rule to do this, then you can use what ever conditions you want.
hmmm yes example rules should probably override the protection, it cant test it right now but i have put an update in the repo which should fix it.
just tryed it out. sorry, no difference, same behaviour.
hmmm i have had a chance to try it now, i made a few other changes though. try the repo version, not user if you need to removed the :addresses line or not from your example it worked for me with both.
when i add a new rule to filter by body, i get a message saying it is not supported by the server. im running dovecot 1.2.6 and managesieve server and it seems like filtering by body is supported. what gives?
@bambam i did see that but your options seems to be a little different from mine.
plugins/sieverules/config.inc.php
Mine is
$rcmail_config['sieverules_port'] = 2000;
Your seems to be
$sieverules_config['managesieve_port'] = 12000;
Maybe its nothing. but something to look into.
Also, what version of sieverules are you running?
When you start dovecot, do you see any errors? What does 'dovecot -n' return?
@johndoh. great. upgrading seems to have fixed the problem.
I have a couple of suggestions for this plugin if you would be so kind.
1. Currently the contents within div boxcontent have no margen and hence stick to the edges. Maybe a CSS addition of margin 15px all round would make this more attractive.
2. I quite like how the managesieve plugin (that is checked into roundcube) has the buttons on the top of the filters to add, delete, move up and move down. There are quite attactive rather than having the button below to add filters and the little up down arrows on the filter name and the delete is within the filter details.
While this request is mostly for asthetic reasons, there is one functional element that is annoying in the current design. Lets say I want to move a filter up a few places. In the way it currently works, I select the filter I want to move and then press the up button. Now the rule has moved up, but I now need to move my mouse up to the new location to click the up button next to move it up again. By having the move up button outside, you just select the rule and click the move up button 3 times and its up 3 locations. No move moves required between moves. I hope this is clear.
3. This is something I'm not entirely sure how things work. If I select a non-default roundcube skin, it seems like I need to add stuff into plugins to add support for this. For example, I tried using mvision and I realized that mvision sources settings.css (when I click on the settings page) to get a consistent look between tabs etc. However, when I click the Filters tab, settings.css isn't sourced because it calls sieverules. I would have thought that roundcube should have sourced settings.css before handing in control to the plugin. But I don't know if there is a consitent rule. Again this is not something you need to do, but I'd like to know more about it.
I can code but php isn't something I'm comfortable with but let me know if you need any help with the plugins.
the boxcontent class is part of the default skin, it is setup in common.css. the sieverules screen will look the same as the settings screen. what browser are you using?
about the links: there is a link to my plugins page in the first post in this thread, and in my sig and on the RC plugins page. my page as links to the repos as well as the translator, screenshots, changelog etc. I am sorry you had to search for the files but I am not sure what more I can do.
@johndoh
I'm using firefox 3.5.5
When you say default skin, you mean default skin for sieverules? boxcontent isn't a part of roundcube. For exameple, when I click on the preference tab, I see that the contents are in a div called prefs-details which has a margin of 15px.
Seems like boxcontent is a part of the sieverules default skin and hence should be a part of sieverules.css.
I'm not sure if what you are saying is correct. Looking at the code for the plugin, I see this
plugins/sieverules/skins/default/templates/editsieverule.html:
i had the debian version of roundcube. I checked out trunk and the border padding is no longer an issue.
There were some posts in this thread about connection issues with the managesieve plugin available in the RoundCube trunk. These posts have been moved to a new thread here http://www.roundcubeforum.net/api-based-plugins/5860-managesieve-connection-problems.html
I would like to keep the two seperate to minimse any confusion between these 2 plugins.
Hi;
I've managed to get sieverules working with a cyrus imap server, but still have a pb.
A vacation message for the real user (
[email protected]) is send in reply to the sender, as expected.
But it does not work with aliases (like
[email protected], which is an alias user for
[email protected]).
I expected that the alias field for addresses while adding a vacation rule can be filled with alias addresses, but I can't edit that field.
Any hints other than the advanced editor to edit the sieve rules? I can do, but I'm afraid my users can't :)
TIA kp
if you tick the "advanced options" box under the message box you can select aliases which should be used. the email address has to be one of your identies for it to show up in this list.
Thx, adding an identity for (every) alias did the trick.
A solution that can be explained to users...
kapeka
Hi JohnDoh,
thanks again for this usefull plugin.
I wonder if there is an easy way to configure sieverules to add new filters at the top of the list ? or maybe only for vacation filters ?
Thanks !
R.
you cant add rules to the top of the list but its really easy to change the order of rules by using the little arrow icons or drag 'n drop.
Hi,
it was to prevent people to keep in mind to do this part of the configuration, and only to add a configured vacation example filter.
R.
Hello.
When i try to edit existing sieve rule, i got this error?
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/stepkin.net/www/mail/program/include/session.inc on line 82
How to fix this?
i install last version of plugin from where (http://www.tehinterweb.co.uk/roundcube/plugins/sieverules.tar.gz) on clear roundcube installation.
Well. i found a troublemaker.
Then i write something in russian language —*i have this error. When i write only english — all seems OK.
for some reason, i can't get the rules to work when I want it parse based on 'from sender'
For example, i tried adding rules saying Sender contains amazon.com move it to a certain folder. But this does not work. It stays in my
inbox. I also tried modifying this to envelope from contains amazon.com and still the same.
Here is what gets written into the sieve file
# rule:[orders from]
elsif anyof (address :contains "Sender" "ebay.com",
address :contains "Sender" "paypal.com",
address :contains "Sender" "amazon.com")
{
fileinto "Orders";
stop;
}
any help is appreciated
I think not all mail servers support the 'Sender' header, if you check the headers of the messages you are trying to filter is there a Sender in there? Try using 'From' instead of 'Sender'. You can edit the rule manually or if you are using the latest version of the plugin then just add:
$rcmail_config['sieverules_default_headers'] = array('subject' => 'header::Subject',
'from' => 'address::From',
'to' => 'address::To',
'cc' => 'address::Cc',
'bcc' => 'address::Bcc',
'envelopeto' => 'envelope::To',
'envelopefrom' => 'envelope::From'
);
into your config and it will override the defaults. (if you are not using the latest version you need to edit the array at the top of sieverules.php)
Hi guys and gals. I've got a problem I can't figure out. I've installed iredos 0.5 and got it working then I upgraded roundcubemail to 0.3.1 and it's working fine with spamassasin plugin, the context menu plugin, and the markasjunk2 plugin. I've been working for days now and I cannot figure out why the sieverules plugin is not working. I've configured the config.inc.php file for my server and added it to the main.inc.php file for roundcube and when I got to settings then filters tab I can make rules and delete them and it tells me the save completed successfully and I can even dig into the server filesystem and find the "roundcube" file it creates under the email address I'm using with the rules in it. But the thing is I can create a simple rule that says if any email contains testing in the subject then move it to the test folder and I save it and it saves correctly but the filter doesn't work. All emails with testing in the subject line that I've sent still show up in the inbox. I am using the sieverules plugin from this site: RoundCube Plugins and I just cannot find wht I'm doing wrong. I can provide any more info that may be needed, I would just greatly appreciate some help on this.
Hi, I've been trying out this plugin, and I encountered a problem. I can't import the default rules for some reason.
I have:
$rcmail_config['sieverules_default_file'] = '/etc/dovecot/sieve/default';
The permissions should be correct:
[root@mail /etc/dovecot/sieve]# ll
total 4
-rw-r--r-- 1 root wheel 86 Dec 28 20:34 default
-rw-r--r-- 1 root wheel 86 Dec 28 20:34 example
[root@mail /etc/dovecot/sieve]# cat default
require ["fileinto"];
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}
I click yes when I'm prompted with "Would you like to use these filters?" A message appears saying that the filter was imported successfully, but when I open up the file, it's empty. I can add new rules, but the default one just won't get imported.
Can someone point me in the right direction? Thanks.
I think the problem is that your default rule file is not in a format which the plugin understands. Try:
require ["fileinto"];
# rule:[Junk]
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}
You need to add the # line with the name of the rule to what you had originally.
Thanks. That fixed the problem.
Quote from: sergest;23566When i try to edit existing sieve rule, i got this error?
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/stepkin.net/www/mail/program/include/session.inc on line 82
This seems to happen when special characters are used - i get the same problem with german umlauts (äöüß...) - the mentioned message is displayed and the users' session killed
I cannot recreate this problem. could you give me some more info? may be an example rule file or a screen shot of what you have entered. also please provide some info about your environment... what version of rc are you running, what verstion of php etc.
also if you are not running the latest svn trunk version of rc it might be worth giving that a try just to make sure its not something in the core which has been fixed.
thanks
Hi all...
I've been reading through these posts and working on getting the sieverules plugin working for most of the morning and I've just about reached the end of my rope.
I would appreciate any suggestions on how to get it running. Here are my details:
1) Using latest version of roundcube (downloaded a few days ago)
2) Using fedora 10, dovecot 1.1.20, dovecot sieve 1.1.20, dovecot-managesieve 1.1.20
3) Using latest version of managesieve plugin from authors site
4) Dovecot and roundcube are working fine, I can log in and check emails
5) Install of managesive plugin went fine
6) sieve directory is correctly created in user mail section, .dovecot.sieve is symlinked correctly to sieve/roundcube.sieve
7) I am able to add filters in roundcube and the correctly show up in sieve/roundcube.sieve
8) I have tested almost every filter option and none of them are actually forwarding correctly.
9) I have confirmed that 'localhost' is listening on port 2000 which is setup in plugin
10) Dovecot is otherwise working as expected
I have a couple of questions.
1) I use mbox instead of maildir (does that matter?)
2) I'm using aliases for login to roundcube (does that matter?)
Is there anything else I can try to make the filters take effect?
Thanks in advance.
ok so first are you using the managesieve plugin or the sieverules plugin? although similar they are seperate plugins and so this is important.
it sounds like may be you have just missed something on your dovecot config so it isnt actuall reading the rule file, check in the instalation and configuration section here LDA/Sieve - Dovecot Wiki (http://wiki.dovecot.org/LDA/Sieve) and make sure you have got everything in your config you need.
as for your 2 questions, i dont think it makes any difference, both managesieve and your imap is run by dovecot so as long as that works it should be ok i think but i dont know alot about mbox you might be better off asking the dovecot community
hello
so first my system: rc is 0.3.1, php 5.2.12 (suhosin/eaccelerator)
the generated sieve was:
## Generated by RoundCube Webmail SieveRules Plugin ##
require ["fileinto"];
# rule:[test]
if anyof (header :contains "Subject" "test")
{
fileinto "INBOX";
}
# rule:[test2]
elsif anyof (header :contains "Subject" "t<C3><A4>st")
{
fileinto "INBOX";
}
looks for me like a utf8/escaping-problem - the second subject should be
"täst". Im trying to get a testsystem without suhosin/eaccelerator and
with rc-trunk up tomorrow and will check it again.
i think the file is written in UTF8 without a BOM, check what encoding the progam you are using to read it is using.
a quick search suggests that may be its dovecot's sieve plugin which is at fault, what version are you using? I think cmu-sieve does not get along with UTF8 very well, or may be its only pre version 1.1 i'm not sure.
an easy test would be to manual create a rule file which you know has everything correctly encoded and see if it works that would help figure out where the problem is.
Rules from sieverules stored in
/home/vmail/domain.com/username/sieve
dovecot.conf
sieve = ~/dovecot.sieve
sieve_dir = ~/sieve
Now dovecot looks for dovecot.sieve in the users homefolder, but the sieverules is stored in homefolder/sieve.
Managesieve will automaticly set a sysmlink in homefolder
dovecot.sieve to sieve/roundcube.sieve. Sieverules dont do that, and that is my problem. Any suggestions?
Could you tell me a little bit more about your setup please to help trace the problem?
If you have sieverules setup to use a single ruleset then that ruleset will be actiated when you press save, if you are using multiple rulesets then you need to press the activate button in the top right.
Could you tell me if you are using an existing ruleset which is not being activated or a new one? Also what version of dovecot sieve are you running?
thanks
Dovecot Version 1.2.7
Sieve Version Dovecot 1.2 Sieve 0.1.9
For testing i had only a single ruleset. This rule is saved to myhomefolder/sieve.
Now the only problem is, that sieverules dont set a link from the homefolder to sieve/roundcube.sieve.
In my dovecot.conf i have to set:
### Sieve per User ###
sieve = ~/dovecot.sieve #The location of the user's active script:
# directory.
sieve_dir = ~/sieve #The include extension fetches the :personal scripts from this
# directory.
protocol lda {
..
mail_plugins = sieve
}
sorry to ask you to repeat yourself again but when you said "Managesieve will automaticly set a sysmlink in homefolder" where you talking about dovecot managesieve or the rc plugin called manage sieve.
In the sections you posted from your config above the frist one is in plugin { } section correct?
if you were not talking about the other rc plugin earlier then please do one other quick test, try hard codiging this path sieve = ~/dovecot.sieve #The location of the user's active script just to make sure there isnt some problem with diecting the home dir.
Yes the roundcubeplugin sets the link, not dovecots managesieve.
sieve = ~/sieve/roundcube.sieve
When you click on filters in roundcube, there is a loop. Here is the error from mail.log
sieve-storage: Active sieve script symlink /home/vmail/example.com/max/sieve/roundcube.sieve is no symlink.
I'm running dovecot IMAP with virtual domains and users.
I got sieverules working on a domain level but I just can't figure out how to make it work per user. When I log in as one user I can make filters and they will work just fine.
The problem is when I log in as another user on the same virtual domain i see the same set of rules and can change them. Does anyone ever had a similar problem?
Roundcube 0.3.1-20091031
Dovecot 1.1.11
Sieverules 1.5
Here is my output from dovecot -n if anybody can se a problem there.
# 1.1.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.31-17-generic-pae i686 Ubuntu 9.10 ext4
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot
info_log_path: /var/log/dovecot-info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s managesieve
ssl_cert_file: /etc/ssl/smtpd.crt
ssl_key_file: /etc/ssl/smtpd.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
valid_chroot_dirs: /var/spool/vmail
mail_location: maildir:/home/vmail/%d/%n
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
sieve_storage(default):
sieve_storage(imap):
sieve_storage(pop3):
sieve_storage(managesieve): ~/sieve
sieve(default):
sieve(imap):
sieve(pop3):
sieve(managesieve): ~/.dovecot.sieve
auth default:
mechanisms: plain login
verbose: yes
passdb:
driver: passwd-file
args: /etc/dovecot/passwd
userdb:
driver: passwd-file
args: /etc/dovecot/users
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 384
user: vmail
group: vmail
plugin:
sieve: ~/.dovecot.sieve
sieve_dir: ~/sieve
I'm running dovecot IMAP with virtual domains and users.
I got sieverules working on a domain level but I just can't figure out how to make it work per user. When I log in as one user I can make filters and they will work just fine.
The problem is when I log in as another user on the same virtual domain i see the same set of rules and can change them. Does anyone ever had a similar problem?
Roundcube 0.3.1-20091031
Dovecot 1.1.11
Sieverules 1.5
Here is my output from dovecot -n if anybody can se a problem there.
# 1.1.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.31-17-generic-pae i686 Ubuntu 9.10 ext4
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot
info_log_path: /var/log/dovecot-info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s managesieve
ssl_cert_file: /etc/ssl/smtpd.crt
ssl_key_file: /etc/ssl/smtpd.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
valid_chroot_dirs: /var/spool/vmail
mail_location: maildir:/home/vmail/%d/%n
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
sieve_storage(default):
sieve_storage(imap):
sieve_storage(pop3):
sieve_storage(managesieve): ~/sieve
sieve(default):
sieve(imap):
sieve(pop3):
sieve(managesieve): ~/.dovecot.sieve
auth default:
mechanisms: plain login
verbose: yes
passdb:
driver: passwd-file
args: /etc/dovecot/passwd
userdb:
driver: passwd-file
args: /etc/dovecot/users
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 384
user: vmail
group: vmail
plugin:
sieve: ~/.dovecot.sieve
sieve_dir: ~/sieve
I just got all this installed and configured... and having a slight problem getting the rules to "stick".
They seem to work fine, according to testing I did to make sure the headers information was working - i.e filter according to sender, recipient, copy, etc.
However, when I make the filters... sometimes it works and sometimes it doesn't. I have a large amount of filter criteria for a certain folder, maybe 20 criteria (for mailing lists). I'll got through and enter each criteria, select the destination folder and hit save... it reports filter saved. Then on a refresh, the filter is either gone or empty.
Looking in the %u/sieve/roundcube.sieve file, I see part of the filter has been saved. It seems to only record about 12 to 13 of the entries, and misses the fileinto directive.
This is dovecot 1.1.11, ubuntu 9.10, rcube 0.3.1 - latest download of sieverules
I was also looking at trying to enable the ingo filter importer, but I didn't see the option for it. I have a working Ingo installation side by side with this (trying to migrate to Rcube as I think it will be easier on my users). If you want any help testing that, I'd be happy to work with it. My php kung-fu is not exactly street worthy though...
Thanks for the work!
After working with this some more... 12 is the magic number... once more than 12 entries are made, the filter rule is created but it cuts off the fileinto directive. As an aside, I can directly edit the file and add the extra rule criteria after which it will show up in rcube properly.
OK, i think i found the bug...
Before roundcube r731 (think release 0.1-r1) it used ASCII as default character encoding for its session-table. It was changed (bug #1484456) but they only updated the initial SQL, the update.sql does not contain any conversion. As long as you don't disable caching the plugin will save rules inside the session - if there any UTF8-Chars the SQL-query breaks and rc killes the session.
Quick and dirty fix:
ALTER TABLE `session` ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
ALTER TABLE `session` CHANGE `sess_id` `sess_id` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `ip` `ip` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `vars` `vars` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
If you have a database that was created with a early rc-version you should recreate all tables - there are more changes that are not inside the update.sql (e.g. MyISAM -> InnoDB)
pela020: if you are using the repo version go into rcube_sieve.php and set $cache to false on line 37 and then try again, may be the cache doesnt work right. if that doesnt work then check your dovecot config and where the sieve files are acually being written on the server, make sure they are not all in the same place.
internalkernel: i have setup a rule with 20 tests and then a fileinto and it saves just fine. could you post an example of one which doesnt work for you please?
Quote from: JohnDoh;24801pela020: if you are using the repo version go into rcube_sieve.php and set $cache to false on line 37 and then try again, may be the cache doesnt work right. if that doesnt work then check your dovecot config and where the sieve files are acually being written on the server, make sure they are not all in the same place.
There's a symlink in /home/vmail/domain
.dovecot.sieve -> sieve/roundcube.sieve
I've changed the cache value to false but it doesn't do anything different what i can see. It still writes the filters in the same file for all users
looks like your dovecot config is wrong then the symlink should be in the user's directry along with a dir containing the sieve files.
Quote from: JohnDoh;24801internalkernel: i have setup a rule with 20 tests and then a fileinto and it saves just fine. could you post an example of one which doesnt work for you please?
As you request... I have attached a screenshot of the rule set I attempted to make, and the result after hitting save... as well as the code produced in roundcube.sieve.
I've made no changes in the sieverules folder (aside from copying config.inc.php.dist to config.inc.php).
~~
I ended up resolving my issue with it, in part by figuring out the "List-ID" header and splitting the rules into different entries.
~~
I just came across this entry in my logcheck files, seems to coordinate with the time I tried to save the filters:
line has bad date <[Sat Jan 23 11:24:42 2010] [error] [client xxx.xxx.xxx.xxx] ALERT - configured POST variable limit exceeded - dropped variable '_advoperator[]' (attacker 'xxx.xxx.xxx.xxx', file '/var/www/roundcube/index.php'), referer: https://my.domain.com/?_task=settings&_action=plugin.sieverules.add&_framed=1>
Quote from: JohnDoh;24803looks like your dovecot config is wrong then the symlink should be in the user's directry along with a dir containing the sieve files.
Yes, that did the trick.
I changed from
sieve=~/.dovecot.sieve to
sieve=/home/vmail/%d/%n/.dovecot.sieve
in the dovecot config :D
Thank you for pointing me in the right direction.
In SieveRules regular expressions do not seem to be 100% working ... like "\" should be "\\" in the dovecot.sieve file. Is anybody facing similar problems?
version information:
Dovecot: 1.2.9
RoundCube: 0.3.1
SieveRules: 1.5
internalkernel and pela020 glad you got your problems sorted
user20100124: there is nothing done to what you enter in the UI, if you want to escape a character you have to do it yourself. altering a test string behind the scenes seems a little dangerous to me, for example how would I knoww when you want \\n or \n?
Example of a dovecot.sieve file:
------------------------------ snip ------------------------------
require ["regex"];
if allof (header :contains ["to", "cc"] "
[email protected]",
header :regex "Subject" "^\\[CentOS-announce\\] .* CentOS (2|3|4) .*")
{
discard;
stop;
}
------------------------------ snip ------------------------------
When loading a file like this one in the frontend i get the (correct) single slash I want ... saving is however not possible since there is a missing slash. If I use the advanced editor this is of course possible to fix ...
edit: i have *lots* of rules with regex and it does not only break the current one you are working at.
ahh i see. check out the latest change in the repo. it should fix the disapearing slash.
The disappearing slash fix works fine - thanks. I found another bug:
With imapflags when editing a saved rule, the filter action "Mark message as" is not preselected (it's always Move message to, which is the first one).
i cant recreate the problem with imapflags. make sure in your config you have imapflags set to true in sieverules_allowed_actions.
The action is enabled (I created the rule with sieverules):
------------------------------ snip ------------------------------
...
$rcmail_config['sieverules_allowed_actions'] = array(
'fileinto' => TRUE,
'vacation' => TRUE,
'reject' => FALSE,
'redirect' => FALSE,
'keep' => TRUE,
'discard' => TRUE,
'imapflags' => TRUE,
'notify' => FALSE,
'stop' => TRUE
);
...
------------------------------ snip ------------------------------
And a example file looks like this:
------------------------------ snip ------------------------------
## Generated by RoundCube Webmail SieveRules Plugin ##
require ["fileinto","imap4flags"];
# rule:[foo]
if allof (header :contains "X-List" "foo")
{
fileinto "INBOX.foo";
setflag "\\Seen";
stop;
}
------------------------------ snip ------------------------------
thanks for the examples. I have tied them with both the repo and released versions of the plugin and i cannot see any problem. sorry but i dont know what else to tell you.
I just recently installed your sieverules plugin and like it very much, so thanks a lot for it!
That said, I think I found a bug in the recent version (from 2010/01/29).
When I configure a new Spam rule in roundcube that tests if X-Spam-Score is >= 10, the following file is generated and then saved by the managesieve daemon:
## Generated by RoundCube Webmail SieveRules Plugin ##
require ["relational","comparator-i;ascii-numeric"];
# rule:[Spam]
if anyof (header :value \"ge\" :comparator "i;ascii-numeric" "X-Spam-Score" "10")
{
discard;
}
Notice the escaped \"ge\" comparator.
sievec throws an error when trying to compile the script, and sieverules itself seems not to be able to re-import the rule, as it just disappears when the Filters screen is reloaded.
The same happens with the "gt" comparator, possibly also others.
Can you reproduce this and if yes, could you tell me where to fix it?
Thank you!
I can't reproduce it. It could be something to do with your PHP settings.
The values for the operators dropdown should be htmlencoded so lets check they are. Please goto the new/edit rule screen and view the source, search for `value &` and you should find them all, if you dont try searching for `value "` and see if that finds them.
If that is ok then double check you have magic_quotes_gpc turned off in your php config (should be done by default in the .htaccess file in the rc root).
Quote from: JohnDoh;25274If that is ok then double check you have magic_quotes_gpc turned off in your php config (should be done by default in the .htaccess file in the rc root).
That was it - magic_quotes_gpc was turned on in apache2's php.ini. Now it works like a charm.
Thank you for your quick help!
Sieverules works quite fine, but I found an annoying misfeature in NetSieve.php. I know, this is not the sieverules author's concern, but maybe someone has a solution to it. We currently have three frontend machines handling the mailaccounts and NetSieve needs to follow the referrals it gets to e.g. mail1.server.net or mail2.server.net to login to the timsieved. Giving it the correct loginserver by hand it works perfectly, but otherwise I get the following error in the log:
[12-Feb-2010 11:10:22] Connection timed out (145):
[12-Feb-2010 11:10:22] Can't follow referral to mail2, The error was= Connection timed out (5):
google has only one answer that is not only five years old but also long solved inside NetSieve.php. But that did not fix my problem. Did any of you ran into this problem and could give me a hint?
Kind regards
Ruediger
I'm not sure if it helps but since version 1.2 you can use %h instead of an actual hostname and then what ever imap host RC is connected too will be used.
setting "sieverules_host" to %h does not solve the problem. But I got somewhat closer to a solution: editing Net_Sieve.php and inserting three new lines at the start of authPLAIN() makes it work:
function _authPLAIN($user, $pass , $euser )
{
$this->_data['user']=$user;
$this->_data['pass']=$pass;
$this->_data['port']='2004';
if ($euser != '') {
$cmd=sprintf('AUTHENTICATE "PLAIN" "%s"', base64_encode($euser . chr(0) . $user . chr(0) . $pass ) ) ;
} else {
$cmd=sprintf('AUTHENTICATE "PLAIN" "%s"', base64_encode( chr(0) . $user . chr(0) . $pass ) );
}
return $this->_sendCmd( $cmd ) ;
}
This is the whole function authPLAIN(). The three new lines are the definitions of the array $this->_data[] with $user, $pass and port 2004. The problem seems to be that the first call of sendCmd is done with $user, $pass, $port and so on, but the second one when following the given referral (inside the function doCmd() ) it uses $this->data['host'], $this->data['user'] and so on. This array is unset at that very moment, so the connect fails.
It seems to be a bug in Net_Sieve.php that has never been discovered before since noone used the script to connect to a referred host. Maybe this once worked with PHP 4 when more global variable definitions were still common.
Kind regards
Ruediger
I dont really want to branch from the stable version of Net:Sieve, i suggest you open a bug report here Net_Sieve (http://pear.php.net/package/Net_Sieve)
Hi
I installed sieverules plugin with RoundCube.
I can put some some rules but none of them are executed. :confused:
I have scrupulously followed the instructions in the README file as well as those provided in the wiki dovecot and sieve.
Someone has already had such problems?
If the plugin is working, reading and writing rules then it sounds like a problem in your dovecot config. I think you might be better off talking to the dovecot guys they probably be able to tell you whats wrong quicker.
I have a working installation of Qmail+dovecot 1.2.10+sieve plugin+manage sieve, and everything is working fine so far.
Quote from: JohnDoh;25648If the plugin is working, reading and writing rules then it sounds like a problem in your dovecot config. I think you might be better off talking to the dovecot guys they probably be able to tell you whats wrong quicker.
ok thanks JohnDoh
I will check with them
Hello,
Appears all is working well with the Sieverules plugin except I can not for the life of me figure out how to add a :from "address" to a Vacation rule.
The front end UI displays Aliases, Days, Subject, etc... for Vacation rule creation, however, it doesn't display an option to select a From address.
It appears the code is written in rcube_sieve_script.php and sieverules.php to support the submission and creation of a :from address, however, I just don't see the option in the UI for adding one.
Any thoughts ?!?
Quote from: PetePann;25786...
I can not for the life of me figure out how to add a :from "address" to a Vacation rule.
...
FWIW, changing line 1590 in sieverules.php from:
$vacs_table->set_row_attribs(array('class' => 'disabled', 'style' => 'display: none'));
to:
$vacs_table->set_row_attribs(array('class' => 'advanced', 'style' => $vacadvstyle));
appears to do the trick.
yep that sounds about right, its a little lower down in the latest version. its disabled by default coz not all servers support it and there is no way to detect if they do or not. just out of interest what imap server are you using?
Quote from: JohnDoh;25793just out of interest what imap server are you using?
Using Dovecot. And thanks for your contributions to the SieveRules plugin ... makes mail administrators and their users quite happy :)
HI Folks,
I always get logged out after klicking the first time on the filter tab. This is what I found in logfile of apache:
--
01 12:32:54 2010] [error] [client 192.168.64.1] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in /workdir/confspace/webmail/program/include/session.inc on line 82
--
What can I do against this - I want to use your perfect plugin!
Cheers
Hi,
found by myself: :-)))
rcube_sess_serialize(array_merge((array)$a_oldvars, (array)rcube_sess_unserialize($vars)))
Please file a bug for me and change this. Here the info from php:
PHP: array_merge - Manual (http://php.net/manual/en/function.array-merge.php)
Thanks & Regards
Hi,
I have tested sieverules with IE8 and Firefox and I have several problems. Please view the attached pictures.
When I add a filter and click on save the filter is not displayed in the left panel. When I delete a filter, the entire screen is displayed in the right box. It's slightly better in Mozilla but also there not perfect. Specially the filter panel on the left side is often not updated correctly. do we have a apache or php problem?! Has anybody an idea how to solve this?!
Thanks & Regards,
mstar
mstar: the issue with the session has been dicussed before, see here for the solution http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/4878-sieverules-plugin-15.html#post24784. about the display, may be its casued by the errors, or could there be a caching problem (did you have a previous version of the plugin installed?) what version of rc are you using? what version of the plugin? and what version of php? I can see from the screenshots that there are some JS errors, could you tell us what they are please?
Hi,
this is the message:
'null' is Null or no Objekt sieverules.js?s=1267551002, line 679 char 4
Thanks :)
Quote from: JohnDoh;25648If the plugin is working, reading and writing rules then it sounds like a problem in your dovecot config. I think you might be better off talking to the dovecot guys they probably be able to tell you whats wrong quicker.
It's working now.
For that I had to configure Sieverules plugin, Dovecot and Postfix and it was not obvious at all :(
Quote from: zelegolas;25975It's working now.
For that I had to configure Sieverules plugin, Dovecot and Postfix and it was not obvious at all :(
I don't suppose you care to tell us what you did to correct this at all?
I have the same problem.
Hi,
I have installed the plugin directly from github:
---
author PhilW
Tue, 6 Apr 2010 07:28:57 +0000 (08:28 +0100)
committer PhilW
Tue, 6 Apr 2010 07:28:57 +0000 (08:28 +0100)
---
but now I receive an error:
[07-Apr-2010 18:22:02] PHP Fatal error: Call to a member function connect() on a non-object in /workdir/confspace/webmail/program/include/rcmail.php on line 408
whenever I click on "new filter". What did I wrong?!
Thanks & Regards,
Johannes
what version of RC are you using? development version of the plugin requires svn trunk verion of rc.
Hello sir,
I'm using Exim 4.x server and the managesieve is not working for me. I would like to implement Filters. Please help me regarding this. I installed roundcube 0.3.1
Quote from: JohnDoh;26662what version of RC are you using? development version of the plugin requires svn trunk verion of rc.
Hi,
done - and the error is gone! But now I have another problem:
After adding a new filter the list on the left hand sidebar is not updated until we reload the entire page!
After deleting of one filter the entire page is shown cascaded in the right hand frame.
Please see the pictures from mstar some days ago in this thread regarding this problem. We are testing with ie7, ie8 and firefox.
Thanks for fast help - if you can make it happen we would like to donate... how?!
Cheers,
Johannes :-)
Hi,
we did some more testings and found the following:
When testing with Firefox - everything is perfect!
When testing with browser IE7 (document standards...) we get the problem
Meldung: 'null' ist Null oder kein Objekt
Zeile: 679
Zeichen: 4
Code: 0
URI: http://xx.xx.xx.xx/webmail/plugins/sieverules/sieverules.js?s=1270656105
When testing with browser IE8 - everything is perfect!
Thanks for fast help!
Johannes
Quote from: jdrachenfels;26683Hi,
done - and the error is gone! But now I have another problem:
After adding a new filter the list on the left hand sidebar is not updated until we reload the entire page!
After deleting of one filter the entire page is shown cascaded in the right hand frame.
Please see the pictures from mstar some days ago in this thread regarding this problem. We are testing with ie7, ie8 and firefox.
Thanks for fast help - if you can make it happen we would like to donate... how?!
Cheers,
Johannes :-)
Hi John Doh,
thanks for solving our issue so fast! Please let me know howto donate :-)
But we found another issue. When you do the following you will reproduce errors:
1.) Klick on "New Filter"
2.) Klick on any "MoveUp" or "MoveDown" link in the left hand list of filters
3.) See the java script erros:
Details zum Fehler auf der Webseite
Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Zeitstempel: Fri, 9 Apr 2010 08:48:39 UTC
Meldung: 'this.rows[...].obj' ist Null oder kein Objekt
Zeile: 640
Zeichen: 5
Code: 0
URI: http://johannes.intern.drachenfels.de/webmail/program/js/list.js?s=1270708941
Meldung: 'this.rows[...].obj' ist Null oder kein Objekt
Zeile: 640
Zeichen: 5
Code: 0
URI: http://johannes.intern.drachenfels.de/webmail/program/js/list.js?s=1270708941
Meldung: 'this.rows[...].obj' ist Null oder kein Objekt
Zeile: 640
Zeichen: 5
Code: 0
URI: http://johannes.intern.drachenfels.de/webmail/program/js/list.js?s=1270708941
Hope this helps!
Thanks again,
Johannes
yea, i know its not quite fixed yet, hopefully i will have some time to sort it over the weekend. thanks for the errors though, i will make sure to fix that too.
EDIT: All the JS problems should be fixed in the repo now
Hi John Doh,
do you plan to implement the currentdate filter type into sieverules (with a datepicker) ?
for vacation filters, for example :
require ["date", "relational", "vacation"];
if allof (currentdate :value "ge" "date" "2010-04-18",
currentdate :value "le" "date" "2010-04-22")
{
vacation
:days 7
:addresses ["[email protected]"]
:subject "Out of office"
"vacation message";
}
Cheers,
R.
I'll put the date extension on the todo list!
thank you :)
I have some bugs to report.
1) When specifying a regex for a rule, if the regex includes a " character, it's not saved correctly and log shows:
PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in xxxx/plugins/sieverules/sieverules.php on line 1202
I am trying to filter messages with exe attachments, using a regex like this: filename=".*?\.exe" Is this the best way to filter for attachments?
2) In the vacation settings, when a charset is chosen other than UTF-8, umlauts in the vacation message do not display correctly.
Quote from: kir;26832I have some bugs to report.
1) When specifying a regex for a rule, if the regex includes a " character, it's not saved correctly and log shows:
PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in xxxx/plugins/sieverules/sieverules.php on line 1202
fixed in the repo
Quote from: kir;26832I am trying to filter messages with exe attachments, using a regex like this: filename=.*?\.exe" Is this the best way to filter for attachments?
I'm not sure, a little searching suggests your server needs to support the body or x_body extension and then you can use a regex to find the name and filter on it. Re: filter attachments with sieve - msg#00012 - ietf.mta-filters (http://osdir.com/ml/ietf.mta-filters/2002-05/msg00012.html)
[QUOTE="kir;26832]2) In the vacation settings, when a charset is chosen other than UTF-8, umlauts in the vacation message do not display correctly.[/QUOTE]
The charset is an advanced option for users who want to use a different one from normal, UTF-8, if a differen't one doesnt work then dont change it. This is something handeled by the server, my plugin just rights the files it has no affect on what the server does with them.
I am trying to use this sieve plugin but can't seem to make it work... I have been using Horde and Ingo sieve module before and want to import my Ingo sieve rules... But when I go to the filter tab, I don't get asked if I want to import my old rules, as it looks like I should be...
What am I missing?
Edit: I updated to the latest version in Git and now it runs better... But a lot of rules are missing from the gui... But what's strange, is that when I see in the roundcube.sieve file, all my rules seems to be there but they are just not all displayed on the gui?
Also, nothing happens when I click on a rule in the gui, except for that the whole roundcube webapp seems to lock up....
Regards,
BTJ
QuoteEdit: I updated to the latest version in Git and now it runs better... But a lot of rules are missing from the gui... But what's strange, is that when I see in the roundcube.sieve file, all my rules seems to be there but they are just not all displayed on the gui?
Also, nothing happens when I click on a rule in the gui, except for that the whole roundcube webapp seems to lock up....
could you post your rule file?
Which one, the ingo one or the new roundcube one?
BTJ
the rc one please
Here you go....
BTJ
thanks. the culprit is the `address :all`, sieverules doesn't understand the :all. If you go through the file manually and take that out (so you just have `address :contains ....`) then the rules will be visible in the plugin and my understanding is that :all is the default behaviour so it shouldnt effect what the filters do.
Ok, now all the rules are displaying to the left... But still nothing happends when I click on rules... It says loading in the browser but the content portion is just empty?
And whatever I click after clicking a rule, nothing happens... I have to refresh the url without the sieve part to make roundcube work again...
BTJ
you said you were using the repo version of the plugin, what version of RC are you using? the repo version will probably only work right with the svn trunk version of RC, or 0.4b which should be out shortly
I am using the released version of RC, 0.3.1 so I guess that's the reason.... But when I use the released version of sieverules plugin, if I click preferences after looking at a rule, I always get kicked out and have to login again... Is this a known problem?
BTJ
Btw, how stable is the svn version of RC, is it ok to use?
BTJ
QuoteI am using the released version of RC, 0.3.1 so I guess that's the reason.... But when I use the released version of sieverules plugin, if I click preferences after looking at a rule, I always get kicked out and have to login again... Is this a known problem?
need a little more to go on than that, it could be a known bug - if you look in [rc root]/logs/errors is there anything about the session? if so then you need to make sure the tables in your database are set to UTF8
QuoteBtw, how stable is the svn version of RC, is it ok to use?
that depends what you are using it for in a full production environment its prolly not what you want but if its just for your use and you dont mind updating regularly then it would be ok. on a side note 0.4b will be realsed this week i think
Nothing in the error log about session, but my PostgreSQL tables are not using UTF-8, they are using ISO-8859-1, is that a problem?
BTJ
i dont know about postgresql, i know in mysql it should be UTF8 its in sql scritps for RC. you could also try looking in rcube_sieve.php in the plugin folder and setting private $cache = true; to false near the top and see if that make any difference, if it doesnt than you are talking about a different, unknown bug.
Setting private cache = false solved it... Thx... :)
BTJ
Rando: I have added the basics for creating rules using the date extension and the currentdate operator to the repo version of the plugin. There is no date picker but there are input masks.
Based on the information in the RFC I think it is writing valid rules but I don't have access to a mail server which supports the date extension and so I can't be sure, you would be able to test it? (the current repo version requires 0.4-beta or svn-trunk version of RC)
Hi, I want a rule for spam. This rule should be used by every user.
So I made a file /etc/deovecot/sieve/default with this code inside:
require ["fileinto"];
# Move spam to spam folder
if header :contains "X-Spam-Flag" ["YES"] {
fileinto "Spam";
stop;
}
But Roundcube doesn't recognise this file. I can't see it on the homepage. What is wrong?
try to use file names ending with *.sieve default.sieve
did you compile this file with 'sievec'?
Is this mistake on forum or in config files '/etc/deovecot/sieve/default'?
global sieve is used when theres no user sieve file.
if global sieve doesn't work you can try with 'sieve_before'
sieve_before = /etc/dovecot/sieve/default.sieve
this is a global reuleset and users won't see it
Thanks for your answer.
Now I think "example" would be the better choise for me. But this doen't work too.
I tried example.sieve and example.sievec (compiled version). Nothing works.
And deovecot was a mistake in the forum.
in dovecot.conf you have:
sieve_global_path = /etc/dovecot/sieve/example.sieve
sieve_global_dir = /etc/dovecot/sieve
add this after
sieve_before = /etc/dovecot/sieve/example.sieve
now it should work
Mh ... no it doesn't work :(
I added
sieve_global_dir = /etc/dovecot/sieve/
sieve_global_path = /etc/dovecot/sieve/example.sieve
sieve_before = /etc/dovecot/sieve/example.sieve
under plugin {
and restartetd dovecot. Nothing changed. Maybe it doesn't work with debians 1.0 dovecot? But userdefined rules work.
yes, it doesn't work with 1.0... the newest version of dovecot is dovecot-1.2.10, so in your place I would think about an update...
If you want to upgrade see this:
Upgrading/1.1 - Dovecot Wiki (http://wiki.dovecot.org/Upgrading/1.1)
Upgrading/1.2 - Dovecot Wiki (http://wiki.dovecot.org/Upgrading/1.2)
LDA/Sieve/Dovecot - Dovecot Wiki (http://wiki.dovecot.org/LDA/Sieve/Dovecot#Migration_from_CMUSieve)
Hi John,
thank you for this quick update.
the generated code worked fine with dovecot-1.2 and dovecot-sieve-0.1.15
date, time and weekday. tested with vacation, copy, reject, ..
---
an error occured when creating a new filter : (rc 0.4b, last sieverules version)
matching all (or any) of the rules
1st rule : subject, contains, any content
2nd rule : Arrival date filter, weekday, any day
when saving, a pop-up said "Please enter a value to test the header against"
---
the default operators' list don't match for date and time, and only 2 do for weekday
here is the list of the main operators that could fit as a default list (and an alternate display name)
*date and time : (case-insensitive string)
"value is greater than" ("After")
"value is greater than or equal to" ("After (inclusive)")
"value is less than" ("Before")
"value is less than or equal to" ("Before (inclusive)")
*date and weekday :
"is equal to" ("is")
"is not equal to" ("is not")
cheers,
Rando.
edit: updated
great, the validation bug is fixed in the repo. i'll see what i can do about the operators.
Quote from: Schmatze;27036Mh ... no it doesn't work :(
I added
sieve_global_dir = /etc/dovecot/sieve/
sieve_global_path = /etc/dovecot/sieve/example.sieve
sieve_before = /etc/dovecot/sieve/example.sieve
under plugin {
and restartetd dovecot. Nothing changed. Maybe it doesn't work with debians 1.0 dovecot? But userdefined rules work.
See Dovecot manual for sieve: LDA/Sieve/Dovecot - Dovecot Wiki (http://wiki.dovecot.org/LDA/Sieve/Dovecot)
It says literally:
"...The extra scripts can be executed before and after the user's private script. For example, this allows executing global Sieve policies before the user's script.
This is not possible using the sieve_global_path setting, because that is only used when the user's private script does not exist..."
Default "global sieve" executed ONLY if user's sieve is absent. If user's sieve exists, global sieve ignored.
If you want sequentially execute multiple sieves, you need
sieve_before=/a/b/before/before.sieve
and
sieve_after=/a/b/after/after.sieve
If you need more than one sieve in before an after phases, just omit filenames in config:
sieve_before=/a/b/before/
sieve_after=/a/b/after/
Then ALL scripts in dirs will be executed if alphabetical order.
If you create a mailbox, say "Spam" for example, and create a rule with "Filter Actions: Move message to Spam" and then remove the mailbox and review the sieve rule, "Filter Actions: Move message to" will display the first mailbox in the list ("Inbox" in my case) as the move to target while the sieve rule source still has "Spam" as the target.
I am checking this out to find if dovecot/sieve-plugin automatically creates Mailboxes as needed.
yep, thats meant to be like that, if the folder doesnt exist then it wont be listed and so cant be selected by default.
It's misleading. The script moves to "Spam" which does not exist. Only the visual representation of the script says "Inbox".
Reproduce:
1. Make folder "DeleteMe"
2. Make rule moving to "DeleteMe"
3. Delete folder "DeleteMe"
4. Rule shows move to "Inbox"
5. Looking at source code for sieve rule says move to "DeleteMe" not "Inbox"
So you are mislead without looking at source.
I do not belive it is misleading, if a folder doesn't exist then normally the message will stay in the inbox (there is no where for it to go).
Sorry for the letting so much time lapse.
Quote from: JohnDoh;27686I do not belive it is misleading, if a folder doesn't exist then normally the message will stay in the inbox (there is no where for it to go).
On my dovecot system this is not what I observe. Using my example if the mailbox DeleteMe does not exist it is created and the rule delivers into DeleteMe.
I tried it again and you're right, it does create the folder, not sure what I was doing different before, sorry about that. Unfortantly the fact still remains the plugin uses the folder list from the server so if the folder doesn't exist it cant be listed, its a limitation of the way it works.
I'm sure this is a rare thing but I could see someone deleting a folder and getting frustrated that it keeps coming back, checking the rules shows no rule referencing deleted folder.
Since the interface to the rules has the folder selected if it exists, the RC SieveRules plugin has the folder name parsed from the script in a var. Check if that var is in the folder list array and if not append it to the end of the array and possibly add "missing" like "DeleteMe (missing)" in the folder list, under or to the right in bold red. DeleteMe is the folder name I've been using in my examples.
Sorry, I don't know if I can follow my own message :) but no time to rewrite.
Thanks,
Brad
If the missing folder is manually added to the list then you'll get questions like "where has this folder come from?" "why can't I see this folder in my list?" and "how come the DeleteMe folder is only available for one rule?".
Possibly there should also be a new config option because the RCF says:
QuoteIf the specified mailbox doesn't exist, the implementation MAY treat it as an error, create the mailbox, or deliver the message to an implementation-defined mailbox.
Then admins can select the behaviour appropriate for their setup.
The plugin already contains an "Advanced editor" which allows more experienced users to skip the limitations of the UI and manually create rule files. I understand your point about users being confused by folders re-appearing apparently for no reason but I think this is a very rare case and the user should of created the rule to put messages in that folder and hopefully when they see the folder and the message inside it then it will give their memory a little jog and they'll go and change the rule!
I agree with your last paragraph. As a developer I am used to reporting possible errors and/or inconsistencies when I observe them. Weighing their impact is always part of way forward.
I wasn't clear enough in my previous post. I was suggesting adding the message to the list WITH an error message.
Either append "(does not exist)" to the select option label, or better, add to the right of select object "Error: This folder does not exist."
// Brad
I agree with your last paragraph. As a developer I am used to reporting possible errors and/or inconsistencies when I observe them. Weighing their impact is always part of way forward.
I wasn't clear enough in my previous post. I was suggesting adding the message to the list WITH an error message.
Either append "(does not exist)" to the select option label, or better, add to the right of select object "Error: This folder does not exist."
As far as auto-creation of missing folders, I think this varies between MDA configurations.
// Brad
Adding anything to the folder name in the drop down is a little tricky but adding the missing folder itself is easy. But I'm still not sure it's worth it. I agree depending on your setup the current way it works can be a little misleading BUT only until the first mail arrives, then the folder exists and then the problem is gone.
I have been playing with it a little and I cannot think of a clear way of adding something to the UI which will explain to a user what is going on. A message like "Error: This folder does not exist." will only lead to questions, it is misleading. Also as I said before it would need to be configurable for different setups.
I'm not saying I can't be added or I won't added just that at the moment I can't find a nice way of doing it and that I'm not sure it's worth the additional complication. I think it should be left on the wish list for now, lets atleast see if there is any more feedback - if its worthwhile.
I'm having some trouble with the sieverules plugin: it shows up in the configuration, but when I click the New filter button (or if I click an existing rule that was created by the managesieve plugin), nothing happens (in Firefox, the right pane stays empty, while in Opera I get an error message from Opera). Looking at the server logs, I can see it responds with an empty 500 document.
The RoundCube log shows this:
Jun 10 10:14:35 [roundcube] PHP Fatal error: Call to a member function connect() on a non-object in /var/www/localhost/htdocs/roundcube/program/include/rcmail.php on line 408
Any ideas what's happening?
I'm running RoundCube 0.3.1, sieverules from April 19th, apache 2.2.15 and php 5.2.13 on Gentoo Linux.
it sounds like you are probably using the wrong version of the plugin, one designed for a newer version of RC. please take a look in the repo under "switch branches" and you can switch to the 0.3.1 branch.
hi, i am having problems importing an ingo script. the sieverules plugin doesn't ask if i want to import the script. i wrote a test script to check if the ingo.sieve file can be imported by the srimport_ingo()->importer and that works.
do i have to enable the importer feature somewhere?
The importer is only called the very first time a user access the filters page (when no sieve filter file exists on the server) if there is nothing to import or the user chooses not to then a blank file is created so the importer is not trigger a second time. I'm not sure what srimport_ingo()->importer but I would like to say the import filters which SieveRules ships with are only proof on concept they are a long way from perfect.
i cannot reproduce this behaviour. i removed all sieve script files from a test user and then there was no import option and there hasn't been created a blank file.
if the import filters are only a proof of concept thats okey, i can work on that, but only if i can test the filter ;)
hmmm what version of the plugin are you using? iirc the inital setup was a little buggy in some versions. also (sorry this is a stupid question) but if you have delete all the sieve script files then did you also delete the ingo one?
may be if you take a look in sieverules.php at the _startup and gen_setup functions you can find the point at which its failing. if there no existing rule file found in _startup then gen_setup should be triggered. in gen_setup there is a call to $this->sieve->check_import() thats what checks if there is anthing to import.
Quote from: JohnDoh;28998hmmm what version of the plugin are you using?
head CHANGELOG says 2010 04 19
Quotebut if you have delete all the sieve script files then did you also delete the ingo one?
first no, but when you said "The importer is only called the very first time a user access the filters page (when no sieve filter file exists on the server)" i tried with no sieve file at all (i thought maybe it has to be uploaded by hand).
Quotemay be if you take a look in sieverules.php at the _startup and gen_setup functions you can find the point at which its failing. if there no existing rule file found in _startup then gen_setup should be triggered. in gen_setup there is a call to $this->sieve->check_import() thats what checks if there is anthing to import.
i will do that. with 'no existing rule file' you mean no
own rule file?
I'm sorry yes, I did make that very confusing. What I meant was that no rule file with the same name as specified in your sieverules config (roundcube.sieve by default) exists. Other files can remain there without a problem.
It sounds like you have the plugin version for 0.4b, if you have access to an SVN trunk version of RC then I suggest you give the repo version of sieverules a try.
Quote from: JohnDoh;28998may be if you take a look in sieverules.php at the _startup and gen_setup functions you can find the point at which its failing.
function gen_setup, line 367 is
if (sizeof($this->sieve->list) > 1) {
but i thihnk it should be
if (sizeof($this->sieve->list) > 0) {
with that change it works for me
hmm yea i guess it should be. well spotted, thanks!
i added some str_replace in the ingo.php import filter
elseif (isset($name[$i])) {
$token = str_replace(":comparator \"i;ascii-casemap\" ", "", $token);
$token = str_replace(":comparator \"i;octet\" ", "", $token);
$token = str_replace(":all ", "", $token);
$token = str_replace("not header :is \"Precedence\" [\"list\", \"bulk\", \"junk\"], ", "", $token);
the last line helps to parse the vacation notice rules from ingo. ingo always adds the following sieve code:
if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", "list-owner", "list-post", "list-archive", "list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*" ) {
and the Precedence-Header ist the only one that isn't being parsed properly by the sieverules plugin.
i don't know if it makes sense to use all of these sieve rules in an vacation notice; dovecot sieve does some filtering in vacation anyway (LDA/Sieve - Dovecot Wiki (http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply)).
what really would be great: if i could add an alias in the 'out of office' filter without having the alias to be an identity. if i have a lot of email addresses i don't want to configure an identity for everyone of them to have vacation notices sent for them.
Thanks for the code for the import filter.
For the vacation aliases, I understand that if you have alot of aliases that it could be difficult, but then not all implementations require the :addresses option. So it kinda depends on your setup a bit. I'll keep the idea in mind.
[26-Aug-2010 15:36:35] PHP Fatal error: Call to undefined function rcube_parse_host() in /var/lib/roundcube/plugins/sieverules/sieverules.php on line 1133
I downloaded the latest version of sieverules.
Top of the changelog:
2010 07 03
==========
* Update to Net_Sieve 1.3.0
And I get the top error.
The latest version of the Sieverules plugin requires RC 0.4 stable.
Is there a release available for use with the version of roundcube I am using. I am not ready to upgrade yet. Thanks
yep, older versions are available in the repo: JohnDoh's RoundCube-Plugin-SieveRules-Managesieve at 0.3.1 - GitHub (http://github.com/JohnDoh/RoundCube-Plugin-SieveRules-Managesieve/tree/0.3.1)
New European Portuguese (pt_PT) translation for Managesieve plugin.
thats great, thanks very much.
birger: the latest repo version of the plugin has an option to allow free entry of vacation aliases, it will work with 0.4-stable too.
Hi there,
I'am still hunting down my spam problems and need some help. What I basically want to acieve is, that if a message header contains X-Spam-Flag = Yes / or the message subject contains "[*****SPAM*****]" it should be moved to the Junk folder, but this should work "out of the box" - so the user should not have to create a Spam-Filter.
I've realized user-filter via sieverules (Changelog 2010 07 03), cmusieve and dovecot 1.0.15 (I use debian lenny - so I'm bound to this version of dovecot). According to this post (http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/4878-sieverules-plugin-4.html#post27037) - it is not possible to apply a global sieverule with cmusieve, when userprefs exist. So I've to stick to the userprefs...
Is there a possibility to create this default Filter? Can I achieve this by using the "$rcmail_config['sieverules_predefined_rules'] = array();" in config.inc.php ../sieverules?
Thanks for any help!
Best regards
osterhase
It sounds like you want to use the sieverules_default_file option rather than the predefined rules, and set auto_load_default to true. then if/when a user opens the filter page they will see the spam rule already active.
Indeed. Thanks again.
I had both a similar issue with Managesieve.
There is no Move Message To action when I want to move a message to a specific mailbox.
When I edit my Spam filter (which was made manually on the server) the action that shows up in the box is Redirect Message To and then a dropdown box containing all my IMAP folders.
Trying to submit this fails saying to please enter an email address.
I am using Dovecot 2.0.4 and the latest Dovecot Pigeonhole.
Anyone got any pointers?
If you wrote the rule manually then chances are the plugin just doesnt understand it. If you post the rule I might be able to see the problem.
The rule is as follows:
require "fileinto";
# rule:[Spam]
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}
Even when I attempt to add a new rule I have no "move message to" to the action dropdown box. I have included a screen shot of what I mean.
This is the all the relevant (that i can see) in the config file:
// allowed actions
$rcmail_config['sieverules_allowed_actions'] = array(
'fileinto' => TRUE,
'vacation' => TRUE,
'reject' => TRUE,
'redirect' => TRUE,
'keep' => TRUE,
'discard' => TRUE,
'imapflags' => TRUE,
'notify' => TRUE,
'stop' => TRUE
);
oh right, thats a different problem. your managesieve server is not returning fileinto in the list of supported extensions... if you telnet to to server you should see something like this:
"IMPLEMENTATION" "dovecot"
"SASL" "PLAIN LOGIN"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex"
"STARTTLS"
OK "Dovecot ready."
see line 3 all the extensions support by the server are listed, the plugin checks these so it doesnt allow users to create rules which arent supported.
got it sorted thanks JohnDoh.
telnet'ed to the managesieve server and got empty lines, so went back to read the documentation and this caught my eye.
# Explicitly specify the SIEVE and NOTIFY capability reported by the server before
# login. If left unassigned these will be reported dynamically according to what
# the Sieve interpreter supports by default (after login this may differ depending
# on the user).
#managesieve_sieve_capability =
#managesieve_notify_capability =
I had both lines uncommented without setting anything. Should really read the configuartion examples better before asking for help.
Cheers again :)
After i installed and set configuration, Filters tab is shown in Settings, unable to connect managesieve server msg is shown while click the filter tab. Please reply with your comments.
Thanks in advance...:)
ok lets start with the basics... have you configured the problem correctly with the right host address for the managesieve server and the right port? have you checked there is no firewall or anything in the way? can you telnet from your webserver to the managesieve server?
just completed the first install, the only issues were human error
I really like this plugin, but have a couple issues...
Smartsieve support:
Up until now, we have been using smartsieve to create our filters, and the only reason it can't be just be used is the lack of rule names (and the filename). It would be great to have it just work without having to do an import, but I understand if I have to import.
Importing- Active ruleset:
I've written an import filter for smartsieve files, and it works fine, but I've noticed that when you do the import it writes out the new sieve file (roundcube.sieve for me), but it does not change the default sieve file until you click the save button inside of a rule. It should change the default ruleset when the import happens, assuming sieverules_multiplerules is false.
Importing - setting default import:
As we migrate from smartsieve to sieverules, I'd like to avoid the 'No existing filters detected!' screen. It would be great if there was a setting that let you automatically import the users sieve file, and set it to be active.
Vacation filters:
if you use the 'sieverules_use_elsif' setting, it makes vacation filters really hard or impossible to use. If it's at the top of your rules, it will intercept all messages and reply to them, but not perform the other rules. If it's at the bottom, then if any of your other rules applies, then the vacation filter doesn't reply. I'd like to see the vacation functionality always be an IF, outside of the main if/elseif statement. This way, the vacation filter could reply to my mails, and my mail could still be filtered (some thought would need to done regarding spam filtering). Yes, I can change the 'sieverules_use_elsif' setting to be false, but it still feels like a problem.
QuoteVacation filters:
if you use the 'sieverules_use_elsif' setting, it makes vacation filters really hard or impossible to use. If it's at the top of your rules, it will intercept all messages and reply to them, but not perform the other rules. If it's at the bottom, then if any of your other rules applies, then the vacation filter doesn't reply. I'd like to see the vacation functionality always be an IF, outside of the main if/elseif statement. This way, the vacation filter could reply to my mails, and my mail could still be filtered (some thought would need to done regarding spam filtering). Yes, I can change the 'sieverules_use_elsif' setting to be false, but it still feels like a problem.
-1 from me. i'm not sure how you would explain to some one that some rules work one way while others work completely differently. i think that for the more advanced user there is the advanced user or set elsif to false and use the stop action when you want the script to stop.
I am just about to switch our webmail system from Horde to Roundcube and was wondering it care should be taken when installing Sieverules? Will the upgrade from horde sieve files to Sieverules go ok or should I monitor the process carefully? Also, can I see any log of the upgrade process?
Regards,
BTJ
As with any upgrade process you should always take care. If I were you I'd get several different existing sieve filter rule files so I can create and test the import filter. There is no logfile of the import by default although your import filter can write one, both the old and new rule files will exist after the import do you can switch back if needed.
Here are a few examples...:
# Sieve Filter
# Generated by Ingo (http://www.horde.org/ingo/) (16. aug. 2010, 09:02:55)
require ["vacation", "regex"];
# Vacation
if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", "list-owner", "list-post", "list-archive", "list-id", "Mailing-List"], not header :comparator "i;ascii-casemap" :is "Precedence" ["list", "bulk", "junk"], not header :comparator "i;ascii-casemap" :matches "To" "Multiple recipients of*" ) {
if header :regex "Received" "^.*(2010) (\\(.*\\) )?..:..:.. (\\(.*\\) )?(\\+|\\-)....( \\(.*\\))?$" {
if header :regex "Received" "^.*(Jul) (\\(.*\\) )?.... (\\(.*\\) )?..:..:.. (\\(.*\\) )?(\\+|\\-)....( \\(.*\\))?$" {
if header :regex "Received" "^.*(19|20|21|22|23|24|25|26|27|28|29|30|31) (\\(.*\\) )?... (\\(.*\\) )?.... (\\(.*\\) )?..:..:.. (\\(.*\\) )?(\\+|\\-)....( \\(.*\\))?$" {
vacation :days 7 :addresses "[email protected]" :subject "God sommer! " "Jeg er på ferie nå og er tilbake 16.august. Vennligst kontakt sentralbord pr tlf.nr xx xx xx xx eller på e-post [email protected] og vi skal hjelpe deg med din henvendelse. ";
}
}
if header :regex "Received" "^.*(Aug) (\\(.*\\) )?.... (\\(.*\\) )?..:..:.. (\\(.*\\) )?(\\+|\\-)....( \\(.*\\))?$" {
if header :regex "Received" "^.*([0 ]1|[0 ]2|[0 ]3|[0 ]4|[0 ]5|[0 ]6|[0 ]7|[0 ]8|[0 ]9|10|11|12|13|14|15) (\\(.*\\) )?... (\\(.*\\) )?.... (\\(.*\\) )?..:..:.. (\\(.*\\) )?(\\+|\\-)....( \\(.*\\))?$" {
vacation :days 7 :addresses "[email protected]" :subject "God sommer! " "Jeg er på ferie nå og er tilbake 16.august. Vennligst kontakt sentralbord pr tlf.nr xx xx xx xx eller på e-post [email protected] og vi skal hjelpe deg med din henvendelse. ";
}
}
}
}
# Sieve Filter
# Generated by Ingo (http://www.horde.org/ingo/) (09. aug. 2010, 10:42:56)
# Svartelistet adresser
if address :all :comparator "i;ascii-casemap" :is ["From", "Sender", "Resent-From"] ["[email protected]", "[email protected]", "[email protected]", "[email protected]"] {
discard;
stop;
}
# Sieve Filter
# Generated by Ingo (http://www.horde.org/ingo/) (20. sep. 2010, 06:09:46)
# Videresendinger
if true {
redirect "[email protected]";
stop;
}
BTJ
Hello!
I desperately need support for custom imap(4)flags. Here's an example:
require ["imapflags","fileinto"];
if allof (header :is "X-Spam-Flag" "YES") {
addflag "Junk";
fileinto "Spam";
}
For my internal workflow, it's necessary to set the "Junk"-Flag additionally to the move to the Spam-Folder.
Currently, sieverules only allows the predefined Flags like \\Flagged, etc. It would be nice, if I could define extra flags like "Junk", "NonJunk" or "$LABEL1", etc. in the config.inc.php. Also an "other..." option would be cool, so the user can set own flags like "$MyOwnFlag".
Would be REALLY nice to see that (easy to implement) feature in one of the next versions. Thanks!
regards,
Stefan
changed for testing:
[sieverules.php]
private $flags = array('flagread' => '\\\\Seen',
'flagdeleted' => '\\\\Deleted',
'flaganswered' => '\\\\Answered',
'flagdraft' => '\\\\Draft',
'flagflagged' => '\\\\Flagged',
'flagjunk' => 'Junk',
'flagnonjunk' => 'NonJunk',
'flaglabel1' => '$Label1',
'flaglabel2' => '$Label2',
'flaglabel3' => '$Label3',
'flaglabel4' => '$Label4',
'flaglabel5' => '$Label5'
);
works (almost) perfectly. The only odd thing is, that the new flags are displayed as e.g. "[flagnonjunk]". It would be better to display not localized flags with the flagname, i.e. "NonJunk".
you need to define the text for the flagnonjunk label in your localisation file. also you can define the flag array in your config file already, check the readme.
how do I get the sieverules plugin to write the sieve file using imap4flags instead of imapflags? I tried making imapflags FALSE and imap4flags TRUE but that didn't work. Right now I just enabled the legacy imapflags in the dovecot.conf but wondering what the proper way is...
you should not need to change anything in the config for that. the plugin uses imapflags or imap4flags based on the extentions given by the server
Greetings, I'm a support team member of a company who is working on migrating from squirrelmail/avelsieve to roundcube/sieverules.
One of the common feedbacks I've received is that after migrating having 30 rules called 'Unnamed rule X' is a bit hard to sort though so I've recoded the default avelsieve import plugin provided to the one attached to this message. This one extracts bits of information from the actions to give a name to each rule.
It seems to work well enough in my testing so I'd like to release it since other people might find it useful. (gpl2 if you want to worry about license, I don't personally think it's enough code to really work about - mainly mentioning it incase JohnDoh thinks it's useful enough to stick in the repo).
On a side note - the horde/ingo filter I've found is a bit greedy in it's matching, it kept matching my squirrelmail filter sets until I removed it from my install. I've not bothered patching it though since I don't have a horde/ingo install on hand to find a better detector function rule with.
Now on a less fun note with both my updated avelsieve import plugin and the default one I'm finding some filter sets are not always importing. The odd thing is that if I delete the roundcube sieve rule, then change the rules order in squirrelmail and do the import again it often then works.
I'm trying to dig up more information on what fails and why when the rules are in a certain order. However even with $rcmail_config['sieverules_debug'] = true;
set in my config file I don't seem to get any debugging output in the log file about the actual import itself - I see the avelsieve rule get read in full, then a truncated squirrelmail rule gets written out with just the requires line and nothing else.
There are no errors in the webserver logs either that I can see, is there any thing more I can do debugging wise short of patching the code to add a bunch more debug output lines in the import part of the code?
Thanks for the improved import script. there is no debugging stuff in the import filters by default, they are really only proof on concept.
Its hard to say what might be wrong, could you send me an example file perhaps and may be I can see if its a problem in the import filter or inside the plugin its self.
If it helps a quick way to write info to log files for debuggin in RC is to use the write_log function:
write_log('filename', 'value to log');
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)
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.
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
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
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.
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 ?
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/
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.
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
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.
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 ;)
Thanks - that did it. :-)
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
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.
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 ?!!?!
QuoteSo, if both default rule exist (global.sieve) and user defined rules, default rule is not load and not applied.
Thats right, sounds like you are talking about global seive rules, not default ones. Take a look here LDA/Sieve/Dovecot - Dovecot Wiki (http://wiki.dovecot.org/LDA/Sieve/Dovecot) at the sieve_before/after options
Quote from: fritz001;32674Hello 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";
}
Thanks, second problem solved, now about folder autocreation, in order to make this possible I have to enable advance editor and to add by hand require ["fileinto","mailbox"]; and file :create "mailbox_name".
So can you add this as a future feature to sieverules plugin ?
At the moment you can only select from folders which already exist so there is no need for the create option. In the future if the possibility to add what ever folder you want is added I will add a create option.
Hi i have a problem with the apereance of the plugins
it looks like the css have an error.
i use roundcube .5 and the lastest siverules plugin
someone know a fix for this
have you cleared your browser cache and double checked that all the skin files for the plugin are up to date?
i tried it with diffrent browsers (firefox,ie) und clear cache jeah but same
an i think the files are all uptodate
installed folders
ls -latr skins
drwxr-xr-x 2 root root 4096 8. Jun 2010 templates
-rw-r--r-- 1 root root 747 8. Jun 2010 rename.png
-rw-r--r-- 1 root root 537 8. Jun 2010 enable.png
-rw-r--r-- 1 root root 568 8. Jun 2010 enablePas.png
drwxr-xr-x 3 root root 4096 8. Jun 2010 ..
-rw-r--r-- 1 root root 279 9. Okt 12:53 up_arrow.png
-rw-r--r-- 1 root root 285 9. Okt 12:53 down_arrow.png
-rw-r--r-- 1 root root 775 9. Okt 12:53 delete.png
-rw-r--r-- 1 root root 752 9. Okt 12:53 deletePas.png
-rw-r--r-- 1 root root 733 9. Okt 12:53 add.png
-rw-r--r-- 1 root root 5123 30. Jan 11:19 sieverules.css
-rwxr--r-- 1 root root 114 30. Jan 11:19 safari.css
-rwxr--r-- 1 root root 1577 30. Jan 11:19 iehacks.css
-rwxr--r-- 1 root root 193 30. Jan 11:19 ie6hacks.css
-rwxr--r-- 1 root root 2361 30. Jan 11:19 icons.png
-rwxr--r-- 1 root root 1584 30. Jan 11:19 icons.gif
-rw-r--r-- 1 root root 1024 30. Jan 11:19 help.gif
drwxr-xr-x 3 root root 4096 30. Jan 11:19 .
ls -latr templates/
insgesamt 28
drwxr-xr-x 2 root root 4096 8. Jun 2010 .
-rw-r--r-- 1 root root 5042 30. Jan 11:19 sieverules.html
-rw-r--r-- 1 root root 814 30. Jan 11:19 setupsieverules.html
-rw-r--r-- 1 root root 1520 30. Jan 11:19 editsieverule.html
-rw-r--r-- 1 root root 2707 30. Jan 11:19 advancededitor.html
drwxr-xr-x 3 root root 4096 30. Jan 11:19 ..
folder from the zipfile.
drwxr-xr-x 3 root root 4096 30. Mai 2009 ..
drwxr-xr-x 2 root root 4096 9. Okt 13:28 templates
-rwxr--r-- 1 root root 2361 9. Okt 13:33 icons.png
-rwxr--r-- 1 root root 1584 9. Okt 13:33 icons.gif
-rwxr--r-- 1 root root 1024 9. Okt 13:33 help.gif
-rwxr--r-- 1 root root 5123 12. Jan 22:16 sieverules.css
-rwxr--r-- 1 root root 114 12. Jan 22:16 safari.css
-rwxr--r-- 1 root root 1577 12. Jan 22:16 iehacks.css
-rwxr--r-- 1 root root 193 12. Jan 22:16 ie6hacks.css
drwxr-xr-x 3 root root 4096 12. Jan 22:16 .
you are definatly running rc 0.5 right?
try checking these 2 files are the same as the ones you have
https://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/blob/master/skins/default/templates/sieverules.html
https://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/blob/master/skins/default/sieverules.css
Quote from: JohnDoh;32842you are definatly running rc 0.5 right?
yes im sure
Quote from: JohnDoh;32842try checking these 2 files are the same as the ones you have
https://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/blob/master/skins/default/templates/sieverules.html
https://github.com/JohnDoh/Roundcube-Plugin-SieveRules-Managesieve/blob/master/skins/default/sieverules.css
i copied the two files now
but the same error
do i have to move these into the roundcube skins folder ?
Quotedo i have to move these into the roundcube skins folder?
nope, they go in the sieverules skin folder, the path for each file is printed just above the code on those links i posted before.
I just downloaded a frech copy of rc 0.5 and the 0.5 version of sieverules and I have no problem with the skin. I dont know what you've done but I would guess somewhere you have forgotten to update either some of the sieverules files or the rc ones (was it a fresh install or an upgrade?). only the default skin of rc is supported.
it was an update from roundcube 0.4.2
hmm maybe i have to do a clean install ... this would be very annoying
###
Update
i did now a new clean installation
this fixed now the error.
very weird
gald you got it all sorted.
Hi,
I've installed the plugins but i don't see the Filters tab on settings. I don't get any errors on log files. Can someone guide me to fix this?
Hi,
Please give a little more information about your setup.... things like:
What version of RC are you running?
What version if sieverules have you installed?
Did you actually enable it in your config or just dump the dir in?
Are there any JS errors on the page when you goto the settings section?
I just wanted to comment & say keep up the quality work. I've bookmarked your froums just now and I'll be back to read more in the future my friend! Also well-chosen colors on the theme it goes well with the blog in my modest opinion
(yhm20110416)
Hi all,
I have the lastest sieverules (Apr 21) installed under roundcube v0.5.2 and dovecot v2.0.11. As far as I can tell it works fine, except for one particular filter statement, and I am wondering whether I am encountering an internal limitation.
In Thunderbird, I had a large filter set up to move all "bulk" mail (not junk, just non-personal mail) to a separate folder named Bulk.
Rather than retype everything, I copied the relevant Thunderbird entries in an editor, formatted them accordingly, and recreated the filter statement by hand in the sieve file.
The roundcube plugin can open and display this sieve statement, but if any changes are made to it and I try to save it, an error message is displayed:
The action you requested is not supported by the server
In the roundcube error log, I see this:
{115}roundcube: line 59: error: expecting ',' or end of test list ')', but found ':'. roundcube: error: parse failed. (3):
As far as I can tell, there is no syntax error in the this particular statement.
This statement is (the bit between the parentheses) 166 lines, 9532 bytes. Is this exceeding some limit? FWIW, here is it (contains no private info): pastebin - sieve filter statement - post number 2053021 (http://pastebin.ca/2053021)
Thanks.
Do you know what the php setting post_max_size is set to on your server? I can't remember exactly which one it is right now but I know I have seen this problem before and it was caused by a PHP restriction on how much data could be submitted via the form.
Thanks for the quick reply. post_max_size is set to 8MB, so I guess the problem must lie elsewhere.
do you have suhosin enabled with your php? i was researching the problem on the net, trying to find the php setting and i saw something about suhonsin, i turned it off on my server and i can save your rule just fine. i guess there is some setting or something you can change rather than just turn it off if you want
Ah... yes, susohsin is indeed the culprit. If I comment it out from ../php/extensions.ini, this filter can be be saved.
I have been running suhosin using the default settings. According to this page (http://www.webhostgear.com/416.html), the following are optional suhosin configuration parameters which can be added to php.ini. Any idea what might apply in this case?
Advanced Suhosin Configuration
Configuring Suhosin – example suhosin configuration
You can manually configure options for Suhosin in the php.ini for PHP. This is the most confusing part that most people get lost at.
If you want advanced configuration to change the default settings form Suhosin you can edit the PHP.ini and add in these values below the extension=suhosin.so
Note this part isn't required, only for your own liking.
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[suhosin]
; Logging Configuration
suhosin.log.syslog.facility = 9
suhosin.log.use-x-forwarded-for = Off
; Executor Options
suhosin.executor.max_depth = 0
suhosin.executor.include.max_traversal = 4
suhosin.executor.disable_emodifier = Off
suhosin.executor.allow_symlink = Off
; Misc Options
suhosin.simulation = Off
;
suhosin.apc_bug_workaround = Off
suhosin.sql.bailout_on_error = Off
suhosin.multiheader = Off
suhosin.mail.protect = 1
suhosin.memory_limit = 20
; Transparent Encryption Options
suhosin.session.encrypt = On
suhosin.session.cryptua = On
suhosin.session.cryptdocroot = On
suhosin.session.cryptraddr = 0
suhosin.cookie.encrypt = On
suhosin.cookie.cryptua = On
suhosin.cookie.cryptraddr = 0
; Filtering Options
suhosin.filter.action = 406
suhosin.cookie.max_array_depth = 100
suhosin.cookie.max_array_index_length = 64
suhosin.cookie.max_name_length = 64
suhosin.cookie.max_totalname_length = 256
suhosin.cookie.max_value_length = 10000
suhosin.cookie.max_vars = 100
suhosin.cookie.disallow_nul = On
suhosin.get.max_array_depth = 50
suhosin.get.max_array_index_length = 64
suhosin.get.max_name_length = 64
suhosin.get.max_totalname_length = 256
suhosin.get.max_value_length = 512
suhosin.get.max_vars = 100
suhosin.get.disallow_nul = On
suhosin.post.max_array_depth = 100
suhosin.post.max_array_index_length = 64
suhosin.post.max_totalname_length = 256
suhosin.post.max_value_length = 65000
suhosin.post.max_vars = 200
suhosin.post.disallow_nul = On
suhosin.request.max_array_depth = 100
suhosin.request.max_array_index_length = 64
suhosin.request.max_totalname_length = 256
suhosin.request.max_value_length = 65000
suhosin.request.max_vars = 200
suhosin.request.max_varname_length = 64
suhosin.request.disallow_nul = On
suhosin.upload.max_uploads = 25
suhosin.upload.disallow_elf = On
suhosin.upload.disallow_binary = Off
suhosin.upload.remove_binary = Off
suhosin.session.max_id_length = 128
Thanks
i would guess its these ones suhosin.post.max_array_depth = 100
suhosin.post.max_array_index_length = 64
suhosin.post.max_totalname_length = 256
suhosin.post.max_value_length = 65000
suhosin.post.max_vars = 200
suhosin.post.disallow_nul = On
but may be some one else knows something about suhosin
Hi, guys! Help me with my problem please.
Can I use this plugin with bracket "Postfix+Cyrus(with Sieve)"?
My RoundCube said "Unable to connect to the server sieve" although i have succesful connect to it on server console (on port 4190):
bsd:~# telnet localhost sieve
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.2.13-Debian-2.2.13-19"
"SASL" "PLAIN"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex"
OK
Where is the reason of my problem? Thank you..
Sorry for my bad English.
Hi,
I receive the following error after installing the sieverules plugin:
PHP Fatal error: Call to undefined function rcube_idn_to_ascii() in /var/lib/roundcube/plugins/sieverules/sieverules.php on line 1155
PHP 5.3.3-7+squeeze1 with Suhosin-Patch
Roundcube Version: 0.3.1-6
you've got the wrong version of the plugin, there are instructions on the website, please make sure you've downloaded the right version.
hello John,
Well create folder option it's a little buggy::
Tested on latest version of dovecot + qmail/postfix!!
lda_autocreate and lda_autosubscribe are set to YES
Here is default behaviour::
require ["imap4flags","fileinto"];
# rule:[filter1]
if anyof (address :contains "From" "
[email protected]")
{
setflag "\\Flagged";
fileinto "[GMAIL]";
}
So, in this case folder is not created and sieve is delivering the message to INBOX
however the corect filter should be like this
require ["imap4flags","fileinto",
"mailbox"];
# rule:[filter1]
if anyof (address :contains "From" "
[email protected]")
{
setflag "\\Flagged";
fileinto "
INBOX.[GMAIL]";
}
please try the latest repo version
John,
Even with latest repo still buggy
require ["imap4flags","fileinto","mailbox"];
# rule:[filter1]
if anyof (address :contains "From" "
[email protected]")
{
setflag "\\Flagged";
fileinto :create "Debug";
}
cat dovecot.sieve.log
sieve: info: started log at Aug 05 14:59:20.
error: msgid=
: failed to store into mailbox 'Debug': Unknown namespace.
I was testing both versions and the "latest repo version" fails to include IMAP root at the creation of filter for all actions COPY to FOLDER or CREATE Folder.
$rcmail_config['sieverules_include_imap_root'] = true;
Also :create option is not necessary ; dovecot 2.xx supports lda_autocreate
It adds the namespace fine for me. Does your sieve implementation and your IMAP use the same namespace settings? If you select an existing folder is the namespace added?
QuoteAlso :create option is not necessary ; dovecot 2.xx supports lda_autocreate
True but :create is how it says to do it in the RFC, I'm trying not to make it Dovecot specific.
Well ,
With old plugin
require ["imap4flags","fileinto"];
# rule:[filter1]
if anyof (address :contains "From" "
[email protected]")
{
setflag "\\Flagged";
}
# rule:[filter2]
elsif anyof (address :contains "From" "yyy")
{
fileinto "INBOX.Yahoo1";
}
...and with updated plugin
require ["imap4flags","fileinto"];
# rule:[filter1]
if anyof (address :contains "From" "
[email protected]")
{
setflag "\\Flagged";
}
# rule:[filter2]
elsif anyof (address :contains "From" "yyy")
{
fileinto "Yahoo1";
}
!!FIXED by myself :) !! take a look at old sieverules.php and modified a little the new one !!
Hi to all,
I just have installed the sieverules plugin and I have a bug when I import script form Ingo, the script imported is empty. Here is the log :
[10-Aug-2011 08:57:01 +0200]: C: GETSCRIPT "ingo"
[10-Aug-2011 08:57:01 +0200]: S: {251}
[10-Aug-2011 08:57:01 +0200]: S: # Sieve Filter
# Generated by Ingo (Ingo - The Horde Project (http://www.horde.org/ingo/)) (June 21, 2011, 11:00 am)
require "fileinto";
# cyrille
if address :all :comparator "i;ascii-casemap" :contains "From" "cyrille.chalier" {
fileinto "INBOX/cyrille";
stop;
}
[10-Aug-2011 08:57:01 +0200]: S: OK
[10-Aug-2011 08:57:01 +0200]: C: PUTSCRIPT "roundcube" {247+}^M
# rule:[Sieve Filter]
# rule:[Generated by Ingo (Ingo - The Horde Project (http://www.horde.org/ingo/)) (June 21, 2011, 11:00 am)]
require "fileinto";
# rule:[cyrille]
if address :all :contains "From" "cyrille.chalier" {
fileinto "INBOX/cyrille";
stop;
}
[10-Aug-2011 08:57:01 +0200]: S: OK
[10-Aug-2011 08:57:01 +0200]: C: PUTSCRIPT "roundcube" {18+}^M
/* empty script */
[10-Aug-2011 08:57:01 +0200]: S: OK
[10-Aug-2011 08:57:01 +0200]: C: SETACTIVE "roundcube"
[10-Aug-2011 08:57:01 +0200]: S: OK
[10-Aug-2011 08:57:01 +0200]: C: LISTSCRIPTS
[10-Aug-2011 08:57:01 +0200]: S: "ingo"
[10-Aug-2011 08:57:01 +0200]: S: "roundcube" ACTIVE
[10-Aug-2011 08:57:01 +0200]: S: OK
[10-Aug-2011 08:57:01 +0200]: C: GETSCRIPT "roundcube"
[10-Aug-2011 08:57:01 +0200]: S: {18}
[10-Aug-2011 08:57:01 +0200]: S: /* empty script */
[10-Aug-2011 08:57:01 +0200]: S: OK
[10-Aug-2011 08:57:01 +0200]: C: LOGOUT
[10-Aug-2011 08:57:01 +0200]: S: OK "Logout Complete"
All is correct exept when the script is writen on the server (not on the localhost, it's a cyrus) it writes the empty script
Can you help me ?
Thanks in advance,
Cyrille
Hi. Using the example you gave I have made a very minor adjustment to the example file but for it to work for you it will need a lot more work. You could try creating some of your rules in sieverules and the checking what it generates and then write the import filter so it makes the same. Sorry I cant be more help, the import filters really are only in there as proof of concept. I don't have any real world examples of rule files generated by other systems or the need for the import myself.
Quote from: kase;18990Hello,
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 :D )
If you need further informations, ask :)
thanks,
kase
Problem is you're using a global sieve rules file. It's not supposed to be executed if the user has their own sieve rules. What you want to do is rename the rules file from global.sieve, which is executed only in the absence of user rules, to before.sieve, which is executed for all users.
Hi, I just discovered that the vacation rule created by Sieverules replies to all incoming mail. Replying to mailing list mail is what's called being a bad neighbor, and tends to get the person using the autoresponder disabled from their mailing lists along with angry notes from other subscribers.
I'd like to alter my Sieverules plugin to generate out-of-office rules as noted here Correct sieve vacation filtering (http://www.bsdunix.ch/serendipity/index.php?/archives/379-Correct-sieve-vacation-filtering.html) (with the exception that Precedence: Junk should also be included, as well as null senders, MAILER-DAEMON, and DSNs (delivery status notifications)), and I was wondering if someone could point me in the right direction.
what exactly do you want to know? you can use the top half of the form, the "filter rules" section to put tests in which have to be passed before the vacation message is sent. the example you linked they have the line if not header :contains "Precedence" ["bulk","list"] {
so on the form you select "other header" in the first box, type "Precedence" (without the quotes) in the text box which appears next to it. then select "does not contain" and finally "bulk" (without the quotes). and then press the add button and make another row but with "list" in the final box.
Quote from: JohnDoh;36148what exactly do you want to know? you can use the top half of the form, the "filter rules" section to put tests in which have to be passed before the vacation message is sent. the example you linked they have the line if not header :contains "Precedence" ["bulk","list"] {
so on the form you select "other header" in the first box, type "Precedence" (without the quotes) in the text box which appears next to it. then select "does not contain" and finally "bulk" (without the quotes). and then press the add button and make another row but with "list" in the final box.
If I have to try and explain the need to do this to users, it's never going to happen, at least not until they've inconvenienced a lot of people including themselves. I want to generate out of office rules that comply with community standards without having to explain things like Precedence: Bulk to users. They shouldn't have to remember that autoresponders should *never* respond to mailing lists or automatic notices and how not to, they expect that to be taken care of by the software, and it was pretty surprising to me to learn that Sieve vacation doesn't try to handle this on its own. Since it doesn't, it falls to me to take care of this for my users by having Sieverules do it by generating a proper autoresponder rule for them instead.
The simple answer is that everyone has different mail server setups and different times when they want their vacation messages sent out so doing it out of the box is impossible. I think you have 4 options:
1) Use a simple predefined rule and just select that every time.
2) Create a more complex rule in an example rule file and use that ever time.
3) Mod the plugin code to do what you want.
4) Use a different plugin.
Hi there!
I'm using roundcube & sieverules on our mailservers for about half a year now and we are really convinced! Because the server-landscape expanded we had to move to ISPConfig3 to administrate our servers. This software also provides the possibility to edit filterrules but the mechanism of ISPConfig3 and sieverules do not like each other and both keep overwritting each others files.
So I want to customize sieverules and wanted to ask for a feedback if my line of thought is generally possible or completly of the track and would appreciate a couple of starting-points:
1. I want that sieverules writes the rules that are installed by the users into the file roundcube.sieve but it should leave the file dovecot.sieve alone (due this is the file in that the rules are actually written by ispconfig). Where (e.g. in which file) can I disable the linkage of roundecube.sieve to dovecot.sieve?
2. I would like to have a custom php-script/code run each time a user edits / saves a filter rule. This piece of code establishes a connection to ISPConfig (API) and writes the roundcube.sieve file as a ruleset into the database of ISPConfig which than applies this into the actual dovecot.sieve-filter-file. Where do I have to add this code-snippet (in which file(s))?
3. I would like to use the $user-variable in the script - is this possible and is the output the format "
[email protected]"?
I'm thankful for any help and suggestions.
Best regards.
Quote1. I want that sieverules writes the rules that are installed by the users into the file roundcube.sieve but it should leave the file dovecot.sieve alone (due this is the file in that the rules are actually written by ispconfig). Where (e.g. in which file) can I disable the linkage of roundecube.sieve to dovecot.sieve?
2. I would like to have a custom php-script/code run each time a user edits / saves a filter rule. This piece of code establishes a connection to ISPConfig (API) and writes the roundcube.sieve file as a ruleset into the database of ISPConfig which than applies this into the actual dovecot.sieve-filter-file. Where do I have to add this code-snippet (in which file(s))?
it might be possible to solve both of these in the same (possibly slightly ineligant) solution. the roundcube ruleset is activated each time save is pressed unless there the multiple ruleset feature is enabled. when the save is completed a hook could be executed to allow any one to do anything they want, in this case, set the active one back to the ispconfig one and copy the rules into ispconfig. what do you think?
if not you just need to modify the save function, somewhere around line 920 in the repo version of sieverules.php
Quote3. I would like to use the $user-variable in the script - is this possible and is the output the format "[email protected]"?
do you mean the sieve variables extension? there is limited support for that when doing fileinto and for setting the the from address on vacation messages but thats about it.
Quote from: JohnDoh;36190it might be possible to solve both of these in the same (possibly slightly ineligant) solution. the roundcube ruleset is activated each time save is pressed unless there the multiple ruleset feature is enabled. when the save is completed a hook could be executed to allow any one to do anything they want, in this case, set the active one back to the ispconfig one and copy the rules into ispconfig. what do you think?
I'm not quite sure if I understood what you meant. But I rather think it's the right way to modify the save function. (What do you mean with multiple ruleset feature? That more than one condition / rule is applied to one filter?)
Quoteif not you just need to modify the save function, somewhere around line 920 in the repo version of sieverules.php
Yeah - we found that line and tried to modify it by inserting a function. A set of problems arised (to be honest: we are not php-godlords):
We defined our script as function at the beginning of sieverules.php:
and then called the function:
if ($save && $result === true) {
$this->api->output->command('display_message', $this->gettext('filtersaved1'), 'confirmation');
//osterhase inserted:
$user = '[email protected]';
api_ispconfig($user);
// end of insert
if ($script['disabled'] == 1)
$filter_name = $script['name'] . ' (' . $this->gettext('disabled') . ')';
else
$filter_name = $script['name'];
The function was actually executed but we stumbled over the security concept of our servers:
Aug 18 10:23:01 flux01 roundcube: PHP Warning: file(/var/vmail/domain.net/testen/sieve/roundcube.sieve): failed to open stream: Die Operation ist nicht erlaubt in /var/www/clients/client7/web45/web/plugins/sieverules/sieverules.php on line 56
The problem there is that the user which executes the script is not allowed to leave his web-directory and so we cannot read in the roundcube.sieve-file. This lead us to the general question how the sieverule-plugin is doing that (I assumed that it would do that via connecting to the managesieve-server and let this one do the changes in the maildir) - is that correct?
This is the first and major problem we have in customizing the sieverule-plugin - how to bypass our own security concept. Actually sounds weird... :D
My only idea at the moment is to get sieverules.php to save the roundcube.sieve file temporarlly in the tmp directory of roundcube until it is read in by the api_ispconfig function. Any other suggestions?
Edit: Is it possible to catch the content of roundcube.sieve before it is actually written? If yes, with which variable can it be called? So it would be possible to replace $spamfilter with that.
Quote from: JohnDoh;36190do you mean the sieve variables extension? there is limited support for that when doing fileinto and for setting the the from address on vacation messages but thats about it.
As you can see in the inserted lines we actually need the email-address of the current email-user to determine the correct database entry - my question was rather directed into this direction.
I've attached the modified sieverules.php (the "prints" are for debugging - obviously) and would be really thankful if you would have further suggestions.
QuoteThe problem there is that the user which executes the script is not allowed to leave his web-directory and so we cannot read in the roundcube.sieve-file. This lead us to the general question how the sieverule-plugin is doing that (I assumed that it would do that via connecting to the managesieve-server and let this one do the changes in the maildir) - is that correct?
Yes, the plugin connects to the managesieve server. It uses the Pear Net_Sieve lib for all the communication stuff.
In the repo version of the plugin I have just added the hook `sieverules_saved` so now you don't need to modify the sieverules code directly. You can make a new plugin which uses hook and then do whatever you want. I have attached an example of how to use it.
UPDATE 20110824: The sieverules_saved has been updated to make it more reliable. the attached example has been updated to reflect the changes, more information is available in the readme.
UPDATE 20110828: The hook is run BEFORE the save process completes (it can be used to abort a save) so the hook has been changed to sieverules_save to reflect this.
F*** YEAH! Thanks! Gonna check it out...
Hey John,
thanks again for your work! Your file really helped us to understand (really small scale though) how it's actually possible to write a plugin. A couple of questions arised because we also tried to implement the log functionality. The function reads:
write_log('errors', 'sieverules_saved login failed');
We figured that we could exchange 'errors' with 'log' - so it actually logs things even it is not an error:
write_log('log', "ispconfig: login successful. Session-ID: $session_id");
But we would not like to spam the logfiles everytime a user changes his spamfilter-settings with things like that. Is there an option like "debug" so it's just written in the log if a high log level is defined in the main-configuration file? (We tried 'debug' but it obviously did not work out.)
The second problem arised when the user is deleting a spamfilter. Because there's no hook in the sieverules.php sieverules_saved does not react on that. Do you think it's possible to add another hook there?
Attached is the current code of the plugin (we even set up an config.inc.php) :cool:
Thanks mate for your great work!
Hi,
just installed latest sieverules plugin : 1.14 but got an error reported in error_log when trying to access Settings menu in RoundCube :
PHP Fatal error: Call to undefined method rcube_plugin_api::load_plugin() in /var/www/html/roundcubemail-0.6-beta/program/include/rcube_plugin.php on line 96, referer:
Do I forgot something ? I can't figure why I'm having this error, all is working properly with version 1.9 of the plugin ...
If anyone is having a clue about the cause, thks by advance for your help.
Laurent
thats an error from the rc core, not the plugin. which version of rc are you running? v1.14 of sieverules requires 0.6b
Hi JohnDoh,
Thks for your reply.
Using RoundCube 0.6beta here, just upgraded it from 0.5.2 to 0.6beta with the help of bin/installto.sh script.
Is there any information I can provide you that can be useful ?
Laurent
QuoteBut we would not like to spam the logfiles everytime a user changes his spamfilter-settings with things like that. Is there an option like "debug" so it's just written in the log if a high log level is defined in the main-configuration file? (We tried 'debug' but it obviously did not work out.)
easiest way is just to put the write_log call inside an if statement which checks the log level from the config. there are lots of examples in my code and others of how to read values from the config.
QuoteThe second problem arised when the user is deleting a spamfilter. Because there's no hook in the sieverules.php sieverules_saved does not react on that. Do you think it's possible to add another hook there?
you are correct, the new improved version in the repo does a much better job and ensures the hook is called every time something is saved to the server. there is also a new example of how to use it in my earlier post.
QuoteUsing RoundCube 0.6beta here, just upgraded it from 0.5.2 to 0.6beta with the help of bin/installto.sh script. Is there any information I can provide you that can be useful ?
as i said its nothing to do with the plugin. may be you didnt copy some files when doing the update to 0.6b or something.
Hey John,
thanks again. Did not come to my mind at first to do it with an if-statement but it worked out fine. Thanks for that!
But we came across another problem:
$sieve->getScript($args['ruleset']);
Gets the current content of roundcube.sieve (and not the new content that is written). F.e. if the user has not defined (or deleted) all filters the roundcube.sieve content is:
/* empty script */
If a new filter is created the content that is passed by
$sieve->getScript($args['ruleset']);
is /* empty script */ but the new roundcube.sieve contains the newly created filter-rule (but is obviously overwritten by ispconfig).
Can you confirm that behavior? Any suggestions on that?
are you still using the old example? the raw script is now passed as an argument, check the updated example from the other post.
Missed that one sorry - gonna check it out.
Heya,
problems solved and it runs like a charme - thanks again, you really got me through it. We had a bit of difficulties because our servers run the stable version (0.5) so we had to do a couple of changes in the sieverules.php - but as soon as the stable version of 0.6 is out we could use this. Attached is the actual plugin which enables the communication between the sieverules-plugin and ispconfig. It's heavily based on John's example file. It actually should work also in the 0.6beta version.
Thanks!
osterhase please note in the latest revision I have changed the name hook to sieverules_save (dropped the d) this is because it is run before the save has completed so its a more accurate name. sorry about all the changes this week, this should be the last one.
Hey John - thanks for the information. I've updated the plugin. Furthermore I was able to get rid of the db_function which makes the plugin easier to install. File attached.
Best regards
Hello!
I'm new to roundcube.
I want to use Roundcube webmail client on my shared hosting account, and my mail server is Horde or MailEnable (I can choose one of them)
I have installed RoundCube successfully and it's great.
but I don't know how to add special rules for message Header and Title and text... ManageSieve don't add new rule, and new rule button of Sieverules plugin not work...
Is there anything needed to install on server? or how can I use it?
Please help!!
Best Regards!
Mahdi
Hi, please bare in mind that i have no idea about your setup so simply saying
Quoteand new rule button of Sieverules plugin not work...
is totally useless. there is almost ways some form a feedback to point you in the right direction may be a message in a red box at the top of the screen or a javascript error or something in the rc error log. i would hazard a guess that since neither of the plugins work you have failed to configure them to connect to your managesieve server.
Yes,this is quite possible
Hi,
I've found a bug in sieverules - one of my users keeps putting spaces on the end of their folder names. (Can't do that in roundcube it strips trailing spaces, need to use a client like thunderbird). If a folder ends with a space even though it's selectable in sieverules as a folder to filter into if you select it and press save the folder selection snaps back to Inbox. Checking the html source of the page the space is in the combobox html so it looks like the failure point is in the code that does the actual save. I'd assume the space is being stripped from the end of the folder name in some function stopping the folder from being found correctly while saving. A minor deal but I thought I'd mention it in case it's not too hard to fix since I can't seem to stop that user from ending folder names with spaces and then getting confused as to why they can't select them to filter into.
There I have some feedback on the 'out of office message' rule layout, I think it would make more sense if 'advanced options' was unticked by default. My users don't need to see those options and find them slightly confusing - as it stands the ability to hide some options to me doesn't really add up - you have to hide them after they show up but that doesn't save and to keep them hidden you'd need to hide them again each time you load the rule back up. (would anybody actually bother doing that each time they edit the rule?) I had a go at writing a patch to have advanced options unticked by default, I worked out where to do it when loading a previously saved rule but couldn't work out where to alter the javascript for when a new rule is created. Any chance you'd consider making the advanced options tick box be unticked by default when creating out of office messages?
Thanks
-J
Hi,
You are correct whitespace is trimmed off the folder name when the rule is saved. If you wanted to stop it doing that then search for the line $folder = $this->_strip_val($folders[$idx]);
. I guess removing it wouldn't make that much difference since the values are all pre filled any way.
The advanced options box in the out of office message is unticked by default, its only ticked if the plugin is configued to show them by default or of your rule uses them.
Quote from: JohnDoh;36475Hi,
You are correct whitespace is trimmed off the folder name when the rule is saved. If you wanted to stop it doing that then search for the line $folder = $this->_strip_val($folders[$idx]);
. I guess removing it wouldn't make that much difference since the values are all pre filled any way.
Thank you, changing that line to
$folder = $folders[$idx];
fixes the bug in my testing and so far I'm not finding any negative side effects. Think about it this may help me with other future cases as well. I know some other users at my company tend to put spaces at the start of folder names to manually force them to be indented in their folder list so I suspect such a folder name would trigger the same bug if selected as a folder to filter into. (if _strip_val removes whitespace at both ends of the string like I assume?)
Quote from: JohnDoh;36475Hi,
The advanced options box in the out of office message is unticked by default, its only ticked if the plugin is configued to show them by default or of your rule uses them.
Ahh I never noticed that before, I've got a cyrus server so I've always had
// Force the :addresses line to always be added to new vacation rules
// Some sieve setups require that the :address part of a vacation rule is always present for the message to be sent
// Cyrus setups need this to option set to true
$rcmail_config['sieverules_force_vacto'] = TRUE;
which now I trace though the code I see changes how advanced options are shown. I happen to also have
$rcmail_config['sieverules_limit_vacto'] = TRUE;
though so the address option isn't much use as the users only have one option and we want it shown so now I see how the code controls it I'll write a little patch for myself so those checks always end up with the advanced options set off.
Thanks for the help.
-J
Hi,
I miss "time condition" feature of this great plugin. E.g. I plan vacancy, so I create a filter to send out of office message for every new person. But I have to activate it last minute I leave the office and I must deactivate it, when I return. In fact I deactivate it, once my colleagues remind me. It would be great to have two filter's input fields - valid from and valid until.
Thanks
Leo
there is already the arival date option for tests so long as your sieve implementation supports the date extension.
No, this is something different. I want to configure following scenario:
For every message that I receive between 1.5. and 3.5. send reply with message: "Sorry I am on vacation, contact me on monday". And I do not want this automatic response to be sent on 30.4. or 4.5 and further. Such feature exists in Outlook / Exchange and I consider it as one of few useful features that MS delivered.
how is that not covered with the arivial date tests? see the attached screenshot for what i mean.
Hi!
There is a bug in v 1.18 with latest RC and dovecot backend. Dovecot uses UTF-8 for managesieve. Set SieveRules to use UTF-8 for folder names. Created an imap folder like this "Ü18". What happens is that SieveRules reads the available folders from RC and the sieve script from the server. It converts the folder names read from RC to the desired encoding (here UTF-8 for dovecot). After that it checks if the folder already exists. If it does not exist it shows "create folder".
The problem is that for the comparison if the folder exists it asks RC that uses mUTF7 (internally) but gives RC the already to UTF-8 converted folder name to do the comparison. So this always fails and SieveRules always shows "create folder" even if the folder already exists.
Did attach a quick and dirty fix.
Cheers!
-ru-
Hi John
i have some problem getting this plugin to work.
when i click on filter. i get a massages that says: $rcmail_config['sieverules_host'] = 'localhost';
in the config file, i the host i this.
$rcmail_config['sieverules_host'] = 'localhost';
did you make a typo?
Quotewhen i click on filter. i get a massages that says: $rcmail_config['sieverules_host'] = 'localhost';
typo ?
yea. is this really true:
Quotewhen i click on filter. i get a massages that says: $rcmail_config['sieverules_host'] = 'localhost';
i've never heard of anything like that before and i have no idea how you could of made it happen.