Re: [exim] testing for availability of a host in RCPT ACL

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tony Finch
Ημερομηνία:  
Προς: Chris Lightfoot
Υ/ο: exim-users
Αντικείμενο: Re: [exim] testing for availability of a host in RCPT ACL
On Wed, 24 May 2006, Chris Lightfoot wrote:
>
> What I'd like in this case is for the verify = recpient
> condition to result in a failure with an appropriate value
> in $recipient_verify_failure or somewhere else that I can
> test it. Is there a way to do this?


There's a hacky way to do this using ACL variables to store the result
of the verify when it gives a definite result, and the warn condition to
stop the defer from propagating. Something like:

DESTINATION = acl_m0

# ...

  warn
    set DESTINATION = defer


  warn
    domains = +relay_domains
    verify = recipient/nocache
    set DESTINATION = accept


  warn
    domains = +relay_domains
  ! verify = recipient/nocache
    set DESTINATION = deny


  deny
    message = Invalid recipient address: $acl_verify_message
    domains = +relay_domains
    condition = ${if eq{DESTINATION}{deny} }


  defer
    message = Primary MX for $domain is up, please try that
    domains = +relay_domains
    condition = ${if eq{DESTINATION}{accept} }


  accept
    domains = +relay_domains


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}