Last Comment Bug 474790 - mails with References: to itself break threading in thunderbird mailnews DB view backend
: mails with References: to itself break threading in thunderbird mailnews DB v...
Status: RESOLVED FIXED
: fixed-seamonkey2.0.1
Product: MailNews Core
Classification: Components
Component: Database (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 3.0rc1
Assigned To: Alexander Sack
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-22 07:39 PST by Alexander Sack
Modified: 2010-09-17 17:37 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
ignore self-References (816 bytes, patch)
2009-01-22 07:42 PST, Alexander Sack
mozilla: review+
Details | Diff | Splinter Review

Description Alexander Sack 2009-01-22 07:39:46 PST
From ubuntu bug (https://launchpad.net/bugs/320034):

Thunderbird threading doesn't work well for Launchpad bugmail. All the bugmail for one bug is in a thread, except the initial mail, which is sepparated.

Looks like the issue may be the initial mail having a References header referencing itself, e.g.:

Date: Wed, 21 Jan 2009 23:35:44 -0000
From: muadnem <hidden>
To: pochu@ubuntu.com
Reply-To: Bug 319820 <319820@bugs.launchpad.net>
Sender: bounces@canonical.com
[...]
References: <20090121233545.17100.64097.malonedeb@gandwana.canonical.com>
Message-Id: <20090121233545.17100.64097.malonedeb@gandwana.canonical.com>
Subject: [Bug 319820] [NEW] ubuntu 8.10 - gstreamer - totem - internal data
 stream error
Comment 1 Alexander Sack 2009-01-22 07:42:17 PST
Created attachment 358181 [details] [diff] [review]
ignore self-References

fix by ignoring references identical to current message-id.

The other place to fix this would probably in the threading algorithm itself. I can take a look at that if we don't want to ignore self-references in msg headers completely
Comment 2 Reed Loden [:reed] (use needinfo?) 2009-01-22 12:17:20 PST
(In reply to comment #0)
> Thunderbird threading doesn't work well for Launchpad bugmail. All the bugmail
> for one bug is in a thread, except the initial mail, which is sepparated.
> 
> Looks like the issue may be the initial mail having a References header
> referencing itself, e.g.:

RFC 822 states "4.6.3. REFERENCES
The contents of this field identify other correspondence which this message references. Note that if message identifiers are used, they must use the msg-id specification format." (http://www.w3.org/Protocols/rfc822/#z33).

Personally, seems like Launchpad is doing something wrong here by referencing itself in the first mail. Can't this be fixed at the Launchpad level? If Launchpad was open source, I'd even submit a patch.
Comment 3 Alexander Sack 2009-01-24 05:51:09 PST
(In reply to comment #2)
> (In reply to comment #0)
> > Thunderbird threading doesn't work well for Launchpad bugmail. All the bugmail
> > for one bug is in a thread, except the initial mail, which is sepparated.
> > 
> > Looks like the issue may be the initial mail having a References header
> > referencing itself, e.g.:
> 
> RFC 822 states "4.6.3. REFERENCES
> The contents of this field identify other correspondence which this message
> references. Note that if message identifiers are used, they must use the msg-id
> specification format." (http://www.w3.org/Protocols/rfc822/#z33).
> 
> Personally, seems like Launchpad is doing something wrong here by referencing
> itself in the first mail. Can't this be fixed at the Launchpad level? If
> Launchpad was open source, I'd even submit a patch.

... LP will be opened on 21st Jul 09!

Anyway, even though we can fix this on launchpad side too (and yes, we should) all other mailers i have tested get this threading right; just tbird is confused by a References: to itself.
Comment 4 Dan Mosedale (:dmose) 2009-10-12 18:29:59 PDT
Comment on attachment 358181 [details] [diff] [review]
ignore self-References

bienvenu is a better reviewer than me for this, sorry for not shifting it over earlier.
Comment 5 David :Bienvenu 2009-10-13 07:22:59 PDT
Is this still broken in TB 3.0 b4?
Comment 6 David :Bienvenu 2009-10-15 11:07:08 PDT
Comment on attachment 358181 [details] [diff] [review]
ignore self-References

Thx for the patch - I like it and I'm going to clean it up a little and land it.
Comment 7 Alexander Sack 2009-10-16 08:08:22 PDT
thx. in case you give credits in commit use asac@ubuntu.com ;) ...
Comment 8 David :Bienvenu 2009-10-19 12:40:26 PDT
thx for the fix, Alexander, credit noted and change pushed.
Comment 9 Reed Loden [:reed] (use needinfo?) 2009-10-19 12:46:52 PDT
(In reply to comment #8)
> thx for the fix, Alexander, credit noted and change pushed.

http://hg.mozilla.org/comm-central/rev/70552ed90c20

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