On Sat, Nov 20, 2021 at 07:37:56PM -0800, Mel Pilgrim wrote:

> I need Postfix to be case-preserving.

Postfix does not change the case of recipient addresses unless you
rewrite them (virtual(5) or local aliases).

Earlier you said you want case-sensitive map lookups (preserve case of
table lookup keys), which not the same thing as preserving the output
case or just leaving the address as-is if not rewritten.

Which is it?

> If internally it's case-insensitive that's fine so long as
> "alice.sm...@example.com" gets stored as is.

Postfix preserves the case of the original address or any replacements
via table lookups.  It case-folds the table lookup keys for indexed
files and *SQL databases.  The regexp and pcre tables see the verbatim
original input.

> The ldap driver will need that specific capitalization in query
> strings because the case-folded versions will return empty sets, not
> the alias expansion, mailbox path, and next-hop records returned for
> the case-preserved versions.

Now you're talking about lookup keys I guess.  A correctly implemented
LDAP schema for email will have case-insensitive lookup keys for email
address-valued lookup key attributes.  I guess news of the relevant
specs has not reached this particular installation.

If it is just LDAP tables you want to avoid case-folding, then you'd
tweak just the LDAP driver.

One might reasonably argue that the LDAP driver shoul not have folded
case in the first place, because unlike SQL, LDAP supports and generally
has case insensitive attribute definitions for "mail", "maildrop", ...

But at this point it is unclear who's relying on the current behaviour,
so changing LDAP to not case by default does not seem like a safe
choice.  It would be easy to customise just the LDAP driver to
take an extra named property in the table definition.

    casefold = no

If you submit a patch for that, I'd support it.

-- 
    Viktor.

Reply via email to