Re: Problem with server-side filtering using sieve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any ideas how to install a filter for all users?
I mean moving messages marked as spam (by SpamAssassin) to personal
Spam folders.



W dniu 17 listopada 2009 13:01 użytkownik nunatarsuaq
<nunatarsuaq@xxxxxxxxx> napisał:
> 2009/11/17 Michael Menge <michael.menge@xxxxxxxxxxxxxxxxxxxx>:
>> Quoting nunatarsuaq <nunatarsuaq@xxxxxxxxx>:
>>
>>> Found a partial solution:
>>>
>>> 1. In my case the filter script should refer to user's mailbox as
>>> "user/USERNAME/folder"
>>> 2. Then I used sievec to create bytecode file for a particular user's
>>> sieve dir:
>>>
>>> /usr/lib/cyrus/bin/sievec sieve.filter /var/lib/sieve/U/USERNAME/defaultbc
>>>
>>> That's it. The filtering started working. Strange though...
>>> I don't get it why it doesn't work using sieveshell and a regular text
>>> script file.
>>
>> Did you activate the script?
>
> When I tried to use sieveshell I had my loaded script activated.
>
>> defaultbc is normaly a softlink to the active script bytecode
>>
>>>
>>> Anyway I'd prefer to have a main filter file for all users that would
>>> move all spam-marked messages to Spam folder in each mailbox.
>>>
>>> Any ideas?
>>>
>>> Rangifer
>>>
>>> 2009/11/17 nunatarsuaq <nunatarsuaq@xxxxxxxxx>:
>>>>
>>>> Hi
>>>>
>>>> I'm still having problem with getting the filtering working
>>>>
>>>> Even though the script can be loaded it doesn't work.
>>>> I'm trying
>>>>
>>>> if header :contains ["Subject"] "test" {
>>>>         fileinto "Junk";
>>>>          stop;
>>>> }
>>>>
>>>> if header :contains ["Subject"] "test" {
>>>>         fileinto "user/testowy/Junk";
>>>>         stop;
>>>> }
>>>>
>>>> if header :contains ["Subject"] "test" {
>>>>         fileinto "user.testowy.Junk";
>>>>         stop;
>>>> }
>>>>
>>>> and
>>>>
>>>> if header :contains ["Subject"] "test" {
>>>>         fileinto "user/testowy.Junk";
>>>>         stop;
>>>> }
>>>>
>>>> None method works. Is there a bad syntax somewhere?
>>>> I noticed that when working on imap accounts (using reconstruct
>>>> command for example) I need to type user/USERNAME instead of
>>>> user.USERNAME found everywhere on the web.
>>>>
>>>> Going further I'd like to set up a filter moving messages marked as
>>>> spam for all users.
>>>> How should it be installed?
>>>>
>>>> Rangifer
>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2009/11/16 Simon Matter <simon.matter@xxxxxxxxx>:
>>>>>>>>>>>
>>>>>>>>>>> Hello to everybody
>>>>>>>>>>>
>>>>>>>>>>> I'm a new user here and found this list while searching for
>>>>>>>>>>> solution
>>>>>>>>>>> to my problem.
>>>>>>>>>>>
>>>>>>>>>>> I have a running mail server with postfix and cyrus-imap and would
>>>>>>>>>>> like to start filtering incoming messages on the server side.
>>>>>>>>>>> I tried to put a filter using sieve shell according to this
>>>>>>>>>>> tutorial
>>>>>>>>>>> http://wiki.linuxwall.info/doku.php/en:ressources:astuces:sieve
>>>>>>>>>>> but
>>>>>>>>>>> with no results.
>>>>>>>>>>>
>>>>>>>>>>> Here's my configuration:
>>>>>>>>>>>
>>>>>>>>>>> I created a file with a sieve filter:
>>>>>>>>>>>
>>>>>>>>>>> if header :contains "X-Spam-Flag" "YES" {
>>>>>>>>>>>  fileinto "Junk";
>>>>>>>>>>>  stop;
>>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> I think your script should start with a require line. Do you have
>>>>>>>>>> it?
>>>>>>>>>>
>>>>>>>>>> Simon
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I tried also type fileinto as "user.USERNAME.Junk",
>>>>>>>>>>> "user/USERNAME.Junk" and "user/USERNAME/Junk")
>>>>>>>>>>>
>>>>>>>>>>> Now when I invoke
>>>>>>>>>>>
>>>>>>>>>>> # sieveshell -u cyrus -a cyrus localhost (tried also with a user
>>>>>>>>>>> other
>>>>>>>>>>> than cyrus)
>>>>>>>>>>>
>>>>>>>>>>> and type
>>>>>>>>>>>
>>>>>>>>>>>> put sieve_filter
>>>>>>>>>>>
>>>>>>>>>>> I get an error:
>>>>>>>>>>>
>>>>>>>>>>> upload failed: put script: script errors:
>>>>>>>>>>> line 2: fileinto not required
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> What does it really mean?
>>>>>>>>>>> What can be done to get it working?
>>>>>>>>>>>
>>>>>>>>>>> Rangifer
>>>>>>>>>>> ----
>>>>>>>>>>> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
>>>>>>>>>>> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
>>>>>>>>>>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> ToMasz
>>>
>>> http://skocz.pl/przystanekGL - wspomnienia coraz bardziej odległe...
>>> ----
>>> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
>>> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
>>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>>
>>
>>
>>
>> --------------------------------------------------------------------------------
>> M.Menge                                Tel.: (49) 7071/29-70316
>> Universität Tübingen                   Fax.: (49) 7071/29-5912
>> Zentrum für Datenverarbeitung          mail:
>> michael.menge@xxxxxxxxxxxxxxxxxxxx
>> Wächterstraße 76
>> 72074 Tübingen
>> ----
>> Cyrus Home Page: http://cyrusimap.web.cmu.edu/
>> Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>
>
>
>
> --
> ToMasz
>
> http://skocz.pl/przystanekGL - wspomnienia coraz bardziej odległe...
>



-- 
ToMasz

http://skocz.pl/przystanekGL - wspomnienia coraz bardziej odległe...
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux