mthread - arrange messages into discussions

MTHREAD(1) General Commands Manual MTHREAD(1)


mthread — arrange messages into discussions


mthread [−vpr] [−S msg] [msgs ...]


mthread groups messages together in parent/child relationships, based on which messages are replies to which others. (

See mmsg(7) for the message argument syntax. )

If no messages are specified, mthread will read filenames from the standard input, or use the default sequence if used interactively.

mthread prints the threaded messages separated by newlines and indented according to their depth in the message tree. Unresolved Message-IDs are printed as-is.

The options are as follows:


Do not prune unresolved Message-IDs at the top-level.


With −S, only add parents, not unrelated subthreads.


Sort the top-level threads in reverse order (newest threads first).

−S msg

Treat msg as optional message(s) that will be added to threads only if they are referenced. Threads where all messages are optional are suppressed. You can use −S to add an outbox folder, for example, completing threads where your replies were missing.


The mthread utility exits 0 on success, and >0 if an error occurs.



Message threading:


Leah Neukirchen <[email protected]>


mthread is in the public domain.

To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work. GNU May 4, 2020 MTHREAD(1)

Updated 2024-01-29 - |