exim: unconditionally build with dsearch lookups enabled #102217
Motivation for this change
dsearch is required to do untainted lookups in directories. There's no reason not to build it in and it's a standard feature in other distributions. While it's been there forever the security changes around tainted inputs make its availability crucial.
dsearch is required to do untainted lookups in directories. There's no reason not to build it in and it's a standard feature in other distributions.
I guess the only reason not to built it is that you're not using this feature, which e.g. @dasJ and I aren't.
@pkern Is there any kind of useful "standard exim featureset" defined anywhere? I know distributions like debian or suse ship very complex exim configs, which I'm sure require all kinds of features, but I don't think that is something we want to start doing.
dsearch is one of the mechanisms that is a completely standalone C implementation shipped by exim and doesn't include any external libraries. Plus the whole tainting changes make it crucial to have IMO (I use it to find the appropriate DKIM key on disk - which broke when coming from Ubuntu because of the newer security changes).
It's unfortunate that exim coped out on the whole question of standard feature set. I'd caution against equating "very complex exim configs" - which NixOS currently sidesteps completely with its "bring your own config" setup - with build time feature config. Debian does ship two flavors (light and heavy) and even has some support in the source package to do custom builds.
The light build includes cdb, dsearch, passwd, and oddly enough NIS. All of these are implemented using just glibc and don't pull in extra dependencies. Heavy is simply everything and I think NixOS' current setup of allowing to pull in specific backends makes way more sense here.
The current approach of letting users introduce conditionals beyond what's implementable without additional dependencies seems fine to me. I don't think dsearch should be subjected to that, precisely because it's completely self-contained.