Viktor Dukhovni: > On Fri, Nov 19, 2021 at 05:07:21PM -0800, Mel Pilgrim wrote: > > > I read in transport(5), virtual(5), et al that Postfix will case-fold > > query strings, but for one specific project I need it to not do that. > > Are there any tunables for this? I didn't see anything in postconf -d > > output that looked related. > > > > The short explanation is that I need to be able to do lookups against a > > strict-match-only case-sensitive database and the records are mixed case > > (e.g. al...@example.com). I'm fully aware of how stupid that is but > > this is not my data, not my system, not my money.
In email RFCs the domain portion is case case-insensitive, so these people are going to miss a ton of email. A quick search over years of my email shows that very few senders capitalize my domain name. > Is this for just one table, one database type, or *all* Postfix lookups > including btree, cdb, ... > > > If this isn't possible, can someone point me toward the code I would > > need to change so I can create a local, unsupported version if that ends > > up being my only recourse? > > You'll need a custom build, there's no built-in support for configurable > case folding outside the regexp tables (via /pattern/i). - If you can use pcre of regexp, you can greatly speed up searches with "IF /^[Aa]/ ..ENDIF" and so on. - If you must use other tables, update src/util/dict.h #define DICT_FLAG_FOLD_FIX (0) /* case-fold key with fixed-case map */ #define DICT_FLAG_FOLD_MUL (0) /* case-fold key with fixed-case map */ This will nuke the flags that request case folding. Wietse