Sieve script help

Steve Huston huston at astro.princeton.edu
Fri May 16 13:40:12 EDT 2003


We're running Amavisd-new site-wide here, and some users want to fine tune
their spam settings over and above what I've set as defaults (tag as spam at
5, discard at 10, otherwise deliver).

One user in particular would like to toss all messages with a score of 3 or
higher into his spam folder.  Now, this could be done with a series of Sieve
filters (to match 3.0-3.9, 4.0-4.9, and then X-Spam-Flag: YES), but I would
think the simplest way is to look for three or more characters in the
X-Spam-Level field.

The problem is, how to do this?  I tried using a regexp and looking for three
characters ('...'), but that would toss almost everything in the spam folder.
Turning off regexp, I found the information about wildcards on Cyrusoft's
site, and tried matching '\\*\\*\\*', but that doesn't work either (mails with
three or four stars still going through).

I am using Websieve as a front-end, and am not against telling users who want
that kind of fine-grained control that they have to do something tricky, but
ideally it would still be something doable in Websieve.  (Websieve also
expanded the second attempt out to '*\\*\\*\\**', to match three stars
anywhere in the string, but I don't know if that makes a difference.)

-- 
Steve Huston - Unix Systems Admin, Dept. of Astrophysical Sciences
 Princeton University  |     ICBM Address: 40.346525   -74.651285
   126 Peyton Hall     |"On my ship, the Rocinante, wheeling through
 Princeton, NJ   08544 | the galaxies; headed for the heart of Cygnus,
   (609) 258-7375      | headlong into mystery."  -Rush, 'Cygnus X-1'





More information about the Info-cyrus mailing list