Re: [exim] acl_smtp_data header_sender not using log_message

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Fred Viles
日付:  
To: exim-users
題目: Re: [exim] acl_smtp_data header_sender not using log_message
On 18 Nov 2004 at 9:34, Philip Hazel wrote about
    "Re: [exim] acl_smtp_data header_sen":


| On Wed, 17 Nov 2004, Fred Viles wrote:

|...
| > If you want to deny on verify deferral, you can use an ACL variable 
| > to detect it.  Something like this (untested):
| > 
| >  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
| >        !verify = header_sender
| > 
| >  warn set acl_m0 = verify_deferred
| >        verify = header_sender
| >    set acl_m0 = verify_done
| > 
| >  deny  message     = Rejected: sender address verification could not \
| >                       be completed at this time
| >        condition   = ${if eq {$acl_m0}{verify_deferred}{yes}{no}}
| 
| That cunning trick won't work as it stands, because hitting "defer" 
| inside "deny" will cause the whole ACL to defer.


Sorry, I overlooked that factor.

| However, if you
| re-order the statements so that the "warn" comes first, it should work.
| (I say "should" because I too haven't tested this.)


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}}


- Fred