report a bug |  advanced search |  statistics |  developer log in/out
Bug #56 Folding Header Issues in Moderation Announcement Subject
Submitted: 2014-03-07 06:30 UTC Modified: 2014-05-07 23:44 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: debian at timoboettcher dot name Assigned: maintainer at mlmmj dot org
Status: Closed
Mlmmj Version: 1.2.18.0 OS: Debian GNU/Linux
MTA: Exim MTA Version: 4.72
 [2014-03-07 06:30 UTC] debian at timoboettcher dot name
Description:
------------
Sending an e-mail to a moderated mailinglist results in e-mails being sent to the moderators of this mailinglist asking for moderation of the mail.

In the e-mail sent to the moderators (moderate-post template), the subject of the original mail is inserted in different places. These seem suffer from a misinterpretation of spaces used to mark folded headers (see section 2.2.3. of rfc2822). Both the attached e-mail and, if the e-mail is accepted through moderation, the e-mail on the mailinglist do not show this problem.

Test script:
---------------
Subject: Umlauttest =?utf-8?B?w4TDlsOcw6TDtsO8?=
 =?utf-8?B?w58=?= Umlauttestende

The leading space on the second line is necessary to mark this as an continuation header.

You can use swaks to send a mail that triggers the problem using this commandline (you need to customize it for your mail-setup, of course):

swaks --to moderatedmailinglist@example.com --data "To: moderatedmailinglist@example.com\nFrom: sender@example.com\nSubject: Umlauttest =?utf-8?B?w4TDlsOcw6TDtsO8?=\n =?utf-8?B?w58=?= Umlauttestende\n\nThis is a test mailing"

Expected result:
----------------
The Subject in the moderationshould be "Umlauttest ÄÖÜäöüß Umlauttestende" without the additional space between the u-umlaut and the sz. This seems to be inserted from the space at the beginning of the continuation header. This space is part of the folded header, not of its contents, though.

Actual result:
--------------
From: moderatedmailinglist+owner@example.com
Subject:=?utf-8?q?_Please_moderate_moderatedmailinglist=40example.com:_Umlauttest_=C3=84=C3=96=C3=9C=C3=A4=C3=B6=C3=BC_=C3=9F_Umlauttestende?=
To: moderatedmailinglist-moderators@example.com
X-Original-Subject: Umlauttest ÄÖÜäöü ß Umlauttestende
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=_2764d1dc172662bf61eccfab3e731015_="
Content-Transfer-Encoding: 8bit

--=_2764d1dc172662bf61eccfab3e731015_=
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Hi, this is the Mlmmj program managing the 
<moderatedmailinglist@example.com> mailing list.

A message from <debian@timoboettcher.name> with subject "Umlauttest ÄÖÜäöü ß
Umlauttestende" has been submitted for posting. You are being asked to
moderate because the requester is not a subscriber. The message is below.

[snip]