I'm figuring out how to pipe an email to a php script with postfix. For the email user@example.com:
I created the following line in /etc/aliases:
user: "|/www/file.php"
file.php is chmod 755
This works fine. But I wanted to test this without having to send an email every time. And this took some searching to figure out, yet it's oh-so simple:
To pipe the file email.txt to the script, write the following in the terminal window:
user@host: php file.php < testepost.txt
I was confused by the | in the aliases file, and didn't get what came after what, etc etc.
Regards,
Willy T. Koch
Norway