Auteur: Phil Pennock Date: À: Jeff Lasman CC: exim-users Sujet: Re: [exim] whitelist a netblock
On 2008-01-18 at 20:25 -0800, Jeff Lasman wrote: > I use:
>
> hostlist whitelist_hosts_ip = net-lsearch;/etc/virtual/whitelist_hosts
Try that without the "net-lsearch;":
hostlist whitelist_hosts_ip = /etc/virtual/whitelist_hosts
The Exim Specification ("spec.txt" in its plaintext form):
----------------------------8< cut here >8------------------------------
10.4 An lsearch file is not an out-of-line list
-----------------------------------------------
As will be described in the sections that follow, lookups can be used in lists
to provide indexed methods of checking list membership. There has been some
confusion about the way lsearch lookups work in lists. Because an lsearch file
contains plain text and is scanned sequentially, it is sometimes thought that
it is allowed to contain wild cards and other kinds of non-constant pattern.
This is not the case. The keys in an lsearch file are always fixed strings,
just as for any other single-key lookup type.
If you want to use a file to contain wild-card patterns that form part of a
list, just give the file name on its own, without a search type, as described
in the previous section. You could also use the wildlsearch or nwildlsearch,
but there is no advantage in doing this.
----------------------------8< cut here >8------------------------------
Note that Exim does IP->hostname translation the first time it sees a
hostname to compare against, so if the file only contains IPs then
you'll be fine.
Also look at section 10.11, "Host list patterns that match by IP
address", to see what can go in the file.