Bill Cole: > 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?
The postmap command does not know how the Postfix SMTP daemon converts an IPv6 address to string, which means that IPv6 address tests with the postmap command are valid only when using cidr maps. The Postfix SMTP daemon looks up the same address form as the form that it logs in information about the remote SMTP client. For example, 2604:8d00:0:1::4 or 2001:41d0:1:88ce:: (these are real samples from my maillog files). > > 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. Wietse