Re: [Exim] router condition

Página Inicial
Delete this message
Reply to this message
Autor: Matthias Waffenschmidt
Data:  
Para: Craig Jackson
CC: exim-users
Assunto: Re: [Exim] router condition
Hi,

On Wed, Jun 23, 2004 at 07:38:14PM -0500, Craig Jackson wrote:
> On Tue, 2004-06-22 at 22:02, Craig Jackson wrote:
> > Hi Friends,
> >
> > I want to run a router only for senders from outside the network. This
> > is a DSPAM router:
> >
> > dspam:
> >   driver = accept
> >   no_verify
> >   condition = ${if and {{!def:h_X-Spam-Flag:} \
> >     {!def:h_X-FILTER-}{1}{0}}
> >   headers_add = "X-FILTER-primary_hostname on $tod_full"
> >   transport = dspam_check

> >
> > 1) How would this be done by IP address on a 192.168.193. network?
> >
> > 2) How would this be done by named list search?
> >     e.g. I tried this in the condition that didn't work
> >     {!eq{$sender_address_domain}{+local_domains}}

> >
>
>
> As I said, I have answered my own question 2 above but am still stumped
> on 1, i.e. matching the ip address in a router like this
>
> condition = {if match{$sender_host_address}{192.168.12.0/24}{0}{1}}
>
> This won't work, I know. Can someone respond with something that
> works????


Unfortunately, the matchhost function is still on wishlisted (no.73),
but to test an IP address against a simple IP range you can use mask:

condition = ${if {eq {${mask:$sender_host_address/24}}{192.168.12.0/24}}{0}{1}}

--
Gruss / Best regards   |  LF.net GmbH        |  fon +49 711 90074-411
Matthias Waffenschmidt |  Ruppmannstr. 27    |  fax +49 711 90074-33
mw@???              |  D-70565 Stuttgart  |  http://www.lf.net