I'm now using mutt, at least some of the time, for my work email.  This
involves accessing an Exchange server via IMAP.  I'm the exception; most
people are using Outlook.

What I'm finding is that although all messages are threaded fine in
mutt, the replies that I send are not threaded in other people's Outlook
clients.  I'd like to play nicer with my fellow employees, and avoid
causing any them frustration (which has already been expressed).

I've determined that Outlook disregards References and In-Reply-To
headers, and instead relies on Thread-Topic and Thread-Index headers.
Mutt doesn't preserve either of these headers.

For Thread-Topic, that's not typically an issue, as Exchange will set
these headers automatically.  As long as the subject hasn't changed,
beyond adding something like "Re:", that seems to work out fine.

The sticking point is Thread-Index.  From my research, I've identified
that this is a Base64-encoded set of unique bytes, though no one seems
to know if those bytes have special meaning.  For new messages, that
doesn't matter, because Exchange will add this field automatically when
it doesn't exist.  The more important detail to preserve threading is
setting Thread-Index on a reply.

Replies should add 5 unique additional bytes to Thread-Index.  I've
found that just adding 5 random bytes suffices to preserve threading in
Outlook (i.e., the bytes chosen don't need to follow any particular
algorithm).  Therefore, on a reply to a message a message with
a Thread-Index header, the header should be Base64-decoded, have
five random (or otherwise unique) bytes added, and be Base64-encoded and included in the reply.

I can pull this off with some muttrc-hackery, though it's not exacly
clean.  I'd be willing to refresh my knowledge of the mutt sources and
craft a patch to do this automatically (either 100% of the time based on
the presence of Thread-Index, or if an option is set -- whatever would
be accepted), but I don't want to maintain a custom patch long-term.

Would there be interest in adding this ability to mutt?  If so, I'll
work on a patch.  If not, I'll use something hacked up for personal use.

-- Bob

Reply via email to