On Sep 27, 2014, at 11.20, Viktor Dukhovni <[email protected]> wrote:
> On Sat, Sep 27, 2014 at 10:42:27AM -0400, Wietse Venema wrote:
>
>>> [root@mail-gw:~]$ postconf -n | grep config_directory
>>> config_directory = /etc/postfix
>>
>> You're welcome to fix that. I'm now working on other things,
>> supporting per-milter and per-policy service settings.
>
> There's a subtlety here. Lots of settings in main.cf use
> ${config_directory}, so that needs to be set early to the "-c"
> option value, $MAIL_CONFIG in the environment or finally the
> compiled-in default value. Because of "catch-22" none of these
> come from main.cf itself. So that value is pushed into the parameter
> dictionary early, before main.cf is read. Otherwise it would have
> to be added to the configuration dictionary in one of two places:
>
> * Before reading main.cf, but only if explicitly passed in via
> the environment or the "-c" option.
>
> * After loading main.cf, but only if not already set.
>
> There would still be anomalies, for example when looking at "postconf
> -n" via postmulti(1), the MAIL_CONFIG environment variable will be
> set by postmulti(1) to indicate the desired instance even when that
> instance is the default instance. And for non-default instances
> it is still useful to see "config_directory" reported, though it
> is most likely is not (and should not be) set in main.cf itself.
>
> postmulti -i instance -x postconf -n
you read my mind. thanks for this detail.
-ben