On Wed, 2009-01-28 at 09:25 -0700, LuKreme wrote: > What I wanted to know is I could use a combination of formail and > procmail to feed each measdsge to sa-learn one at a time.
Sure. See the -s option in 'man formail'. formail -s ${command_per_mail} < ${mbox} You will need procmail only, if you actually want to *conditionally* perform action, e.g. skip learning of messages already scoring a high Bayes value. Without any conditions (including post-processing and different delivery targets), procmail just complicates things here. Also, keep in mind that procmail would *deliver* the mail -- careful with that, unless you want the learned messages to be fed to the user's Inbox again. ;-) Another caveat is, that calling a sa-learn process for *each* message is quite expensive. Having a look at the spamc/spamd options for learning might be a good idea. guenther -- 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; }}}