A thread is a set of messages, which are replies to each other. Since
there can be more than one reply to a message, a thread is actually
often a tree structure, as shown by figure 1:
Figure 1: An example of a message thread
E-mail messages have certain headers, which are used to recognize
- Specifies a globally unique identification of the current message.
- May contain the Message-ID of the message, to which the current
message is a reply. (Older mail software sometimes puts other, less
useful information into this header.)
- May contain a list of the Message-IDs of all the messages in the
chain from the current message back to the start of the thread.
If the thread is very long, this list may be abbreviated in the
middle, but the first and the last message should always be present.
(Older mail software uses this field to identify other messages,
which the current messages refers to.)
- May contain the Message-ID of a previous version of the current
message. (Some software may use "Replaces" for the same
Look at figure 1:
Figure 1 again: An example of a message thread
In this example, message B and E have the Message-ID of Message A
in the In-Reply-To and/or the References header.
Message C and D have the Message-ID of Message B in the In-Reply-To
header, and have the Message-ID of Message A and Message B in the
To be able to use these headers, mail software sometimes contains
a data base, which, given a Message-ID, returns the message with this
Message-ID. Thus, given an In-Reply-To header, the message referenced
in this header is returned. Note that since the Message-ID is globally
unique, such a data base can be used to copy the link from the mailbox
data base of the sender to the mailbox data base of the recipients
of the messages.
Threads can also be recognized in a very different way, by using
the Subject field. Replies to a message often have the same Subject
value as earlier messages in the thread, except that the four characters
"Re: " are usually added to replies. "Re: "
is not added to Subjects which already start with "Re: ".
(Sometimes, although this is not a standard, "Re: " in other
languages than English is used, for example "An: "
which is an abbreviation of the German word for reply, "Antwort".
This method should be avoided, since it causes technical problems
with international messages. "Re:" is actually an abbreviation of a Latin word, "referre",
and Latin is an international language. Message systems can, if they
so prefer, show "Re: " ans "An: " in the user
interface, but in the protocol on the wire, the value should always
be "Re: ".) Sometimes, although this is not a standard,
"Fwd: " is added to the Subject when forwarding a message.
Thus, by finding all messages with the same Subject, after stripping
"Re: " and "Fwd: ", will find all messages
in a thread.
However, a person writing a reply can change the Subject. In such
a case, the In-Reply-To header might link this message to a thread
even though the Subject seems to start a new thread. Some people think
this is an advantage, since a change of the subject might indicate
a new topic. Sometimes, to keep the thread while changing the subject,
the old subject is kept, with "(was)" in front of it. Thus,
if a message has the subject "Train schedules (was) Bus schedules",
this shows that this message belongs to the same thread as earliermessages
with "Bus schedules" as the subject.
Note that the set of messages which are recognized as threads may
differ with these two methods, since the header fields Message-ID,
In-Reply-To, References, Supersedes and Subject do not always contain
the necessary information in the way described above.
Can threads be merged?
One message may have multiple values in the In-Reply-To, References
and Supersedes headers (an older version of the e-mail standard only
allowed a single value in the In-Reply-To header). Suppose you have
the structure in figure 2. Will then the addition of Message G cause
two previous threads to be merged into one thread? Or does Message
G belong to two different threads? Different mail clients handle this
in different ways. Some clients will only recognize a thread by the
first value in these headers, so that Message G only belongs to the
left, and not to the right, thread in Figure 2.
User commands to follow threads
Mail systems usually show the In-Reply-To, References and Supersedes
headers. The reader of a message can then, with some message systems,
click on these headers to get to earlier messages in a thread.
Even though there is no explicit link from a message to its replies,
a mail system can create and show such reverse links, so that a reader
can click on links both to follow the thread back and forward. Such
reverse links are useful, because they allow a reader of a message
to check if there are already replies, before writing his or her own
Below is an example of how this can be handled in an e-mail software.