On Wed, 3 Sep 2003, Dan Muey wrote:
> So I can do
> # Exim Filter
> pipe "/path/to/prog email@??? | /local/delivery/program/like/procmail/or/safecat/etc ARG ARG"
> seen finish
Not quite. Exim does not run pipes via a shell by default. If you want
to use shell features, such as piping to another process - as you have
done there - you must call a shell explicitly by something like
pipe "/bin/sh -c '......'"
> And as long as "local_delivery_program_like_procmail_etc" can write
> it's STDIN to a user's inbox then the output of /path/to/prog will be
> delivered to the user's inbox, and if /path/to/prog does exit(0); then
> the message is dropped Out of the universe forever, is this thinking
> correct?
Yes. Well, I suppose so - in the latter case the local delivery program
will read an empty stdin. Assuming it then does nothing and ends
successfully, then it will be as you say. If it grumbles because it
hasn't got any input, and ends with an error code, then the whole thing
will end with an error code.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book: http://www.uit.co.uk/exim-book