Roundcube Community Forum

 

Sieverules (managesieve) plugin

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

Previous topic - Next topic

JohnDoh

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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Rando

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.

sergest

#122
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 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.

periferral

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

JohnDoh

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)
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

avious

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.

dennylin93

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.

JohnDoh

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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

dennylin93

Thanks. That fixed the problem.

adlerweb_

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

JohnDoh

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
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

minusme

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.

JohnDoh

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 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
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

adlerweb_

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 &quot;Subject&quot; &quot;t<C3><A4>st&quot;)
{
        fileinto &quot;INBOX&quot;;
}


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.

JohnDoh

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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...