I have been trying to have Qmail pipe emails to a script from a certain address. I had it successfully send it over to another email, so I know it is recieving and proccessing the email. However, when I try:
|/path/to/script.php
it doesnt do anything, not even bounce back. I cant find the qmail logs either. So, Im screwed. I googled for about a day, and I am stuck. I tried to execute /path/to/script.php in the shell, and I get:
I know I have php installed, I can execute php /path/to/script.php just fine.
Here is my simple code (for debugging, really)
#!/usr/bin/php
<?
// read from stdin
mail("sendtome@blahblah.com","Recieved!","Recieved email!");
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);
mail("sendtome@blahblah.com","Proccessed Email",$email);
?>
In my .qmail-thepipe file, I even tried to pipe using these:
|php -f /path/to/script.php
|php -q /path/to/script.php.
|php /path/to/script.php
|/path/to/script.php
None, works.
Thanks for your help!