Hints for Sieve script

Anders Norrbring lists at norrbring.se
Thu Sep 11 01:40:09 EDT 2008

Toomas Aas skrev:
> 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 
> }
> # Discard
> if size :over 1 {
>     discard;
> }
> -- 
> Toomas Aas
> ... Work is for people who don't know how to fish.

Thanks Toomas,
I was on that track as well, but I wasn't sure whether Sieve was 
strictly sequential or not.. Would not be so good if it executes the 
discard first.. ;-)
But if it works for you, I'll try it for my user as well!

Thanks a lot.

More information about the Info-cyrus mailing list