Re: [exim] check for defer in acl

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Giuliano Gavazzi
Data:  
Para: Christian G. Warden, exim-users
CC: 
Asunto: Re: [exim] check for defer in acl
At 1:32 pm -0700 2004/09/17, Christian G. Warden wrote:
>How can I determine if a condition returns defer?
>
>I want to add a header based on the result of sender address
>verification with the value being OK, FAIL, or TEMPFAIL.
>I'm having trouble figuring out how to determine if the verify = sender
>condition returns defer. If this is not possible, but it is possible to
>determine if an acl condition returns defer, I could move the verify
>into an acl.
>
>I'm currently using this hack:
>acl_check_rcpt:
>   warn
>     verify = sender/callout=60s,random
>     message = X-Sender-Verification: OK

>
>   warn
>     ! verify = sender/callout=60s,random
>     message = X-Sender-Verification: FAIL

>
>acl_check_data:
>   warn
>     ! condition   = ${if def:h_X-Sender-Verification: {1}}
>     message = X-Sender-Verification: TEMPFAIL

>



I think the solution was in a post from June (sorry to the list for
not just posting a reference):



At 12:21 pm +0200 2004/06/23, Giuliano Gavazzi wrote:
>At 10:38 am +0100 2004/06/23, Philip Hazel wrote:
>>On Tue, 22 Jun 2004, Sandip Bhattacharya wrote:
>>
>>> I use defer_ok in sender verify callouts, and a mail is accepted
>>>even though
>>> its sender could not be verified using callout. Is it possible to add a
>>> header to the mail in this case saying that this sender could not be
>>> verified using callout even though his domain verified ok.
>>
>>Not as far as I know.
>>
>
>I think yes, just don't use defer_ok but use acl variables. Taken
>from my configuration:
>
>
>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
>      set acl_m2 = YOUR EMAIL ADDRESS: $sender_address_local_part
>COULD NOT BE VERIFIED, CHECK IT AND RESEND\n<<< this is the
>contribution to the error message
>      condition = ${if match {$sender_address_local_part}{\N([0-9]{2})\N}\
>                                {yes}{no}} <<< I am tougher with 
>these senders..
>      set acl_c7      = 10 << and give them 10 points if they fail callout

>
>
>clearly you can simplify a lot, as I do not reject solely based on
>callout, mine is somehow more than you need. But you can see how to
>do what you want I hope.
>
>Note that, since the callout is cached, only one callout is actually
>performed, as in the more common usage.