On Wed, 2013-07-10 at 22:41 +0200, Benny Pedersen wrote: > Andreas Schulze skrev den 2013-07-10 13:11:
> > Are there SA Rules to score a missing or multiple from header? > > Does anybody do score these and is willing to share his SA rules? > > i have rules for this if i can find it again :) > > tryed google it, but to no avail, email me private if you need sa rules > to catch double from, also seem double date btw as abused > > rules is original from Mark Martinec, hope he will repost it Doesn't seem to be hard to write afresh. Glimpse at the full headers, identify From: thingies, count 'em, and ding the bell if there's more than one... header __HAS_FROM ALL =~ /^From:\s/m tflags __HAS_FROM multiple meta MULTI_FROM __FROM > 1 Easy peasy. Just combine the ALL pseudo-header with the Perl RE /m multi-line match in a non-scoring sub-rule, together with the SA tflags multiple. And a meta rule with arithmetic expressions. ;) Score as you seem fit, though I wouldn't expect it to catch a lot of otherwise low-scoring spam. Might be different for Andreas though, since he specifically asked for it. Oh, BTW -- untested. :) -- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; 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; }}}