Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: raiden on February 15, 2010, 04:40:05 AM

Title: managesieve not filtering
Post by: raiden on February 15, 2010, 04:40:05 AM
Hey all,

I've installed RC 0.3.1, and now I've enabled the managesieve plugin. It seems to have activated well.

I see the tab Filters, can add and modify filters, and they even are processed on to the server.

 
# cat .dovecot.sieve
require ["fileinto"];
# rule:[SPAM]
if anyof (header :contains "Subject" "***SPAM***")
{
        fileinto "INBOX.Trash";
}
# rule:[Facebook]
elsif anyof (header :contains "From" "facebook")
{
        fileinto "Facebook";
}



As you can see it saves the filters nicely in the homedir of the users. Only the message-filtering itself does not work yet. Spam keeps ending up in my inbox.

Anyone an idea where I should check next ?

Thanks
Title: managesieve not filtering
Post by: raiden on February 17, 2010, 03:43:39 AM
Nobody ? JohnDoh ?
Title: managesieve not filtering
Post by: JohnDoh on February 17, 2010, 12:28:31 PM
well it sounds like a dovecot/sieve problem not an RC one. you say the rules are processed do you mean stuff from facebook goes into your facebook folder? your script doesnt make sense to me one folder has the INBOX. at the start and the other doesnt i would ahve thought they should have been the same. have you looked in your dovecot logs to see if there are any errors processing the file?
Title: managesieve not filtering
Post by: Granada on February 18, 2010, 01:52:52 AM
Hi raiden,

did you take a look at your logfiles? My own script filtering spam just looks the same as yours, but it works the way intended with our installation of cyrus-imap.
cyrus generates these kind of log entries, maybe dovecot does have some similiar feature to track down the problem:

Feb 18 07:01:41 mailserverXY cyrus/lmtp[25865]: Delivered: <32071_1266472901_4B7CD7C4_32071_1095519_1_DZLOEPFHSVPJZETBFSYC@msa.hinet.net> to mailbox: user.username.Trash

Regards
Ruediger
Title: managesieve not filtering
Post by: raiden on February 18, 2010, 02:01:15 AM
How does this actually work ? I have Postfix delivering mails into the Maildir, and that works fine. How does the sieve-filtering actually work ?

I don't see any weird errors in dovecot. And if I connect to the managesieve-port, I get a good response.

Quotewell it sounds like a dovecot/sieve problem not an RC one. you say the rules are processed do you mean stuff from facebook goes into your facebook folder? your script doesnt make sense to me one folder has the INBOX. at the start and the other doesnt i would ahve thought they should have been the same. have you looked in your dovecot logs to see if there are any errors processing the file?

When I said, it was processing the scripts, I was assuming the RC and the managesieve-parts were working cause the scripts writtein RC, where stored on the server via managesieve.

Maybe if I understand how it works, than I might be able to troubleshoot better. Furthermore, INBOX.Trash is just another folder in the Maildir.

Grtz, and thnx for the responses
Title: managesieve not filtering
Post by: JohnDoh on February 18, 2010, 02:46:09 AM
The sieve plugins for RC are just sieve clients there is no filtering done in RC, you must setup your server to read the sieve files and perform the filtering when it delivers the mail.
Title: managesieve not filtering
Post by: raiden on February 18, 2010, 03:18:46 AM
Hey John,

Sorry for the n00b questions. So if I understand correctly, mypostfix needs to read the sieverules, and deliver it to the right dir. Managesieve by itself is a manner to manage te sieverules (as the name says  :confused:)

Thanks
Title: managesieve not filtering
Post by: JohnDoh on February 19, 2010, 11:47:05 AM
well it depends on your setup if postfix actually delivers your email then that will need to read the sieve files, if it gives it to dovecot to deliver then dovecot will need to read the files.
Title: Same here!
Post by: q3media on February 26, 2010, 03:54:36 AM
I'm with you on this one.
I have squirrelmail with avelsieve running on the same system.
That seems to be working OK.

So sieve is doing fine.

But managesieve filters from RC are not applied.
They are getting written but nothing seems to happen...

Let me know what I can supply to resolve this issue.
Title: managesieve not filtering
Post by: karatha on March 07, 2010, 01:57:44 PM
I have a global  rule for spam. I done it on the server console and it's working correctly:

require ["fileinto"];
# Move spam to spam folder
if header :contains "X-Spam-Flag" ["YES"] {
fileinto "SPAM";
stop;
}

But I  have similar problem with managesieve plugin . I can create  modify the rules but that doesn't work.

require ["fileinto"];
# rule:[Test_rule]
if anyof (header :contains "Subject" "Apple")
{
        fileinto "INBOX.Test";
}

It doesn't work. If I modify it manualy (with mcedit):  "fileinto "INBOX.Test"; " ----> "fileinto "Test"; " It start to work.
So it looks like the "INBOX" at the begin cause the problem.

Can anybody help me? :o
Title: managesieve not filtering
Post by: JohnDoh on March 10, 2010, 05:44:01 AM
you could try the sieverules plugin, rather than managesive. this has an option in the config to turn off the IMAP root.
Title: managesieve not filtering
Post by: katie on March 11, 2010, 06:39:41 AM
Quote from: Granada;25606....
 maybe dovecot does have some similiar feature to track down the problem
....

FYI only:

Messagelog with Sieve-hit in Dovecot:
(xxxxxxx = anonymized)

Mar 11 12:02:06 mx1 [B][COLOR=DarkRed]dovecot[/COLOR][/B]: deliver([email protected]): [B][COLOR=DarkRed]sieve[/COLOR][/B]: msgid=<[email protected]>: stored mail into mailbox 'SozNW.twitter'
Title: connect server managiesieve
Post by: mich@l on March 13, 2010, 04:48:08 PM
Hello

I have problem with configuration plugin managiesieve.
I install this plugin but don't connect with server managiesieve.
How repair this problem ?
Title: managesieve not filtering
Post by: menno on March 15, 2010, 07:44:47 PM
Are there any plugins that can work with procmail instead of sieve rules?
Title: managesieve not filtering
Post by: nessudo on March 15, 2010, 09:15:51 PM
I'm new and have a few questions ... is there anyone there to help
Title: managesieve not filtering
Post by: skygge on April 12, 2010, 04:27:29 PM
Hello everyone!
This is my first post.

I'm going to migrate from Squirrelmail ro Roundcube, but I cannot make Sieve filters to work. I tried "Managesieve" plugin and "Sieverules" also, but they don't work. I use Cyrus Imap.

In Squirrel I used Avelsieve plugin and it worked perfectly.
I noticed some differences between script syntax in both solutions: Avelsieve and Managesieve/Sieverules.

Here is an example:

Avelsieve:
#START_SIEVE_RULEYTo0OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NDp7czo0OiJ0eXBlIjtzOjY6ImhlYWRlciI7czo2OiJoZWFkZXIiO3M6NDoiRnJvbSI7czo5OiJtYXRjaHR5cGUiO3M6ODoiY29udGFpbnMiO3M6MTE6ImhlYWRlcm1hdGNoIjtzOjIzOiJkZXYtbnVsbEByaG4ucmVkaGF0LmNvbSI7fX1zOjQ6InR5cGUiO3M6MToiMSI7czo2OiJhY3Rpb24iO3M6MToiNSI7czo2OiJmb2xkZXIiO3M6MTE6IklOQk9YLlRyYXNoIjt9END_SIEVE_RULE
if header :contains "From" "[email protected]"
{
fileinto "INBOX.Trash";
}

Sieverules/Managesieve:
# rule:[test1]
if anyof (header :contains "Subject" "test")
{
        fileinto "INBOX.Trash";
}


First rule works, second - not.
Although, "sievec" compiles this script to .bc file without errors.

Has anyone an idea what could be wrong?
There's one more: Sieverules cannot import Avelsieve script. It shows "server error" message.

Please, help :)
Thanks,
Skygge.
Title: managesieve not filtering
Post by: skygge on May 25, 2010, 09:55:30 AM
Up!

I REALLY need an aswer....
Title: managesieve not filtering
Post by: skygge on June 28, 2010, 04:45:40 PM
Well... nobody knows what's going on...
I noticed that filters don't work ONLY when "vacation" rule is active.

Setting up vacation filter breaks other filters. Strange.... :(

Anyone can help?
Title: managesieve not filtering
Post by: JohnDoh on June 29, 2010, 02:51:31 AM
take another look at the rule file. if you have multiple rules setup then by default both sieverules plugin use an if... elsif... structure so once one rule is matched thats it no more will be used. I'm not sure about managesieve, this used to do that too but i think it might use multiple ifs now. the behaviour of sieverules can be changed in the config.