Re: [exim] check for defer in acl

Top Page
Delete this message
Reply to this message
Author: Christian G. Warden
Date:  
To: Andrew - Supernews
CC: exim-users
Subject: Re: [exim] check for defer in acl
On Fri, Sep 17, 2004 at 10:53:31PM +0100, Andrew - Supernews wrote:
> >>>>> "Giuliano" == Giuliano Gavazzi <eximlists@???> writes:
>
>  >> warn !sender_domains = aol.com : yahoo.com : netscape.net<<ignore
>  >> those domains
>  >> set acl_c7      = 4 <<< value if the callout defers
>  >> verify          = sender/callout=30s,random
>  >> set acl_c7      = 0 <<< value if the callout succeeds

> >>
> >>
>  >> warn !sender_domains = aol.com : yahoo.com : netscape.net
>  >> !verify         = sender/callout=30s,random
>  >> log_message     = callout failed
>  >> set acl_c7      = 8  <<< value if the callout fails

>
> Not tested explicitly, though I use some similar but more complex
> constructs:
>
> acl_callout_test:
>     warn   set acl_c0 = defer
>     accept verify = sender/callout
>            set acl_c0 = accept
>     warn   set acl_c0 = deny
>     deny

>
> Then in your real ACL (acl_check_mail, say):
>
> acl_check_mail:
>     ...other stuff...
>     warn   acl = acl_callout_test
>     # at this point acl_c0 is set to "defer" "deny" or "accept"

>
> This should be a useful general method of wrapping any ACL condition
> test in order to handle deferrals without having to use the condition
> more than once.


Thanks, Andrew.
This looks like a pretty nice solution.

xn