On 12 Mar 2019, at 10:29, Wietse Venema wrote:
Bill, I think that an IPv6 address ending in 0000 will work only in
a cidr access map, because all other maps use string comparison.
Did you notice the demo I included, using a hash map?
When the Postfix SMTP server queries a table it will use a system
library function to convert the client IP address to string, and
that function will
- first strip leading zeros, leaving a single zero when an octet pair
is null.
- then it will collapse repeated '0' fields.
So that is the canonical form for searching a non-cidr map.
That does not seem to match the experience of the OP or the behavior I
documented with the posted demo, in which I *think* I reproduced the
documented matching algorithm.
I expect that my puzzlement is related to postmap and smtpd not behaving
quite identically.
--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole