Re: [exim-dev] warning on missing environment option

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Heiko Schlittermann
Dátum:  
Címzett: exim-dev
Tárgy: Re: [exim-dev] warning on missing environment option
Hi,

Andreas Metzler <eximusers@???> (Do 10 Mär 2016 18:22:43 CET):
> Hello,
>
> I am a little bit unhappy with the current state of
> add_environment/keep_environment:
>
> * Exim throws a runtime warning if neither of the options is set.
> * configure.default does not set either of the options
> (even f26587cbf325ebb365cd670db767363775391dc6 has only commented
> examples).


Yes. We can't provide a sensible default, as it depends on the users
need and system environment.

> * Setting keep_environment to an empty value ("keep_environment =")
> makes the warning go away, doing the same for add_environment doesn't.


Setting keep_environment to some, even an empty value clearly indicates
the users intention. If only add_environment is there, it's not obvious
that the "default" environment is empty. In fact, the warning should
persist as long as keep_environment isn't used at all. But see my notes
below.

> All this seems to be incongruent. The warning suggests that all but very
> atypical installation will want to set at least one of the environment
> options.


Hm, yes. I'd consider the warning as a debugging aid. Exim changes its
behaviour and some installations are expected to break because of the
cleaned environment.

And users are expected to check the log files. So hopefully
they find the warning about the environment and the new options.

> But we are not able to come up with a a sane, safe default that
> is set in our configuration example. (If there was a sane safe default
> keep_environment would use this instead of "" by default and we would
> not need to set it explicitely everywhere, and the warning would be
> superfluous.)


IMHO there is no sane default except an empty value. Exim itself doesn't
make use of any environment, but some of the linked libraries may make
use of some existing environment. Same holds for pipe transports,
commands run via the ${run{…}} and similar.

The users should be forced to think about the variables they need.


> I am personally wondering whether the warning is really necessary lor
> too invasive. In Debian I have set "add_environment = <;
> PATH=/bin:/usr/bin" for lack of a better idea and because my experiment
> with "add_environment =" failed to suppress the warning. If I started
> fresh now I'd set "keep_environment =" instead.


Yes, the intention was to do exactly that

    keep_environment =


to show the intention, to show that you know about the implications of
an empty environment.

> The third issue mentioned above ("add_environment =" does not suppress
> a warning) seems to be a bug as it is not documented.


Yes, but I'd like to turn it the other way round: the use of
add_environment doesn't influence the warnings at all.

And, I can imagine that future release of Exim do not issue that warning
at all anymore, because for new versions users are expected to read the
release notes.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -