pipe email to script

pipe email to script

am 17.08.2007 07:41:48 von diddlejubilee

Hi All,

I'm trying to pipe emails to a php script, but am not having much luck
- I'm not even sure the PHP is being run.

A bit of background - I have a web hosting account with cpanel (but no
shell script) access. My web host uses Exim to process mails

I've kept things simple to start with. The PHP script I've setup to
run (when email is received) simply sends me an email saying "script
run". I've put this in /home/username/public_html/processmail.php and
given it execute permissions.

I've created a .forward file with the following;

email@email.com,|/usr/bin/php -q /home/username/public_html/
processmail.php

I've verified the PHP works ok by running it from a browser (visiting
mydomain.com/processmail.php).

But when I send an email to the account, I don't get anything (no
bounce backs, no emails saying "script run", nothing.

Anyone have any ideas?

Thanks in advance.