On Thu, 2009-10-08 at 12:01 -0400, Jason Bertoch wrote: > Shane Webster wrote: > > I am curious if it is possible to rewrite the subject based on the value > > of the score. A example of this would be if a score of 4.0 was given the > > subject would state [Potential Spam], but if it was 5.0-10.0 then it is > > [SPAM] if it was greater then 10.0 it would be [SUPER SPAM]. I > > understand this may seem odd but I am just trying to fill the request of > > the client and what they want.
The generic option available with SA is, to use the score template tag for the rewrite_header config. > It can be done, but not with SpamAssassin. You'll need to work with the > program that calls SA. This actually should quite easily be doable with a plugin. Basically, you need a plugin that defines a template tag, with the value depending on the score. Then use that template tag for Subject rewriting. -- char *t="\10pse\0r\0dtu...@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; }}}