On Wed Apr 21 2004 at 19:33:08 CEST, Bradford Carpenter wrote:
> > Is is possible to pass the content of a mail to ${run command ? [Preferably
> > selecitve with/without headers?]
>
> I'm using a construct something like this (one line - broken apart for
> email) to pass the message to shell scripts:
>
> ${run{/path/to/script.sh \
> ${quote:${message_headers} \
> ${readfile{/var/spool/exim/input/${message_id}-D}}}} \
> {$value}{run expansion failed}}
That ${readfile might be quite expensive in terms of memory.
You might also try something like
${run{/path/to/script.sh ${spool_directory}/input/${message_id}}}
and have your script.sh process the file passed as the first
argument.
-JP