Re: [Exim] pull back lookup info as variable

Página Inicial
Delete this message
Reply to this message
Autor: Dave Markham
Data:  
Para: Tor Slettnes
CC: exim-users
Assunto: Re: [Exim] pull back lookup info as variable
Thanks. I know the syntax would be wrong its just trying to put down whats
in my head :) I will try your example thanks again.

Unfortunately the mail server does not have local domains as such and what I
am trying got do is send a message depending on the target MX resolved ip
either straight on, if its what im calling an internal ip, or send it out to
internet via a third party if its for any other domain. The mail server is
acting as a relayer for internal departments as such and there are many many
domains of which we do not all know. What we do know is the ip range of
these internal departments. hope that makes sense. The departments will need
to send to each other or send out to internet.

Thanks
Dave



----- Original Message -----
From: "Tor Slettnes" <tor@???>
To: "Dave Markham" <dave.markham@???>
Cc: <exim-users@???>
Sent: Thursday, July 15, 2004 8:11 PM
Subject: Re: [Exim] pull back lookup info as variable


>
> On Jul 15, 2004, at 08:28, Dave Markham wrote:
> > #routers
> > ext_if_not_int:
> >    driver = dnslookup
> >    domains = ! +local_domains
> >    transport = external_smtp
> >    headers_remove = recieved
> >    condition = ${lookup
> > dnsdb{mx=$domain}lsearch{/usr/exim/internal_ips}fail}  <- this bit
> > made up

>
> Some problems with the above statement:
>    - You are performing an MX lookup, which will (should!) return a name,
>      not an IP address.  Matching it against a list of IP addresses will
>      always fail.

>
>    - A single ${lookup..} cannot query both 'dnsdb' and 'lsearch'.  You
> need
>      nested lookups.

>
>    - Per syntax of the ${lookup...} function, "fail" is not valid where
> you
>      put it.

>
>
> You probably mean something like:
>    condition = ${lookup {${lookup{a=$domain}{$value}fail}} \
>                         lsearch {/usr/exim/internal_ips} \
>                         {true}}

>
>
> But may I ask why you do this?  Doesn't the line:
>     domains = ! +local_domains

>
> take care of what you try to accomplish?
>
> -tor
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>