Re: [exim] Testing if a host name exists

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Wakko Warner
Data:  
Para: Marc Perkel
CC: exim-users
Asunto: Re: [exim] Testing if a host name exists
> Here's what I need to do.
>
> I need to determine if a host name exists. mail-in.domain.com
>
> If the domain exists - accept the message.
> If the domain doesn't exist then skip this router and go on to the next one.
> If there is a DNS error - skip the router and go to the next one.
>
> This code has a problem in that when it fails it defers. Don't want any
> defers. How do I do this?
>
> process_and_forward_auto:
> driver = manualroute
> require_files = /x
> 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}{fail}}"
> no_verify


I see a problem in the above.
that should be: ${lookup dnsdb{a=mail-in.$domain}{$value}fail} (Note I
removed the {} around fail).

You could also change the condition to:
${if match{$h_X-Spam:}{HIGH}
    {no}
    {${lookup dnsdb{a=mail-in.$domain}{yes}{no}}}
}


I realize it's a duplication, however, lookups should be cached.

--
Lab tests show that use of micro$oft causes cancer in lab animals