Re: [exim] Saving and/or processing attachments

Pàgina inicial
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
A: Aurelin
CC: exim-users
Assumpte: Re: [exim] Saving and/or processing attachments
On 2013-10-07 at 23:00 +0200, Aurelin wrote:
> > Woah. Why? If you deliver to pipe, the pipe gets the whole mail.
> > No need to invoke use of $message_body at all.
>
> Uhm, great! But how do I actually process the e-mail that is piped to
> a script?


The content of the email is delivered over the "standard input" (stdin)
of the process; the name "pipe" is because this is the normal Unix
terminology for connecting together commands in a pipeline.

You're crossing from the web-programming world into the Unix programming
world here, and encountering confusion from others because they've dealt
with pipes for so long that they don't understand a programming model
which doesn't deal with pipes routinely.

Using Google to search for (Unix pipes for PHP programmers) suggests
this Stack Overflow article:

http://stackoverflow.com/questions/5891888/piping-data-into-command-line-php

and the answers suggest that you're after a `php://stdin` URL for
accessing the data stream.

-Phil