#72 Problem with subject folding in 1.4.0rc1.


Found by Masato Higashiyama
Reported by Scott A. Hughes

There is a problem with subject folding that affects
Japanese in 1.4.0rc1. This problem is likely to affect
some other languages also.

The following is an illustration of the problem.

With a subject of:


The subject is sent as below:

Subject: test=?ISO-2022-JP?B?GyRCJEYkOSRIGyhC?=test=

The encoded character string is folded mid-way, hence
preventing successful decoding.

In order for correct decoding, the subject must be as

Subject: test=?ISO-2022-JP?B?GyRCJEYkOSRIGyhC?=test

-- End --


  • Thijs Kinkhorst

    Thijs Kinkhorst - 2003-01-06
    • labels: 102906 -->
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2003-01-06
    • assigned_to: nobody --> kink
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2003-01-07
    • assigned_to: kink --> nobody
  • Marc Groot Koerkamp

    Logged In: YES

    When does this problem occur?

    Is it with sending messages or when you read a message?

  • Scott A. Hughes

    Scott A. Hughes - 2003-01-08

    Logged In: YES

    The problem occurs when sending messages.

  • Marc Groot Koerkamp

    Logged In: YES

    Folding is happening correct, when a mailclient wants to
    decode the subject it has de unfold the header before it starts
    decoding and that's probably the problem. I can manipulate
    the folding routine in the deliver class but I have to be sure
    that other mailclients can't decode the subject due to the
    folding method we use or that SquirrelMail is the only client
    that decodes the subject incorrect (which means not unfold
    Can you confirm that other mailclients then SquirrelMail
    cannot decode the subject due to the way we fold it?

  • Marc Groot Koerkamp

    • priority: 5 --> 7
    • assigned_to: nobody --> stekkel
  • Marc Groot Koerkamp

    Logged In: YES

    Excuse me, folding is happening incorrect, according
    2. Syntax of encoded-words

    An 'encoded-word' is defined by the following ABNF
    grammar. The notation of RFC 822 is used, with the
    exception that white space characters MUST NOT appear
    between components of an 'encoded-word'.

    encoded-word = "=?" charset "?" encoding "?" encoded-
    text "?="

    Probably I have to add a regular expression that looks for
    =? ... ?= sequences and prohibit that we fold inside such

  • Scott A. Hughes

    Scott A. Hughes - 2003-01-20

    Logged In: YES

    Masato recently sent a group of patches to Philippe, and
    this issue is dealt with there. Thank you for following this
    up and hopefully the patches sent will help identify this issue.

  • Marc Groot Koerkamp

    • status: open --> closed
  • Marc Groot Koerkamp

    • status: closed --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks