Lähettäjä: Ian Zimmerman Päiväys: Vastaanottaja: exim-dev Aihe: Re: [exim-dev] Bug 2369: single-key lookup type based on
libcorkipset
On 2019-02-25 18:19, Ian Zimmerman wrote:
> 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
And I narrowed it down: when I replace the leading 0000 hexuplet with
1234, it succeeds. So, leading zeros seem to be the problem. I also tried
to replace instead with a single 0 (thinking redundant leading zeros
might be it) but that still fails.
Doing this now in test 0002 instead from command line. Significantly,
that test didn't try any address with leading zeros before.
--
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.