On Sun, 2009-02-08 at 16:37 -0800, cnone wrote: > How can I call spamc and loop through all mails(like 100 mbox email files) > under a directory and decide which is spam which is not and save the spams > in a different dir?
$ man spamc $ for f in *; do spamc -c < $f || mv $f spam/; done Beware, untested! Other than the -c switch, this is not a SA question, though. Oh, and keep in mind that this is just the result of *your* SA installation and configuration in particular. It is not necessarily accurate. -- 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; }}}