[exim-cvs] Add example ACL usage of ${run in exim spec.

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Add example ACL usage of ${run in exim spec.
Gitweb: http://git.exim.org/exim.git/commitdiff/9471b034a78d53e4bfb951649e9f556cf4e6018c
Commit:     9471b034a78d53e4bfb951649e9f556cf4e6018c
Parent:     a543079f3c7a2ca09a90a9728a9726439f33eb60
Author:     Todd Lyons <tlyons@???>
AuthorDate: Thu Jul 19 08:59:08 2012 -0700
Committer:  Todd Lyons <tlyons@???>
CommitDate: Thu Jul 19 08:59:08 2012 -0700


    Add example ACL usage of ${run in exim spec.
---
 doc/doc-docbook/spec.xfpt |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index c8ed791..19fb321 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -9405,6 +9405,20 @@ can be the word &"fail"& (not in braces) to force expansion failure if the
command does not succeed. If both strings are omitted, the result is contents
of the standard output/error on success, and nothing on failure.

+.vindex "&$run_in_acl$&"
+The standard output/error of the command is put in the variable &$value$&.
+In this ACL example, the output of a command is logged for the admin to
+troubleshoot:
+.code
+warn  condition    = ${run{/usr/bin/id}{yes}{no}}
+      log_message  = Output of id: $value
+.endd
+If the command requires shell idioms, such as the > redirect operator, the
+shell must be invoked directly, such as with:
+.code
+${run{/bin/bash -c "/usr/bin/id >/tmp/id"}{yes}{yes}}
+.endd
+
 .vindex "&$runrc$&"
 The return code from the command is put in the variable &$runrc$&, and this
 remains set afterwards, so in a filter file you can do things like this: