Sven Bartscher:
Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.
> Hi,
>
> Am 29.10.19 um 00:39 schrieb Wietse Venema:
> > Sven Bartscher:
> >> My first intuition on how to fix this, wasn't actually to change the
> >> logging drastically, but to add escaping for characters that usually
> >> have special meaning in the address. As an example
> >>
> >> As an example I would log this address
> >>
> >> "[email protected]> from=<[email protected]> to=<\[email protected]"@example.com
> >>
> >> somewhat like this
> >>
> >> to=<[email protected]\> from=\<[email protected]\> to=\<\\x@[email protected]>
> >
> > Make the backslash character special when logging the sender in
> > Postfix reject messages? Bleh.
> >
> > I would prefer consistency, i.e. always log a sender or recipient
> > address in proper externalized form.
> >
> > from=<"[email protected]> from=<[email protected]> to=<\\[email protected]"@example.com
> >
> > There is a library function tok822_externalize() for doing the above
> > conversion. There are not that many places where =<%s> is called
> > with an address, so this is just some work. This avoids the need
> > to propagate both address versions through all of Postfix.
>
> That does seem like a sensible way forward. However, after reading your
> last message, I was under the impression, that you were opposed to
> logging something other than the internal form, because it makes table
> lookups harder to debug. Can you clarify your stance on this?
Many table lookups have been converted to using external form, so
external-form logging would be a better match for troubleshooting.
Exanmples are access, canonical, virtual, and transport lookups.
Instead of tok822_externalize(), quote_822_local() would be more
suitable for the conversion; this function is already used for
generating the access, etc. external-form queries.
Wietse