[Tickets #3373] NEW: "spamassassin -r" reporting fails

bugs@bugs.horde.org bugs at bugs.horde.org
Mon Jan 30 22:51:13 PST 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3373
-----------------------------------------------------------------------
 Ticket             | 3373
 Created By         | athakur at gmail.com
 Summary            | "spamassassin -r" reporting fails
 Queue              | IMP
 Version            | FRAMEWORK_3
 State              | Unconfirmed
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


athakur at gmail.com (2006-01-30 22:51) wrote:

I am using a cPanel-based Redhat system with the latest release version of
Horde and IMP and using PHP in CGI mode.  I was have a problem where using
the "report as spam" link would cause a 406 error.  This is happening
because "spamassassin -r" causes a "x message(s) examined" message to be
output on STDOUT.  This output is not trapped by the PHP script and passes
straight to STDOUT.  This happens before PHP outputs a "Content-Type" header
causing the web server to report an error.

I tried updating Spam.php to the latest CVS version and it did not help the
problem.  I figured out a way around it though.  Spam.php needs to catch
pipe 1 (STDOUT) as well.  I made the following change:

Original:
$proc = proc_open($prog,
array(0 => array('pipe', 'r'), 
2 => array('pipe', 'w')), 
$pipes);

Updated:
$proc = proc_open($prog,
array(0 => array('pipe', 'r'), 
1 => array('pipe', 'w'), 
2 => array('pipe', 'w')), 
$pipes);

And it works correctly now.




More information about the bugs mailing list