On Thu, 2013-07-18 at 21:36 +0200, Timothy Murphy wrote: > I notice I get an error if I run sa-learn: > ------------------------------- > [root@alfred tim]# sa-learn --spam /var/spool/amavisd/quarantine/*
Might be a long shot, but that line gets expanded (or exploded) by your shell. SA won't see the asterisk and interpret it itself, since the shell already substituted /long/path/* with any matching files. Depending on the number of mail in that directory and their file basename length, that command can pretty easily hit the 32k char limit. 30 bytes leading path are duplicated for each file already... sa-learn accepts directories, so the following command is preferred and much safer: sa-learn --spam /var/spool/amavisd/quarantine/ > gzip: stdout: Broken pipe > Learned tokens from 57 message(s) (86 message(s) examined) > error closing input file: at > /usr/share/perl5/Mail/SpamAssassin/ArchiveIterator.pm line 367. at > /usr/bin/sa-learn line 493. sa-learn (the ArchiveIterator rather) handles compressed files ending in .gz or .bz2 transparently, calling the respective executable. Are the quarantined files compressed? Or did a cropped file name result in something coincidentally ending in .gz? Can you identify a single file (e.g. using bisection) to reproduce the error? -- char *t="\10pse\0r\0dtu\0.@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; }}}