On Sat, Jun 25, 2022 at 11:07:20AM -0400, Wietse Venema <wie...@porcupine.org> wrote:
> Wietse: > >I'm looking into adding "name .= value" support but this is tricky > >because it has to work not only in main.cf but also in master.cf > >(-o name.=value). > > That idea originated in the context op adding an 'extra' to the > default value of export_environment, or addind map that I forgot > to include in the proxy_read_maps default value. > > For example, > > export_environment .= { NAME = value } > > would result in > > export_environment = TZ MAIL_CONFIG { LANG NAME=value } > > But that won't work if we also want the following to work. > > Matus UHLAR - fantomas: > > submission inet n - y - - smtpd > > -o syslog_name.=/submission > > relay unix - - y - - smtp > > -o syslog_name.=/$service_name > > If we support that, the export_environment result will look like > > export_environment = TZ MAIL_CONFIG LANGNAME=value > > which is not what we want. > > It can be fixed by requiring a comma when appending to a list: > > export_environment .= , { NAME = value } > > would result in > > export_environment = TZ MAIL_CONFIG LANG, { NAME = value } > > This is more explicit, and a little less user friendly. > > Wietse If .= can reliably distinguish between being applied to a list or scalar parameter, maybe it could automatically include a leading space when adding to lists. cheers, raf