Emails are being successfully piped into a PHP script through cPanel email user filtering, but the PHP script have a execution time limit (to prevent DoS). When the time limit error occurs, the email bounces.
Althought it is a PHP error what is producing the bouncing, the error virtually cannot be fixed, that is why there is a time limit.
A sample of the bounce message is:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
pipe to |/usr/bin/php -q /home/foo/bar/script.php
generated by moo@beer.cl
local delivery failed------ This is a copy of the message, including all the headers. ------
------ The body of the messa[...]
The first thing one might think, is that the execution time limit error is printing a message (that would automatically cause a bounce) but this is not the case, because ini_set('display_errors', false);
is set. The proof that nothing is being printed is the lack of "The following text was generated during the delivery attempt: ..." in the message quoted above.
A small test:
#!/usr/bin/php -q
<?php
set_time_limit(1);
ini_set('display_errors', false);
$fh_stdin = fopen('php://stdin', 'rb');
while (true) rand();
?>