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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
Tel: +44 1296 768003
VoIP: sip:[EMAIL PROTECTED]
VoIP: [EMAIL PROTECTED]
FWD: **275*5048707000
VoipTalk: **473*5048707000


--
## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to