diff options
author | Phil Pennock <pdp@exim.org> | 2010-06-07 07:09:10 +0000 |
---|---|---|
committer | Phil Pennock <pdp@exim.org> | 2010-06-07 07:09:10 +0000 |
commit | 532be4499552dfab0e3173f7d3e85c81e1496147 (patch) | |
tree | 4757d8f0bdb97dfdbf40b176597bbcaca5e304a1 /doc | |
parent | 73a4670220991e000cc31a60fc90264cf12bd981 (diff) |
Allow Routers to have multiple conditions, IF each one yields a strict bool.
Fixes: #816
Diffstat (limited to 'doc')
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 13 | ||||
-rw-r--r-- | doc/doc-txt/ChangeLog | 4 | ||||
-rw-r--r-- | doc/doc-txt/NewStuff | 11 |
3 files changed, 25 insertions, 3 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 7a9698e57..dd8db2367 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -1,4 +1,4 @@ -. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.82 2010/06/06 02:08:50 pdp Exp $ +. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.83 2010/06/07 07:09:10 pdp Exp $ . . ///////////////////////////////////////////////////////////////////////////// . This is the primary source of the Exim Manual. It is an xfpt document that is @@ -15669,6 +15669,12 @@ router is skipped, and the address is offered to the next one. If the result is any other value, the router is run (as this is the last precondition to be evaluated, all the other preconditions must be true). +This option is unique in that multiple &%condition%& options may be present. +In this case, the previous statement does not quite apply: the result of each +&%condition%& option must be a string recognised by the &%bool%& expansion +operator, or failure will be forced. The effect is to "and" the conditions +together, as each must pass. + The &%condition%& option provides a means of applying custom conditions to the running of routers. Note that in the case of a simple conditional expansion, the default expansion values are exactly what is wanted. For example: @@ -15679,6 +15685,11 @@ Because of the default behaviour of the string expansion, this is equivalent to .code condition = ${if >{$message_age}{600}{true}{}} .endd +A multiple condition example: +.code +condition = ${if >{$message_age}{600}} +condition = ${if !eq{${lc:$local_part}}{postmaster}} +.endd If the expansion fails (other than forced failure) delivery is deferred. Some of the other precondition options are common special cases that could in fact be specified using &%condition%&. diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index f5fbbd639..65d5d2dc9 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.627 2010/06/06 22:46:33 pdp Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.628 2010/06/07 07:09:10 pdp Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -44,6 +44,8 @@ PP/13 Bugzilla 752: Refuse to build/run if Exim user is root/0. PP/14 Build without WITH_CONTENT_SCAN. Path from Andreas Metzler. +PP/15 Bugzilla 816: support multiple condition rules on Routers. + Exim version 4.72 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 03c0d4833..559a9f4c0 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/NewStuff,v 1.172 2010/06/06 02:46:13 pdp Exp $ +$Cambridge: exim/doc/doc-txt/NewStuff,v 1.173 2010/06/07 07:09:10 pdp Exp $ New Features in Exim -------------------- @@ -75,6 +75,15 @@ Version 4.73 then henceforth you will have to maintain your own local patches to strip the safeties off. + 8. Routers now support multiple "condition" tests, IF each router yields + a string which the bool{} operator recognises. Note that this is a departure + from normal Router "condition" truth, requiring the stricter standard of + "true" that ACLS use. This might be relaxed in a future release if there + is sufficient demand. + When debugging, bear in mind that these are internally wrapped up into + a longer, more complicated, string. There's a reason that the bool{} + logic is a dependency. + Version 4.72 ------------ |