Threads based on a custom header

Dan Ritter dsr-mutt at randomstring.org
Wed Jan 10 12:45:39 UTC 2024


dm1581 at gmail.com wrote: 
> Hi all,
> 
> Is it possible to display messages (preferably automatically, as soon
> as the messages get in the mailbox) as one thread based on a value of
> a custom header? That is, all the messages that have the X header with
> the same value.


If you have threading on, when you l_imit your view to messages
with that have that ~h eader, you will see them threaded
according to the normal algorithm, which is probably what you
want.

i.e. if your custom header is X-Foo:, you can use:

l~hX-Foo

and only see X-Foo mail. If you only want to see X-Foo: barbaz, then

l~hX-Foo: barbaz

is your friend.

Introducing new parameters into the threading algorithm is
likely to be... tricky.

If this were a major part of my workload, I would probably use
a sieve or other mailfilter to append the value of X-Foo to
Subject, then drop all the X-Foo messages into their own folder,
and possibly write an outbound filter (replacing sendmail) to
remove the value of X-Foo from the end of Subject.

-dsr-


More information about the Mutt-users mailing list