On Mon, Sep 28, 2009 at 01:18:36PM -0400, Brian Evans - Postfix List wrote:

> > But why do you think a QP line feed will never occur in a legit mail? 
> > (complex expression not reviewed)

The *correct* way to QP encode multi-line subjects, is to encode each
line separately, in fact QP encoding of even single lines may need to
use multiple QP-encoded blobs, as each line of a header that contains
encoded words is limited (RFC 2047 section 2) to 76 characters:

        Subject: =?us-ascii?Q?....?=
             =?us-ascii?Q?....?=
             =?us-ascii?Q?....?=
             =?us-ascii?Q?....?=
             =?us-ascii?Q?....?=

Just because this is the correct way, does not mean that bozo developers
who skim an API doc or cargo-cult copy example code, and don't read the
RFC or other semantic references, will get this right.

So indeed there is likely to be some small fraction of legitimate content
that QP-encodes line-breaks in message subjects. In fact, this is not
actually illegal, just contrary to the spirity of RFC 822. Subject:
and similar headers are not designed for communicating multi-line text
with the line breaks preserved, rather folded headers carry one logical line
of content.

So developers packing multiple lines into subjects are violating the purpose,
but not the syntax (given RFC 2047) of the Subject header.

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majord...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to