> On Aug 20, 2017, at 3:25 PM, Boris Rybalkin <ribal...@gmail.com> wrote:
> 
> As I understand from the documentation to change default config dir I
> need to use DEF_CONFIG_DIR flag and recompile.
> What is the reason to not support ability to change it (cmd param?)
> without recomppilation?

You can override the default configuration directory on the command
line:

        # postfix -c /etc/postfix-foo start|stop|reload|...
        # postqueue -c /etc/postfix-foo -p|-i <id>|-s site|...

However

  * having to do that all the time is a nuisance

  * System start scripts likely don't know about the
    alternate configuration directory.

  * For security reasons the sendmail(1) (really the underlying
    postdrop(1)) command won't accept non-default configuration
    directories that are not "blessed" by the main.cf file
    located in the compile-time default directory.

So, in practice, you really should have a working Postfix configuration
in the default directory.   If you include something along the lines of:

   /etc/postfix/main.cf:
        alternate_config_directories = /etc/postfix-foo

Then the Postfix instance in /etc/postfix-foo can be used as you see
fit.  See MULTI_INSTANCE_README for additional information:

   http://www.postfix.org/MULTI_INSTANCE_README.html

-- 
        Viktor.

Reply via email to