On Thu, 2008-07-03 at 06:28 -0500, McDonald, Dan wrote: > On Thu, 2008-07-03 at 02:38 -0700, Linspeed wrote: > > However, for a certain string in the subject, I want it to bypass > > SpamAssassin. > > That string is [WL]. We've been doing that for years on our existing > > anti-spam system and nobody has ever sent us spam with [WL] in the subject. > > > > So I change the filter: > > > > :0fw: spamassassin.lock > > * < 512000 > > * !Subject: .*[wl].* > > Since this is a regular expression, and character classes are enclosed > in brackets, any subject with a "w" or "l" in the subject would be > excluded. You will need to escape the brackets so that they don't > designate a character class: > > !Subject: .*\[WL\].*
Very true. :) Also, since you don't care about the trailing string, don't make procmail waste effort on matching it. Just drop the trailing "any char, and number of times". You're using the correct approach to exempt specific messages from matching the filter. However, if you are using server-side filters delivering these internal messages to dedicated folders, you could just as well change the order of the procmail receipts. First deliver those messages that you don't want to be scanned by SA, then call SA for the rest of the bulk that hasn't been delivered yet... General note: If you feel the need to run SA, you most likely want to use spamc/spamd instead of spawning a costly spamassassin process for every mail to scan. guenther -- char *t="[EMAIL PROTECTED]"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}