Re: [exim] acl_smtp_data header_sender not using log_message

Góra strony
Delete this message
Reply to this message
Autor: Fred Viles
Data:  
Dla: exim-users
CC: Mike Sturdee
Temat: Re: [exim] acl_smtp_data header_sender not using log_message
Did you mean to send this to the list? I'm replying there.

On 17 Nov 2004 at 12:20, Mike Sturdee wrote about
    "Re: [exim] acl_smtp_data header_sender not using ":


| On Wed, 17 Nov 2004, Fred Viles wrote:
| 
| > On 17 Nov 2004 at 10:55, Mike Sturdee wrote about
| >    "[exim] acl_smtp_data header_sender ":
| >
| > | I am trying to set a custom log message upon failing verification of the
| > | header_sender in the smtp_data acl, but when verification is deferred, it
| > | ignores mine and uses the "stock" error message.
| > |
| > | Is this possibly an exim bug?
| >
| > FWIW, it doesn't seem so to me.  Your ACL's preconditions were not
| > met (verification did not fail), so its log_message and message lines
| > don't apply.
| 
| Mail is denied at that point with "temporarily rejected after DATA". What 
| would have triggered the "deny" then if the precondition was not met?


Nothing triggered the "deny". The mail was not denied (5xx reply
code), it was deferred (4xx reply code). They are not the same
action.

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


- Fred