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

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Exim users mailing list
Subject: Re: [exim] How to determine address of network by IP address of host
On Tue, 23 Jan 2007, Alexander Shikoff wrote:

> Philip, I hope my next question is not vastly dumb: why not use $host_data
> (and other $..._data variables) to store result of matching against a?lists too?


The $host_data variable is used when a match in a host list in an ACL
happens as a result of a lookup. The data that was retrieved as part of
the lookup is placed in $host_data. It does *not* contain the item from
the list that was matched. Example:

hosts = net-lsearch;/some/file

If the file contained:

10.0.0.1: this-is-data

then when "hosts" has matched 10.0.0.1, $host_data contains
"this-is-data". There is no variable that contains
"net-lsearch;/some/file".

> In example above: when matching 10.10.10.1 against hostlist succeeds it is
> possible to store correspondent element of list in $host_data variable.


If $host_data were extended to apply to ${if match_host then it should
be the same as it is in an ACL, so no, it couldn't be the element of the
list that matched.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book