Viktor Dukhovni:
> On Fri, Feb 05, 2021 at 07:47:46PM +0100, Benoit Branciard wrote:
> 
> > Le 05/02/2021 ? 16:53, Wietse Venema a ?crit?:
> > > 
> > > All Postfix table-driven mechanisms will case-fold the search key
> > > except when they use pcre, regexp, or tcp_table.
> > 
> > This sounds like a acceptable choice for *matching* purpose (although 
> > incidentally this prohibits use of case-sensitive LHS in e-mail 
> > addresses), but *retention* is another point.
> > 
> > Why not having the case folded for table lookup, but retaining the 
> > unfolded version for result_format ?
> 
> Because that's just how the table machinery was constructed, and the
> "%S" syntax is a special feature of just the more complex database
> backends.  Because LDAP has built-in matching rules, it is indeed
> perhaps reasonable to not case-fold (some) LDAP lookup keys.
> 
> As a safety measure, this would have to be a map by map optional
> setting.  I am not 100% sure that all LDAP lookups would necessarily
> be using lookup keys with case-insensitive matching rules.  For example,
> maps that query accounts by "uid", might need case folding, because the
> "uid" namespace might be case-sensitive, but for email we generally
> allow case-insensitive addressing.
> 
> The feature to conditionally suppress case folding for some LDAP maps
> has not been implemented.  Care to contribute a patch?
> 
>     src/global/dict_ldap.c

Should not this be controlled one level up, in the maps_finmd() layer?

        Wietse

Reply via email to