Mailing List Archive

Different ACL Condition Combinations
I think one combine boolean conditions sevral ways. Are these all same?
Is there performance reasons or functional reason to choose which one---
or is it no different, only choose for readability?

warn condition = ${if <condition 1>}
condition = ${if <condition 2>}
<do something>

warn condition = ${if and {{<condition 1>}{<condition 2>}}}
<do something>

warn condition = ${if <condition 1>{${if <condition 2>}}fail}
<do someting>

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Different ACL Condition Combinations [ In reply to ]
On 16/05/2023 12:58, MRob via Exim-users wrote:
> Is there performance reasons
Too minor to care about.
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Different ACL Condition Combinations [ In reply to ]
D?a 16. mája 2023 11:58:36 UTC používate? MRob via Exim-users <exim-users@lists.exim.org> napísal:

>warn condition = ${if <condition 1>{${if <condition 2>}}fail}
> <do someting>

Beware, this one differs from previous two by forced fail of
the first condition. from docs:

if the expansion is forced to fail, the condition is ignored.
The effect is to treat it as true...

Thus if the first condition is false, forced fail happens with
result of <do something> is processed, instead of skip to
next verb...

regards


--
Slavko
https://www.slavino.sk/

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Different ACL Condition Combinations [ In reply to ]
On 2023-05-16 12:28, Slavko via Exim-users wrote:
> D?a 16. mája 2023 11:58:36 UTC používate? MRob via Exim-users
> <exim-users@lists.exim.org> napísal:
>
>> warn condition = ${if <condition 1>{${if <condition 2>}}fail}
>> <do someting>
>
> Beware, this one differs from previous two by forced fail of
> the first condition. from docs:
>
> if the expansion is forced to fail, the condition is ignored.
> The effect is to treat it as true...
>
> Thus if the first condition is false, forced fail happens with
> result of <do something> is processed, instead of skip to
> next verb...

Thanks! Shouldve been:

warn condition = ${if <condition 1>{${if <condition 2>}}{no}}
<do someting>

Purpose of main qusetion to know if there are importnat reason NOT to do
it one of the ways but Jeremy saying they're all the same! Thanks all

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/