There appear to be a few MTAs (GroupWise?) that use dashes in Message-Id's, and this bug appears to still be present in 2.1.9-9. The attached patch for pipermail.py works for me -- patching then rebuilding the archive fixes threading. The patch assumes that Message-Ids are RFC-822 compliant in that each Message-Id has exactly one "@" sign in it -- this seems like a better assumption than assuming that "-" characters aren't used. Mangling the message ids themselves doesn't seem like a good idea, as that may break uniqueness.
Maciej Babinski
--- pipermail.py.old 2007-12-11 12:16:30.000000000 -0600 +++ pipermail.py 2007-12-11 12:00:02.000000000 -0600 @@ -491,7 +491,7 @@ if article is not None: artkey = article.threadKey if artkey is not None: - self.write_threadindex_entry(article, artkey.count('-') - 1) + self.write_threadindex_entry(article, artkey.count('@') - 1) if self.database.changed.has_key((archive,article.msgid)): a1 = L[1] a3 = L[3]