You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2009/08/24 19:30:24 UTC

[Bug 6081] spamc stops reading after reading max_len bytes

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6081


Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #2 from Mark Martinec <Ma...@ijs.si>  2009-08-24 10:30:22 PST ---
> I use spamc integrated through a perl pipe, viz.:
>   $pid = open2( \*Reader, \*Writer, $spamc_command );
>   print Writer @header_lines, "\n", @dfile_lines;
> 
> If the combined size of the two arrays is > the "-s max_len" parameter, I just
> hang because spamc reads max_len+1 and then stops reading.
> 
> So, the enhancement is to have spamc quietly read the rest of the input stream,
> and then not process the message.
> I believe it's the case that spamc reads the whole message anyway, as it
> parrots it back untouched to STDOUT.

spamc does read the entire message. Please check the man page of IPC::Open2.
What you are doing is problematic, you should be both reading and writing
at the same time (using select). The IPC::Open2 is very simpleminded
and can easily deadlock.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.