Re: [exim] lookup syntax help - second try

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Fred Viles
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] lookup syntax help - second try
On 7 Oct 2004 at 12:14, Marc Perkel wrote about
    "[exim] lookup syntax help - second ":


| I'm trying an experiment - but it somplains about the syntax.
|
| missing lookup type
|
| process_and_forward_auto:
| driver = manualroute
| domains = +preprocess_auto_domains
| condition = ${if match{$h_X-Spam:}{HIGH}{no}{yes}}
| transport = remote_smtp
| route_list = * ${lookup dnsdb{a=mail-in.$domain}{$value}}


I don't know why it's complaining about the ${lookup syntax, but if
the lookup failed the result would be an invalid route_list
statement.

| What I'm trying to do is set it up so that if the MX pints to my server
| - AND - there exists a host called "mail-in.domain.com - then the router
| will send the mail to that domain. If the host doesn't exist - I want to
| skip the router and go to the next router.


route_list won't do that. route_list only causes the router to be
skipped if the domain doesn't match any of the domain_patterns (your
'*').

I think you want to add the lookup to the condition= statement to
cause the router to be skipped if it fails. Maybe something like
(untested):

process_and_forward_auto:
  driver = manualroute
  domains = +preprocess_auto_domains
  condition = ${if and { \
        {match{$h_X-Spam:}{HIGH}}
        {${lookup dnsdb{a=mail-in.$domain}}}
        } {no}{yes}}
  transport = remote_smtp
  route_list = * ${lookup dnsdb{a=mail-in.$domain}{$value}}


- Fred