Re: [exim] check for defer in acl

Top Page
Delete this message
Reply to this message
Author: Andrew - Supernews
Date:  
To: exim-users
Subject: Re: [exim] check for defer in acl
>>>>> "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.

--
Andrew, Supernews
http://www.supernews.com