Sieve Howto

Kent L. Nasveschuk knasveschuk at wareham.k12.ma.us
Mon Jun 21 15:48:48 EDT 2004


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.


On Mon, 2004-06-21 at 14:57, Robert wrote:
> Can someone point me to a resource where I can learn how to set up sieve for
> cyrus imapd?  I have imap running just great with postfix and I am looking
> to enhance it with sieve.  I an currently reading the sieve rfc, but is
> there a site
> that deals specifically with getting it running with cyrus imapd?  What to
> name the scripts,where to put them, global and user scripts, etc.
> 
> Thanks in advance.
> 
> 
> 
> ---
> 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
-- 
Kent L. Nasveschuk <knasveschuk at wareham.k12.ma.us>

---
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