Re: [exim] acl_smtp_data header_sender not using log_message

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Fred Viles
CC: exim-users
Subject: Re: [exim] acl_smtp_data header_sender not using log_message
On Thu, 18 Nov 2004, Fred Viles wrote:

> Not quite, I guess. Just moving the warn (& second deny) would set
> acl_m0 to verify_deferred if the verify fails. How about:
>
>  warn set acl_m0 = verify_deferred
>        verify = header_sender
>    set acl_m0 = verify_suceeded
>        !verify = header_sender
>    set acl_m0 = verify_failed

>
>  deny  message     = Rejected: sender address verification could not \
>                       be completed at this time
>        condition   = ${if eq {$acl_m0}{verify_deferred}{yes}{no}}
>        log_message = There must be a valid sender address in the \
>        headers: RCPTS $recipients
>        message     = There must be a valid sender address in the headers
>        condition   = ${if eq {$acl_m0}{verify_failed}{yes}{no}}


Still not quite! When acl_m0 is not "verify_deferred", the first
condition in the "deny" will fail and so the whole ACL statement will
end, with control passing to the next statement. You need multiple
"deny"s to implement "or" conditions:

  deny  message     = Rejected: sender address verification could not \
                       be completed at this time
        condition   = ${if eq {$acl_m0}{verify_deferred}{yes}{no}}


  deny  log_message = There must be a valid sender address in the \
           headers: RCPTS $recipients
        message     = There must be a valid sender address in the headers
        condition   = ${if eq {$acl_m0}{verify_failed}{yes}{no}}


Oh! The same story applies to the "warn" as well. If the first verify
fails, the warn finishes... You are going to need something like

  warn set acl_m0 = failed or deferred
       verify = header_sender 
       set acl_m0 = succeeded


  warn condition = ${if !eq{$acl_m0}{succeeded}{yes}{no}}  
       set acl_m0 = deferred
       !verify = header_sender  
       set acl_m0 = failed




-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book