> > find /var/spool/imap/user/kmeyer/ -name '[0-9]*.' -exec sa_learn {} \;
> > 
> > which is a bit slower but avoids the command line overflow by running
> > sa_learn on every matching file.

A "bit" slower. Periodically re-learning the entire Inbox of 100+ users,
spawning a full Perl process for every single mail...

> you can use xargs then to calling sa-learn too often. xargs can push only as
> much parameters as fits.
> 
> find /var/spool/imap/user/kmeyer/ -name '[0-9]*.' -print |xargs sa-learn

Definitely! Without it, the box will be burning in hell, doomed to
constantly spawn Perl processes until the end of time.

Using the find result to populate a list in a temporary file, and use
that with sa-learn -f is even better. A single Perl process per learning
iteration.


Also, since this is not Maildir and the above path looks suspiciously to
contain directories (mail sub-folders), the find -maxdepth option will
be required to prevent learning *all* the user's mail.


-- 
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; }}}

Reply via email to