Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

ACL Conditionals - run program if condition is met

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


marc at perkel

Oct 31, 2006, 8:52 AM

Post #1 of 3 (380 views)
Permalink
ACL Conditionals - run program if condition is met

OK - here's what I want to do. I want to run a program in an ACL if the
condition is met and do nothing if the condition is not met. How would I
do that?



--
## 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/


marc at perkel

Oct 31, 2006, 11:52 AM

Post #2 of 3 (365 views)
Permalink
Re: ACL Conditionals - run program if condition is met [In reply to]

John Jetmore wrote:
> On Tue, 31 Oct 2006, Marc Perkel wrote:
>
>
>> OK - here's what I want to do. I want to run a program in an ACL if the
>> condition is met and do nothing if the condition is not met. How would I
>> do that?
>>
>
> warn condition = ${if eq{foo}{bar}{${run:/path/to/script}}{}}
>
> might not have the syntax exactly right but something similar should work.
> Dunno if a warn with no action actually does anything. If it doesn't, you
> could do somehing like assign the result of the ${if to an acl var to
> force it to evaluate.
>
> --John
>
>
That might work but I have a question. Let's say for simplicity you have
an ACL as follows:

drop message = something
condition = false
condition = run something

In the above example drop requires that all the conditions be true. So
if the first condition is false i the second condition evaluated or
skipped? I'm hoping it is skipped because if it is then that makes the
coding easier.



--
## 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/


holmgren at lysator

Oct 31, 2006, 2:15 PM

Post #3 of 3 (359 views)
Permalink
Re: ACL Conditionals - run program if condition is met [In reply to]

On Tuesday 31 October 2006 20:52, Marc Perkel took the opportunity to say:
> In the above example drop requires that all the conditions be true. So
> if the first condition is false i the second condition evaluated or
> skipped? I'm hoping it is skipped because if it is then that makes the
> coding easier.

Processing stops when the outcome is known (after the first false condition in
the above example). Shouldn't you know that?

--
Magnus Holmgren holmgren [at] lysator
(No Cc of list mail needed, thanks)

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.