Sieve Howto
Robert
Robertedstrom at yahoo.com
Mon Jun 21 21:31:18 EDT 2004
Cool! I tried it on my server and now it works great. Before I posted for
help, I used a script and called it defaultbc. Cyrus was complaining that
the file was not a bytecode file. I ended up having to add an entry in
/etc/servives and using sieveshell like you suggested.
Thanks for pointing that out to me.
Bob
"Kent L. Nasveschuk" <knasveschuk at wareham.k12.ma.us> wrote in message
news:1087847327.2665.68.camel at 1134...
> Quick an dirty sieve scripts.
>
> There are many examples on the web but here is just one more.
>
> require ["fileinto","reject"];
> if header :contains "X-Spam-Score" "*****" {
> fileinto "trash";}
> elsif header :contains ["Sender","From"]
> "@wareham.k12.ma.us" {
> fileinto "wpsstuff";}
> elsif header :contains ["To","Cc","From"]
> "info-cyrus at lists.andrew.cmu.edu" {
> fileinto "cyrus";}
> elsif header :contains ["To","Cc","From","Reply-To"]
> ["pgsql-sql at postgresql.org","pgsql-php at postgresql.org"] {
> fileinto "postgresql";}
> elsif header :contains ["To","Cc","From","Reply-To"]
> "users at opengroupware.org" {
> fileinto "opengroupware";}
> elsif header :contains ["To","Cc","From"]
> "samba-request at lists.samba.org" {
> fileinto "samba";}
> elsif header :contains ["To","Cc","From","Reply-To"]
> "openldap-software at openLDAP.org" {
> fileinto "openldap";}
> else {
> fileinto "INBOX";
> }
>
> Create a sieve script in some directory. I use the username.sieve.
>
> Start a sieve shell
> sieveshell --user=kent --authname=cyrus localhost
>
> >put kent.sieve
> >activate kent.sieve
> >list
> >kent.sieve <- active script
> >quit
>
> That's about it.
>
> These are on a per user basis. I don't how many can be set active at a
> time. The filtering works well. There was a lot of talk about global
> sieve scripts, one script that takes care of all users. I haven't
> reached that point yet.
>
> Hope this helps.
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list