Hints for Sieve script

Toomas Aas toomas.aas at raad.tartu.ee
Thu Sep 11 01:11:05 EDT 2008


Anders Norrbring wrote:

> Basically, I want a vacation rule to be in effect first of all, that's 
> no problem to make.
> Then, I want the incoming mail to be permanently deleted after the 
> vacation note is sent.
> 
> It's the last step I need a hint for..

I happen to have a script in place for one user which does exactly that. I 
don't know if this is the "perfect" way, but it works:


# Vacation
if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe", 
"list-owner", "list-post", "list-archive", "list-id"], not header 
:comparator "i;ascii-casemap" :is "Precedence" "list,bulk" ) {
     vacation :days 1 :addresses [ "user.name at example.net" ] :subject 
"YOUR VACATION MESSAGE SUBJECT" "YOUR VACATION MESSAGE TEXT";
}

# Discard
if size :over 1 {
     discard;
}

HTH
--
Toomas Aas
... Work is for people who don't know how to fish.


More information about the Info-cyrus mailing list