Re: [exim] How to determine address of network by IP address…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Peter Bowyer
Date:  
À: Exim users mailing list
Sujet: Re: [exim] How to determine address of network by IP address of host
On 23/01/07, Alexander Shikoff <minotaur@???> wrote:
> On Tue, Jan 23, 2007 at 01:58:53PM +0000, Peter Bowyer wrote:
> > On 23/01/07, Alexander Shikoff <minotaur@???> wrote:
> > > One more question about hostlists.
> > >
> > > I have
> > >
> > > hostlist nets = 10.10.10.0/24 : 20.20.20.0/24
> > > ...
> > >
> > > acl_check_rcpt:
> > >        accept
> > >                hosts = +nets

> > >
> > > Remote relay connects from host 10.10.10.1.
> > >
> > > How I can determine address of network which contains 10.10.10.1 after
> > > such 'hosts' condition succeeded?
> >
> > $sender_host_address
>
> $sender_host_address is not a address of network. This is an address of
> remote host. I need subnet address.


Sorry, I misunderstood. You need to know which netblock matched.

>
> In other words: when 'hosts' condition in example above succeeded for remote
> host 10.10.10.1 I need to get 10.10.10.0/24 from 'nets' list.


I don't think you can using an inline hostlist like your example. You
could probably do something with a net-lsearch and $host_data,
though.....

Peter

--
Peter Bowyer
Email: peter@???