Viktor Dukhovni:
> It is unfortunate that Postfix does not support "+=" main.cf settings
> that augment the default value of a given parameter.  In the case

The semantics have not been worked out. Below is an attempt.

Here, the parameter value should be 'whatever bar'.

    main.cf
        # Assume foo has a default value of 'whatever'.
        foo += bar

That adds complexity, because the Postfix main.cf reader does not
know parameter default values at the time that it reads parameter
settings. Postfix looks up parameter default values after reading
the entire main.cf file (some default values are determined
dynamically, and that should happen only if really necessary). Only
after that can Postfix append the '+= bar' value to 'whatever'.
The complexity is that the main.cf reader will have to store the
'=' and '+=' inputs differently, perhaps under 'foo' and '+foo'.

Below, the second line overrides all earlier foo settings, so the
value is 'whatever', not 'whatever bar':

    main.cf
        foo += bar
        foo = whatever

This adds no significant complexity.

The -o options in master.cf should behave like they do in main.cf,
and the same holds for -o options on the postconf and other command
lines.

For consistency, settings in other config files (ldap, *sql, etc.)
should also support +=. Hopefully, cfg_parser can handle that (it
uses the same configuration file reader as is used for main.cf).

I would advise against faking += in the postconf command, where

    postconf foo+=bar

is fakeds by doing the equivalent of

    postconf foo="`postconf -h foo` bar"

This would not work as expected: it would not follow changes in the
default value, like the real += would.

        Wietse

Reply via email to