Re: [Exim] mime (rfc-2047) decode patch

Top Page
Delete this message
Reply to this message
Author: Norihisa Washitake
Date:  
To: Michael Haardt
CC: exim-users
Subject: Re: [Exim] mime (rfc-2047) decode patch
Hi,

On 2003/05/15 1:28:58, Michael Haardt wrote:
> > 1.  MIME encoded headers are NOT always shorter than 76 characters
> >     long, though it's a violation of RFC.  Many ISO-2022-* mailers
> >     do this indeed.  (eg. line 741, 747 in function expand_header.)

>
> The header may well be longer than 76 characters indeed, but a single
> MIME word must not. If it is, it is not a MIME word, and must be treated
> literally. A long header must consist of multiple concatenated MIME
> words, which is why white space between MIME words is removed during
> the decoding process.


Unfortunately that's not true. Sometimes a single mime word is longer
than 76 chars. I remember Outlook Express does (but have no idea if the
latest version does or not).


> The rationale for that is to limit the look-ahead in the decoding
> process and it makes the code easier to implement it that way it is
> defined.


As OE is a major MUA, I don't want to add some limitation or restriction
around this. I think the best way is to prepare the buffer (data[]) to
be the same length as the encoded string (+1).


> Standard Sieve will never match headers with
> NUL characters, but your suggestion would break it.


Aha, I got it.


Anyway, your sieve patch does what I want, so I doubt my patch is
necessary now.

--
Norihisa Washitake
Dept of Earth Sciences, Sci, The Univ of Tokyo
nori@???, http://washitake.com/
PGP-FP = 9D7D F70C F7BE 8BCA AD77 732A C1EF 8544