Skip to content
Mbox Viewer

Threading (JWZ)

The process of grouping related email messages into conversations by following In-Reply-To and References header links, typically using the JWZ algorithm that supports up to four levels of nesting.

Email threading reconstructs the conversation structure of a mailbox from the message graph encoded in headers. The JWZ algorithm, published by Jamie Zawinski in 1997 and widely adopted in mail clients, works in two phases: first, it builds a tree of messages by following Message-ID, In-Reply-To, and References links; second, it prunes and sorts the tree to produce a clean, readable thread view.

When explicit header links are missing — common in older messages or after forwarding — threading algorithms fall back to subject matching: messages with the same subject (after stripping Re:, Fwd:, and similar prefixes) are grouped together. This heuristic produces reasonable results for most conversations but can occasionally merge unrelated messages that happen to share a subject.

Thread views dramatically improve navigation in large archives. Instead of scanning thousands of individual messages in date order, you can find a thread, collapse it, and move on. Mbox Viewer applies threading when displaying MBOX archives, grouping messages into conversations and indicating nesting depth up to four levels in the message list.

Related terms

Read your MBOX files on your Mac