I’m trying to forward email to a PHP script using a pipe. I want the PHP script to read the email and store the messages in a text file.
I read a bunch of forum posts here and tried following DreamHost’s wiki. Here’s what I got so far:
In my root directory, I have a .forward.postfix file with 1 line:
Also in my root directory, I have a .procmailrc file, with some code:
|$PHP -q /home/myusername/mysite.net/log.php
I tried sending an email to firstname.lastname@example.org, but log.php didn’t write anything in the log.txt file.
So my question is: What do I do now?
Does the .procmailrc file have an error? I don’t think my log.php has an error, but I will post the code if anyone wants to see it.