You are mixing two related but different pieces of syntax.
If you want to pipe to your script, it should be just
:0
* conditions, maybe
| /path/to/script
or if you want to use the output of the script, something like
:0
* conditions, maybe
`echo HELLO`
would file into a folder named HELLO
, i.e. use the output from the script as a literal.
As for the error message from PHP, I imagine you need to add something to PHP's library path (quick googling suggests you should fix the include_path
in your php.ini
).
What are you trying to accomplish, though? If you just want to send the message where the headers say it should be going, something like
:0
* conditions, maybe
! -t
should get you that. I cannot imagine a situation where you would want to do this (other than if you are trying to solve the wrong problem altogether). If you want to send a truncated copy of the message, something like
:0c
* conditions, maybe
{
:0fw
| head -n 10
:0
! -t
}
would truncate the message to the first ten lines. If you want to truncate to 1024 bytes exactly, that's not much harder.
On the other hand, if you just want to store the message's body (full RFC822 body, i.e. any MIME attachments etc will just be included verbatim, undecoded) you can do that with
:0b
saved/
or maybe if you want PHP there
:0b
| /path/to/script.php
For what it's worth, the error message is being truncated, but that is mainly because you are trying to use it as the name of the script to deliver the email to. If you take out the backquotes, the error message should end up in Procmail's standard error without truncation.