Hi Guys,

Am having a bit of a confusing time with control flow in my  
check_content ACL.  I'm using the ACL for clam and sophos scanning  
however i'm trying to modify it to bail out if a particular header is  
present in the message being scanned.

Basically does the ACL return on the first successful accept or does  
it terminate on the last line of the block?  Despite my header being  
present the ACL still falls through to the final accept.  Am I  
misunderstanding here?

My check_content ACL looks a like this:

acl_check_content:

    # if X-Dont-Scan header is present we're done
    accept condition = ${if def:header_X-Dont-Scan:  }

    # Reject messages that have serious MIME errors.
    deny message = Serious MIME defect detected ($demime_reason)
         demime = *
         condition = ${if >{$demime_errorlevel}{2}{1}{0}}

    # Reject virus infected messages.
    deny message = This message contains malicious software  
($malware_name)
         set acl_m1 = sophie:/var/run/sophie.sock
         condition = ${if eq {$acl_m0} {yes} {yes} {no}}
         demime = *
         malware = */defer_ok

   warn message = X-Virus-1: Scanned by Engine 1 (SO)

   # ClamAV
   deny  message = This message contains malicious software  
($malware_name)
         set acl_m1 = clamd:/var/run/clamav/clamd
         condition = ${if eq {$acl_m0} {yes} {yes} {no}}
         demime = *
         malware = */defer_ok

   warn message = X-Virus-2: Scanned by Engine 2 (CL)

   accept

Cheers,
Marcus

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

Reply via email to