Re: [Exim] acl verb warn and temporary problems

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Michael Westerburg
Data:  
Para: exim-users
Asunto: Re: [Exim] acl verb warn and temporary problems
Hello everybody,

thanks a lot to Giuliano Gavazzi who gave me the hint for circumvent the
problem we had with the acl verb warn. We modified the acl_check_data
entry to:

  warn  set acl_m0 = 0
        malware = *
        set acl_m0 = 1
        control = freeze
        message = X-Infected: $malware_name
        log_message = malicious content found ($malware_name) \
          Sender='$sender_address'
Recipients[$recipients_count]=[$recipients]


  warn  !malware = *
        set acl_m0 = 2


defer condition = ${if eq {$acl_m0}{0} {1}{0}}

If sophie is running the variable acl_m0 will switch anyway either to 1
(Virus found) or to 2 (No Virus found). Now it works fine!

Thank you very much again

++Michael

Giuliano Gavazzi wrote:
> I think you have to call the condition twice. As an example this is what
> I do for callouts:
>
>
> warn !sender_domains = aol.com : yahoo.com : netscape.net
>      set acl_c7      = 2  <<< this sets the value for deferred callout
>      verify          = sender/callout=30s,random
>      set acl_c7      = 0  <<< this resets the value if the callout
> succeeded

>
> warn    !sender_domains = aol.com : yahoo.com : netscape.net
>         !verify         = sender/callout=30s,random
>         log_message     = callout failed
>         set acl_c7      = 10 <<< this is the value for negative result
>         set acl_m2 = YOUR EMAIL ADDRESS: blah blah blah

>
> so, I have three values:
>
> 0: callout succeeded
> 2: callout gave error (remote server did not respond, etc.)
> 10: callout gave 5XX answer
>
> I do not know if malware = * can be used the same way, with callouts the
> double call does not add much overhead as the result is cached (well,
> perhaps only if it does not return error, but this is not a big problem).
>
> Giuliano