Re: [exim] Can I execute an external program in condition?

Top Page
Delete this message
Reply to this message
Author: Eric Fox
Date:  
To: peter
CC: exim users
Subject: Re: [exim] Can I execute an external program in condition?
Here's an example of running a shell script from a condition statement:

  warn    condition     = ${run{/sbin/putNfile /etc/mail/whitelist.0 
$sender_host_address}{yes}{yes}}
          log_message   = Whitelisting Host


In this case, the script putNfile get's two parameters, the filename and
the sending host address.

  /\---/\  Eric J Fox
 /  o o  \ Small Business Computer Support
 \.\   /./ in the Phoenix Metropolitan Area
    \@/    http://www.bsdsystems.com/support/



Peter Bowyer wrote:

>On 15/03/06, Viktor Vislobokov <vvislobokov@???> wrote:
>
>
>>Hi!
>>
>>Can I execute an external program in condition?
>>Would you put an example here?
>>
>>
>
>The ${run expansion item will do this - see
>
>http://www.exim.org/exim-html-4.60/doc/html/spec.html/ch11.html#SECTexpansionitems
>
>condition = ${run prog args}{0}{1}
>
>Read carefully how the return code and standard output from the
>command are handled.
>
>Peter
>
>--
>Peter Bowyer
>Email: peter@???
>Tel: +44 1296 768003
>VoIP: sip:peter@???
>VoIP: *5048707000@???
>FWD: **275*5048707000
>VoipTalk: **473*5048707000
>
>
>