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
A globally unique identifier assigned to each email message, specified in the Message-ID header. It is used to track messages, build conversation threads, and detect duplicates when merging archives.
Email headers (In-Reply-To and References) that link a reply to the message it responds to, enabling mail clients and archive tools to group related messages into conversation threads.
Gmail's tagging system that assigns one or more labels to each message, serving the role that folders play in traditional email clients. A single message can carry multiple labels simultaneously.