Re: [exim-dev] Bug 2369: single-key lookup type based on li…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Ian Zimmerman
日付:  
To: exim-dev
題目: Re: [exim-dev] Bug 2369: single-key lookup type based on libcorkipset
On 2019-02-24 19:51, Jeremy Harris wrote:

> On 24/02/2019 19:17, Jeremy Harris via Exim-dev wrote:
> > I don't know if a lookup done via the list-syntax
> > "hosts = corkipset:/filename"
> > will be different. Probably it will, sigh.
>
> Dots, and always seven.
>
> I tested by adding
>
>    "pipeline_advertised_hosts = net-corkipset;DIR/aux-var/TEST.ipset"

>
> to the config, some "exim -bh" to the script and some
> debug_printf() in the code. I didn't look at actual
> results of the lookups though.


Thanks for the help (as always).

I thought I would start by looking what iplsearch does, because it is
the closest lookup to what I'm dreaming about, semantically at least.
And bingo, it seems to not work as documented:

devuan-205f!33 exim$ ls `pwd`/strange-iplist
/home/itz/exim/strange-iplist
devuan-205f!34 exim$ ls `pwd`/exim.conf
/home/itz/exim/exim.conf
devuan-205f!35 exim$ cat strange-iplist
"0000:0000:0000:0000:0000:ffff:0102:0203" : data
"::ffff:102:203" : also_data
1.2.3.4 : more_data
devuan-205f!37 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{1.2.3.4}iplsearch{/home/itz/exim/strange-iplist}{$value}}'
more_data
devuan-205f!40 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{1.2.3.4}iplsearch{/home/itz/exim/strange-iplist}{good}{bad}}'
good
devuan-205f!38 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{0000:0000:0000:0000:0000:ffff:0102:0203}iplsearch{/home/itz/exim/strange-iplist}{good}{bad}}'
bad
devuan-205f!39 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{::ffff:102:203}iplsearch{/home/itz/exim/strange-iplist}{good}{bad}}'
bad
devuan-205f!41 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{0000.0000.0000.0000.0000.ffff.0102.0203}iplsearch{/home/itz/exim/strange-iplist}{good}{bad}}'
Failed: lookup of "0000.0000.0000.0000.0000.ffff.0102.0203" gave DEFER: "0000.0000.0000.0000.0000.ffff.0102.0203" is not a valid iplsearch key (an IP address, with optional CIDR mask, is wanted): in a host list, use net-iplsearch as the search type

So, maybe before trying to merge corkipset, I should focus on fixing
iplsearch :-o

--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.