Page 1 of 1

(alias: message x of y) added to wrong place

PostPosted: Sat Mar 12, 2005 9:48 am
by Annya
I discovered a little bug in your program. The
(alias: message x of y)
string that is added to the Subject: line of the
forwarded messages should be put on a line of its
own and not appended at the end of the Subject: line,
as that header could be occupying more than one lines.


Example:

A message containing the following headers:

From: .....
Subject: This is a msg with a ridiculously long subject header.
This is a msg with a ridiculously long subject header.
This is a msg with a ridiculously long subject header.
Date: .....

becomes:

From: .....
Subject: This is a msg with a ridiculously long subject header. (testalias: message 1 of 4)
This is a msg with a ridiculously long subject header.
This is a msg with a ridiculously long subject header.
Date: .....

which is obviously incorrect. It's easier to add the (alias: message x of y)
part on a line of its own, after all other Subject: lines, like this:

From: .....
Subject: This is a msg with a ridiculously long subject header.
This is a msg with a ridiculously long subject header.
This is a msg with a ridiculously long subject header.
(testalias: message 1 of 4)
Date: .....




Thanks for providing such a great service.

PostPosted: Sat Mar 12, 2005 6:12 pm
by SysKoll
That's right, we are not handling the continuation lines correctly in all cases. I think it's a problem in the library we're using.

Thanks for the heads-up.

PostPosted: Sat Mar 12, 2005 10:35 pm
by josh
Is it really OK to have newlines in the subject?

PostPosted: Sat Mar 12, 2005 11:05 pm
by SysKoll
Lines in the SMTP header can be broken. The continuation characters are blanks at the beginning of the line. Any header line beginning with blanks is a continuation of the current header field.