Re: [Exim] CIDR-style addresses and net-dbm lookups

Góra strony
Delete this message
Reply to this message
Autor: Dominik Ruf
Data:  
Dla: exim-users
Temat: Re: [Exim] CIDR-style addresses and net-dbm lookups
* Christopher Snell <cjsnell@???> [2004-05-25 04:37]:
>
> Is there any way to have lookup from
> a DBM file containing a many different sizes of CIDR blocks?
>
> Something like this would be cool:
>
> deny hosts = netmulti-dbm;/etc/mail/prohibited_netblocks.dbm


NewStuff:

- snip -
4. There is a new lookup type called "iplsearch". It is another linear search
lookup. The keys in the file must be IP addresses, or IP addresses with
CIDR masks. Keys that involve IPv6 addresses must be enclosed in quotes to
prevent the first internal colon being interpreted as a key terminator. An
asterisk key is also permitted for use with iplsearch*. For example:

      *:                 data for *
      1.2.3.4:           data for 1.2.3.4
      192.168.0.0/16     data for 192.168.0.0/16
      "abcd::cdab":      data for abcd::cdab
      "abcd:abcd::/32"   data for abcd:abcd::/32


The key for an iplsearch lookup must be an IP address. The file is searched
linearly, until a matching key is found. The first key that matches is
used; there is no attempt to find a "best" match.
- snip -

Dominik