TheMadScientist - 3:54 pm on May 7, 2011 (gmt 0)
What rocknbil said, with a twist:
If you use cPanel you can select the Forward > Pipe to Program option and send the incoming mail to a PHP executable.
If you don't you will need to adjust you mail software like rockinbil said, but again, you can run them through a PHP executable. I don't know what software you use, but with cPanel it's simple to get it to the program and with Postfix it's a bit more complicated but nothing too super, extra ugly. (Of course how 'ugly' depends on your definition of 'ugly to code' ... lol)