Please keep list posts on-list. On Sat, 2010-10-09 at 12:27 -0400, Dennis German wrote: > > Formail is your friend. To correctly extract all X-Spam headers, use > > formail -X, and to remove them use -I instead of -X. > > > > formail -X X-Spam < $msg > > > > However, there is no need to remove SA headers before processing it a > > second time ... > I processed the same input file each time.
I don't see how that changes the need to remove X-Spam headers. There still is no need to. > > > grep -A14 "pts rule name" $1.oo|grep -v "\-\-\-\-" > > What if there are more lines? > That's the problem since the report lines do not always come in the same > order. > > Thanks for the info on formail. > Just goes to show how helpful others can be if you can just ask. Ask, and provide all relevant info. ;) This one was much better than your first attempt (which was terribly confusing), because it included the way you're post-processing, enabling us to reproduce or understand the issue. As a side-note, you may want to consider using 'spamassassin' with the --cf or --prefs-file options, defining single config lines ad-hoc and completely switching user_prefs files respectively. Slower than using spamc, but gets rid of the nasty mv orgy to switch user_prefs. -- 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; }}}