Return receipt broken when replying to long subject message



7 years ago
3 years ago


(Reporter: paul.bijnens, Unassigned)


13 Branch

Firefox Tracking Flags

(Not tracked)



(2 attachments)



7 years ago
User Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.5) Gecko/20120606 Firefox/10.0.5
Build ID: 20120606080634

Steps to reproduce:

When receiving a message asking for a Return Receipt, and the Subject header  of that message is long, and split over two lines, and the first subject line is 73 chars or longer, the RR-message is constructed but a newline gets inserted before the second line of the subject.

This results in the MIME formatting to be completely destroyed, and the mime-strings become visible in the client. For most people that is an unreadable pile of codes.

Actual results:

 Here are the headers of the incoming message:

==== snip start ====
Received: by (Postfix, from userid 0)
	id 6DCF720843; Fri, 13 Jul 2012 13:40:34 +0200 (CEST)
From: <>
To: <>
Subject: 9charword 9charword 9charword 9charword 9charword 9charword 9charword 5xxXx
 And the subject continuation line
Disposition-Notification-To: <>
Date: Fri, 13 Jul 2012 08:15:12 +0000
Content-Type: multipart/related;
MIME-Version: 1.0
Message-Id: <>

==== snip end ====

Note the subject line, which is 76 chars + some more in a continuation line.

The Return Receipt that gets sent, has a newline added just before the continuation line of the Subject header.
The receiving mail system then makes it a more or less valid mail message and this is what ends up the mailbox:

==== snip start ====
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by (Postfix) with ESMTP id AB8E92083E
	for <>; Fri, 13 Jul 2012 15:39:15 +0200 (CEST)
Date: Fri, 13 Jul 2012 15:39:15 +0200
From: Paul Bijnens <>
Message-ID: <>
Subject: Return Receipt (displayed) - 9charword 9charword 9charword 9charword 9charword 9charword 9charword 5xxXxx
To: undisclosed-recipients:;
X-Spam-Status: No

 And the subject continuation line
To: <>
References: <>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=disposition-notification;

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

This is a Return Receipt for the mail that you sent to

Note: This Return Receipt only acknowledges that the message was displayed on the recipient's computer. There is no guarantee that the recipient has read or understood the message contents.

==== snip end (rest of message is normal)  ===

Note the artificial "To: undisclosed recipients" header, which actually gets inserted by the receiving postfix, and the extra header " X-Spam-Status: No", which is the last header.
The added newline flags the start of body, and subject continuation lines, and the rest of the real headers now get formatted as body message.

When the first line of the subject is a litle bit shorter (e.g. 72 chars) , then the newline does not get inserted, and all is OK.

Verified in version 10.0.5 (as distributed by CentOS 5), and in 13.0.1 (on MS Windows).

See also: bug 586981 and bug 136805.
It seems to me like the real cause of those two bugs is still not resolved.
Those bugs seems to believe it has to do with mime-words encoding of subjects. And indeed, when Outlook sends a long subject it breaks the lines in 76 byte characters, and such long subject lines frequently happen when encoding accents in the subject.

Comment 1

7 years ago
Additional info:  When replying to such a message, the Subject header is correctly handled.  Only when sending the "Return Receipt", the subject header gets split.
Can we have a complete testcase ?

Comment 3

6 years ago
Created attachment 695623 [details]
Message which provokes a broken receipt notification

Comment 4

6 years ago
Created attachment 695624 [details]
The broken reply

Comment 5

6 years ago
It was indeed not obvious to create a minimal message that provokes the broken receipt notification.  I took the original message, and erased as much I as I could.  I'm not sure about the image, which I truncated to 0 bytes, if that would have an influence when deleted entirely.

Comment 6

6 years ago
The broken receipt in attachment 69624 [details] was generated with Thunderbird 17.0 on Ubuntu 12.04.
I could reproduce it also on Thunderbird 10 on CentOS5.
The original bug happened on Thunderbird on Windows 7 (not exact sure about the version: the current version in July 2012).
Just in case it matters: the mail server is CentOS 6 with postfix-2.6.6-2.2.el6_1.x86_64 and dovecot-2.0.9-2.el6_1.1.x86_64
You need to log in before you can comment on or make changes to this bug.