Re: [Exim] Running external scripts

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Bradford Carpenter
CC: exim-users
Sujet: Re: [Exim] Running external scripts
On Wed, 21 Apr 2004, Bradford Carpenter wrote:

> 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}}


${readfile reads a file and saves the entire content in memory. It is
intended for fishing small amounts of configuration data out of files.
Using it to read a message will be a performance disaster for large
messages.

If you have to do this, better to pass the file name and let the script
read it.

--
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