Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

sa-learn error closing file

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


gayleard at alice

Jul 18, 2013, 12:36 PM

Post #1 of 3 (89 views)
Permalink
sa-learn error closing file

I notice I get an error if I run sa-learn:
-------------------------------
[root [at] alfre tim]# 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.
-------------------------------

I always get this error, whether running sa-learn as root, myself or amavis.

--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
School of Mathematics, Trinity College, Dublin 2, Ireland


guenther at rudersport

Jul 18, 2013, 2:07 PM

Post #2 of 3 (86 views)
Permalink
Re: sa-learn error closing file [In reply to]

On Thu, 2013-07-18 at 21:36 +0200, Timothy Murphy wrote:
> I notice I get an error if I run sa-learn:
> -------------------------------
> [root [at] alfre 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; }}}


me at junc

Jul 22, 2013, 10:54 PM

Post #3 of 3 (68 views)
Permalink
RE: sa-learn error closing file [In reply to]

cd path-to-quarantine
ls >/tmp/lstmp
sa-learn --spam --progress -f /tmp/lstmp

should solve it

Sendt fra Samsung mobil

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.