Re: [exim] Does $acl_verify_message actually work?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Bryan Rawlins
日付:  
To: exim-users
題目: Re: [exim] Does $acl_verify_message actually work?
Marc Perkel wrote:
>
>
> Bryan Rawlins wrote:
>
>> Marc Perkel wrote:
>>
>>
>>> Been trying to use $acl_verify_message but it always returns an empty
>>> string. I'm even storing it in a variable to preserve it.
>>>
>>> warn    !condition = ${if def:acl_c_no_sender_verify}
>>>     !verify = header_sender/callout=2m,defer_ok,random
>>>     condition = ${if eq{recipient}{$sender_verify_failure}}
>>>     set acl_c_verify_failed = $acl_verify_message

>>>
>>>
>>> Am I doing something wrong?
>>>
>>>
>>>
>>>
>> Line 3 is never going to result in a TRUE condition AFAICT, what are you
>> trying to do there? Perhaps a 'match' with a regexp is in order?
>>
>>
>>
> That part works for me. $sender_verify_failure returns things like
> recipient, mail, etc.
>

It should return the full text of the error when verification fails,
since your verifying with callout I would think that would leave you at
the mercy of the called server (assumed that's a 3rd party). Thus I
can't see how you can rely on it being that particular string.

/$acl_verify_message/

    After an address verification has failed, this variable contains the
    failure message.


Testing here seems to indicate that the variable works:
>>> Connecting to loki.rawlinsnet.net [64.85.152.211]:25 ... connected
>>> SMTP<< 220 loki.rawlinsnet.net ESMTP Exim 4.63 Fri, 20 Feb 2009

13:19:48 -0500
>>> SMTP>> HELO mailfilter.onlymyemail.com
>>> SMTP<< 250 loki.rawlinsnet.net Hello mailfilter.onlymyemail.com

[216.234.108.232]
>>> SMTP>> MAIL FROM:<bryan@???>
>>> SMTP<< 250 OK
>>> SMTP>> RCPT TO:<duder@???>
>>> SMTP<< 550 User unknown: duder@???
>>> SMTP>> QUIT
>>> wrote callout cache domain record:
>>> result=1 postmaster=0 random=0
>>> wrote negative callout cache address record
>>> ----------- end verify ------------
>>> accept: condition test failed
>>> accept: endpass encountered - denying access

550-Recipient Verification (callout) failed for duder@??? with
550-message: Callout verification failed:
550 550 User unknown: duder@???
LOG: [6033] H=mail.example.com [192.168.6.4] F=<bryan@???>
rejected RCPT <duder@???>: OmeRcptVfc [response to "RCPT
TO:<duder@???>" from loki.rawlinsnet.net [64.85.152.211] was:
550 User unknown: duder@???] (duder@???):
Recipient Verification failed.: response to "RCPT
TO:<duder@???>" from loki.rawlinsnet.net [64.85.152.211] was:
550 User unknown: duder@???

Config snippet:
accept  domains         = +rcv_domains
            condition       = ${lookup {$local_part} 
dbm{<redacted>/$domain.dbm}}
            endpass
            log_message = OmeRcptVfc [$acl_verify_message] 
($local_part@$domain): Recipient Verification failed.
            message         = Recipient Verification (callout) failed 
for $local_part@$domain with message: $acl_verify_message
            verify          = recipient/callout=30s,use_sender