Viktor Dukhovni:
> Are we sure that presently, even without sanitisation there are no
> valid cases in which the output of "postqueue -j" would contain
> strings with non-printable content?

Definitely no newlines. Because those change the structure of text.

> Can Postfix accept (without mangling) (with <ESC> representing
> the underlying character) any of:
> 
>     Server:
>         MAIL FROM:<"foo+\<ESC>bar"@example.com>
>         RCPT TO:<"foo+\<ESC>bar"@example.com>

Accepted, and preserved in SMTP/LMTP or mailbox delivery, but it
won't reach postqueue.

There is a mandatory printable() filter in the bounce daemon after
it reads a request, before it writes the bounce/defer/etc log (look
for the VS_NEUTER macro). ESC does not count as a printable character.

So that makes this discussion moot as far as postqueue is concerned.

All *legitimate* content in a bounce/defer/etc log has gone through
printable(). There really is no reason to disable the printable()
call on the postqueue side, because it is supposed to be a noop;
in the cases where it is not a noop, the queue file contains content
that should not have been there.

>     Client:
>         450 4.0.0 You won't <ESC> our filters

Filtered out as Postfix reads remote SMTP server responses. There
is also a mandatory filter for Postfix responses to a remote SMTP
client, when writing to the mail log, when reading pipe-to-command
responses.

        Wietse

Reply via email to