On Wed, Jun 12, 2002 at 11:44:50AM +0200, Rocco Rutte <[EMAIL PROTECTED]> wrote: > > In-Reply-To claims X but References claims Y. who do I > > believe? > > I would guess that In-Reply-To will win if present. It's > useless to try repairing broken threading by wild guesses. > > And the difference between In-Reply-To and References is > also trivial for the case that you reply to multiple > messages at once: it can't be handled within References > (since this is a kind of a linear chain) but only with > In-Reply-To because multiple parents may be specified.
I wrote the vast majority of the current threading code, so I can usefully comment. First of all, as you all discovered, mutt 1.4 deals fine with 1.2.5's default in-reply-to format. But if it's been munged by intermediate server software, all bets are off. Currently, mutt uses the following heuristic: if there is just an in-reply-to header, mutt uses all the message-ids that it can find there, until it finds a message that's actually in the mailbox. If there's just a references header, it does the same. If there are both, it uses the first message-id in the in-reply-to. Then it checks the first message-id in references to see if it's the same. If it's not the same, it uses it, if it is the same, it skips it, and then it keeps following the message-ids in references until it finds an existing message or runs out of message-ids. It turns out that some broken versions of Eudora for Windows (and maybe other mailers too) put the first reference in in-reply-to and then put the rest in references, so we lose if we skip in-reply-to altogether whenever references is there. This code works surprisingly well. I expected to have to tweak it more, but really there have been almost no complaints. Obviously, for some broken input it will thread things wrong, and in some cases it will thread things more dramatically wrong than the old code if a lot of messages refer to the same thing that looks like a message-id but isn't (such as an email address in in-reply-to.) But unlike the old code, it will always successfully produce a thread tree of some sort, instead of crashing or going into an infinite loop, so that's a win. Now that you know you have software that's feeding you broken in-reply-to headers, a procmail recipe to strip out those headers when they're broken (or change them to x-in-reply-to, or whatever) so mutt will just go by the references, is probably a good idea. -Daniel -- Daniel E. Eisenbud [EMAIL PROTECTED] "We should go forth on the shortest walk perchance, in the spirit of undying adventure, never to return,--prepared to send back our embalmed hearts only as relics to our desolate kingdoms." --Henry David Thoreau, "Walking"