Last Comment Bug 351783 - Thunderbird crash on sending a return receipt [@ nsMsgMdnGenerator::CreateSecondPart]
: Thunderbird crash on sending a return receipt [@ nsMsgMdnGenerator::CreateSec...
: crash, fixed1.8.1.8
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: 1.8 Branch
: All All
: -- critical (vote)
: ---
Assigned To: David :Bienvenu
: 384293 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2006-09-08 01:43 PDT by Piviul
Modified: 2011-06-09 14:58 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

proposed fix (1.44 KB, patch)
2007-07-19 08:34 PDT, David :Bienvenu
mscott: superreview+
dveditz: approval1.8.1.8+
Details | Diff | Splinter Review

Description Piviul 2006-09-08 01:43:50 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv: Gecko/20060426 Firefox/
Build Identifier: Mozilla Thunderbird 1.5.05 (20060719)

When I receive a message from a specific user that use lotus notes with an automatic return receipt, when I send the return receipt TB crashes.

Reproducible: Always

Steps to Reproduce:
This is one of the messages I received that crashes TB.

From - Thu Sep 07 15:07:11 2006
X-Account-Key: account2
X-UIDL: 1157634406.32443_2.servercsa
X-Mozilla-Status: 0000
X-Mozilla-Status2: 00000000
Return-Path: <>
Received: (qmail 32439 invoked by alias); 7 Sep 2006 13:06:46 -0000
Received: (qmail 32436 invoked by uid 453); 7 Sep 2006 13:06:46 -0000
X-Spam-Status: No, hits=4.9 required=5.0
Received: from (HELO (
    by (qpsmtpd/0.31.1) with ESMTP; Thu, 07 Sep 2006 15:06:45 +0200
Importance: Normal
X-Priority: 3 (Normal)
Subject: vuoto
Date: 07-Sep-2006 15:06:39 CEDT
X-MIMETrack: Serialize by Router on DOMRELAY02/SVR/META/IT(Release 6.5.5|November 30, 2005) at
 07/09/2006 15:04:26
MIME-Version: 1.0
Content-type: text/plain; charset=US-ASCII

Comment 1 Adam Guthrie 2006-09-08 08:03:35 PDT
Please get a Talkback ID for the crash.
Comment 2 Piviul 2006-10-06 05:58:19 PDT
I've tried more an more times to send a talkback id but I receive ever the same error:  "The Agent is unable to connect to the server. Please check your Proxy Server settings or try again later." 
There is another way to send a talkback Id to the developers?

Comment 3 Steven Crombie 2007-07-11 06:58:26 PDT
I have also been experiencing Thunderbird 2.0 crashes upon clicking 'OK' to send a return receipt.  I have seen it happen consistently on a Win 98, Win XP SP2, and Vista Business machine.  I have only seen it happen in response to a request from an Outlook 2003 client.  I have tested returning receipt requests from Outlook 2000, Outlook 2007, and a webmail client without problem.  All these Outlook clients are configured with an IMAP connection using Outlook Connector (for mdaemon mail server).

This same problem is described in Bug 384293 with some different details.

The following is a message that resulted in a crash when sending the read receipt:

Return-path: <>
Authentication-Results:; auth=pass
Received: from by
	(MDaemon PRO v9.5.6)
	with ESMTP id md50003843429.msg
	for <>; Tue, 10 Jul 2007 15:03:55 -0400
Date: Tue, 10 Jul 2007 15:03:00 -0400
From: Eric Davis <>
Subject: Crash email
To: "'Steven Crombie \\(E-mail\\)'" <>
X-Priority: 3
Organization: Farmers Furniture
X-Mailer: Outlook Connector for MDaemon 2.1.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Spam-Processed:, Tue, 10 Jul 2007 15:03:55 -0400
	(not processed: sender in recipient's private address book)
X-MDAV-Processed:, Tue, 10 Jul 2007 15:03:56 -0400

Testing thunderbird

Comment 4 Steven Crombie 2007-07-11 10:39:11 PDT
I have now received an email requesting a read receipt from an Outlook 2003 client using a POP3 connection.  The read receipt was returned without any errors or crashing.

My problem seems to exist only when the sender is using Outlook 2003 with an IMAP connection using Outlook Connector for Mdaemon.
Comment 5 Adam Guthrie 2007-07-12 15:14:16 PDT
*** Bug 384293 has been marked as a duplicate of this bug. ***
Comment 6 Adam Guthrie 2007-07-12 15:15:36 PDT
Steven, or anyone who's experiencing this, can you get a Talkback ID for the crash?
Comment 7 Steven Crombie 2007-07-13 08:20:56 PDT
Talkback ID is TB34002646X.
Comment 8 David :Bienvenu 2007-07-13 08:38:18 PDT
Ah, thx for the stack. My guess is that Outlook is not generating a message id in this scenario. Can you check the mdn request message and see if Outlook put a Message-Id: header in it?

nsMsgMdnGenerator::CreateSecondPart  [mozilla/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp, line 742]
nsMsgMdnGenerator::CreateMdnMsg  [mozilla/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp, line 432]
nsMsgMdnGenerator::InitAndProcess  [mozilla/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp, line 974]
nsMsgMdnGenerator::Process  [mozilla/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp, line 1000]
XPTC_InvokeByIndex  [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102]
XPCWrappedNative::CallMethod  [mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2169]
XPC_WN_CallMethod  [mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1455]
js_Invoke  [mozilla/js/src/jsinterp.c, line 1375]
js_Interpret  [mozilla/js/src/jsinterp.c, line 3944]
js_Invoke  [mozilla/js/src/jsinterp.c, line 1394]
nsXPCWrappedJSClass::CallMethod  [mozilla/js/src/xpconnect/src/xpcwrappedjsclass.cpp, line 1415]
nsXPCWrappedJS::CallMethod  [mozilla/js/src/xpconnect/src/xpcwrappedjs.cpp, line 468]
SharedStub  [mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp, line 147]
nsMimeHtmlDisplayEmitter::EndBody  [mozilla/mailnews/mime/emitters/src/nsMimeHtmlEmitter.cpp, line 586]
mimeEmitterEndBody  [mozilla/mailnews/mime/src/mimemoz2.cpp, line 1907]
mime_display_stream_complete  [mozilla/mailnews/mime/src/mimemoz2.cpp, line 963]
nsStreamConverter::OnStopRequest  [mozilla/mailnews/mime/src/nsStreamConverter.cpp, line 1022]
nsDocumentOpenInfo::OnStopRequest  [mozilla/uriloader/base/nsURILoader.cpp, line 390]
nsStreamListenerTee::OnStopRequest  [mozilla/netwerk/base/src/nsStreamListenerTee.cpp, line 65]
nsStreamListenerEvent0::HandlePLEvent  [mozilla/netwerk/base/src/nsAsyncStreamListener.cpp, line 122]
Comment 9 Steven Crombie 2007-07-13 10:53:24 PDT
It appears you are correct that there is no Message-ID field.  I checked a message from Outlook 2007 client also on IMAP via Outlook Connector and the Message-ID field is present.  I have successfully returned read receipts to that client.  

Here is the message source for the problem email minus the winmail.dat attachment.

Return-path: <>
Authentication-Results:; auth=pass
Received: from [] by
	(MDaemon PRO v9.5.6)
	with ESMTP id md50003860137.msg
	for <>; Fri, 13 Jul 2007 11:06:43 -0400
Date: Fri, 13 Jul 2007 11:09:00 -0400
From: Cecilia Carter <>
Subject: Test
    "Steven Crombie (" <>
X-Priority: 3
Organization: Farmers Furniture
X-MS-TNEF-Correlator: ERTF-0wn7df9Q-VxuJQl9vKFxJLqgFgE87jgnuZ1kSLG
X-Mailer: Outlook Connector for MDaemon 2.1.3
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=9154109-18467-1184339392-3544
X-Spam-Processed:, Fri, 13 Jul 2007 11:06:43 -0400
	(not processed: message from valid local sender)
X-MDAV-Processed:, Fri, 13 Jul 2007 11:06:43 -0400

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

This message has a read receipt.

Comment 10 David :Bienvenu 2007-07-13 11:50:32 PDT
Yeah, Outlook is evil that way, and doesn't generated message-id's in some situations. I'll try to come up with a fix; thx for the diagnosis. It might be helpful at some point for me to be able to receive an mdn request message like this, once I have a fix to test.
Comment 11 Steven Crombie 2007-07-13 12:01:15 PDT
I would be glad to have some messages sent for testing.  Thanks for your help.
Comment 12 David :Bienvenu 2007-07-18 10:44:33 PDT
So handling missing message-id's was fixed back in 2004 (the year, not the TB version), so yes, an mdn request like this would be very helpful, if you could send them to Thx!
Comment 13 David :Bienvenu 2007-07-18 10:45:34 PDT
see bug 224738
Comment 14 David :Bienvenu 2007-07-19 08:34:16 PDT
Created attachment 272978 [details] [diff] [review]
proposed fix

Check if the message-id is empty - this code is in two places, which is what was confusing me earlier.

I don't think this bug happens on the trunk since we're not using XPIDLCString anymore, but I'll try to verify.
Comment 15 David :Bienvenu 2007-07-19 09:08:23 PDT
yes, the trunk is not affected by this problem, anymore.
Comment 16 Adam Guthrie 2007-07-19 09:53:58 PDT
Comment on attachment 272978 [details] [diff] [review]
proposed fix

Nit: Indentation.
Comment 17 David :Bienvenu 2007-07-19 12:05:21 PDT
it's a -uw patch - I believe the indentation in my tree is fine.
Comment 18 Steven Crombie 2007-07-31 11:11:16 PDT
What's the latest status on this bug?  Will the proposed patch be included in an update soon?
Comment 19 David :Bienvenu 2007-07-31 11:14:29 PDT
I've requested approval for the next security and stability release, but have not received it yet. We've been doing some 2.0.0.x security drills, which haven't allowed time to get the stability fixes in.
Comment 20 Daniel Veditz [:dveditz] 2007-08-29 15:24:32 PDT
Comment on attachment 272978 [details] [diff] [review]
proposed fix

approved for, a=dveditz for release-drivers
Comment 21 David :Bienvenu 2007-08-29 15:54:51 PDT
fixed for
Comment 22 David :Bienvenu 2007-08-29 15:55:18 PDT
marking fixed, since this isn't an issue on the trunk, and it's fixed on the branch.
Comment 23 Marcia Knous [:marcia - use ni] 2007-10-19 11:54:32 PDT
Reporter: Can you download the latest nightly or the candidate build when it is available and help us verify that this is fixed? You can find the builds here:
Comment 24 2007-11-13 23:44:34 PST
Sorry .. not sure if this is the right place.  Running vanilla TB version as per the automatic update.

Using an (oracle) IMAP server.  When trying to OK a return receipt, TB just hangs
and has to be killed and restarted.  Tried re-installing  I changed themes a couple of time and it "seemed" to work..

Updated to via the automatic update and again starting hanging again.
Fiddled around with themes again with no result ... I am not sure if that is relevant.

It seems that from this thread this was flagged as a bug and an update to
may fix the problem. Assuming this is the same problem.

If an upgrade to fixes this problem, can I please get an unambiguous link, as I struggle with one above.


Note You need to log in before you can comment on or make changes to this bug.