OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: [patch] "post-install" has forgotten to read data_directory value.

From: Wietse Venema (wietseporcupine.org)
Date: Fri Feb 01 2008 - 08:22:54 CST


Victor Duchovni:
> The only way that "postfix start" can change main.cf (via create-missing)
> is for the environment passed by postfix(1) to postfix-script and hence
> to post-install to (miraculously) differ from the main.cf settings that
> post-install computes via "postconf -h". However, even in that case,
> empty values should not be possible, because the sanity check at the
> top of post-install should bail out early.

Wietse Venema
> [the bail-out test in 20080127 post-install] does not work reliably
> because the "test -n" argument needs to be quoted.
>
> Correct is this:
>
> for name in config_directory $MOST_PARAMETERS
> do
> eval test -n \"\${$name}\" || {
> echo "$0: Error: do not invoke this command directly" 1>&2
> echo Re-run this command as: postfix $0 ... 1>&2
> exit 1
> }
> done
>
> I'll roll out another snapshot.

The test is corrected, but the error message needs to be updated.
When "postfix start" is done with an old postfix executable, the
error message is the same as when the new post-install script is
invoked directly, because in both cases some environment variable
will be missing.

This will be fixed in a later snapshot release. It's not urgent,
because no harm is done. Sites are unlikely to have mixed-version
Postfix executables, and people who do will find this discussion
on the web.

        Wietse