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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jakob Hirsch
Dátum:  
Címzett: Alexander Shikoff
CC: exim-users
Tárgy: Re: [exim] How to determine address of network by IP address of host
Quoting Alexander Shikoff:

> I know that *_data variables is used when a match in a host list in an ACL
> happens as a result of a lookup. But in some cases (where lookups are
> needless and lists are used) it would be great to get in some variable the
> item from the list that was matched. As I now at this moment there is
> no such variable in exim.


you could use the feature Philip explained to get just that:

- create a file containing the networks, only doubled, like
10.0.0.1: 10.0.0.1
10.1.1.0/24: 10.1.0/24
(easy to do with a tiny script)
- use net-lsearch on this file
- after a match you have the matched data in $host_data, which is just
the matched network