On Thu, Oct 23, 2014 at 11:07:30AM -0400, Wietse Venema wrote: > Viktor Dukhovni: > > It might alternatively make sense to allow escaping via "\{", "\}" > > and "\\", and to signal the pcre/regexp drivers to apply such > > escapes to interpolated strings. > > Postfix does not support backslash escapes. Introducing that now > would be too disruptive. Introducing them only for special cases > would cause more problems than they solve. I fight against special > cases and for orthogonality. > > > > (Of course nothing in Postfix can protect against accidents caused > > > by text manipulations inside a policy daemon; they would have to > > > censor themselves, or Postfix would need an option to disable {} > > > support for policy filter replies). > > > > As for policy tables, it might be better to support multiple "action" > > values in a single reply, though I understand that this may be > > difficult to support in the current "attr_client" API, can > > "ATTR_TYPE_FUNC" deal with repeated instances of the same attribute? > > Sorry, it must be the same interface as access tables. Special > cases are taboo.
I'm not fond of lossful mangling of the input, especially if policy services are liable to get it wrong. Perhaps this idea needs to wait until the Postfix dictionary layer understands multiple results, returning a list rather than a concatenation. At that point, suitable variants of pcre/regexp or directives at the top of the file can turn on list splitting of the RHS prior to sub-pattern replacement. -- Viktor.