What Is a Message-ID?
TL;DR
Message-ID is an email header field holding a globally unique identifier for a single message, written inside angle brackets as a local part, an at sign and a domain. RFC 5322 lists the field as optional but states that every message should have one, and receiving systems use it for threading, deduplication and log correlation.
What does a Message-ID look like, and who generates it?
It looks like an address in angle brackets, for example a timestamp and a random token on the left and the generating host domain on the right. RFC 5322 recommends exactly that construction: a combination of the current date and time plus something unique on the system, followed by the domain of the host that created the identifier.
The first system to handle the message generates it, which is the sending client or the sending server. RFC 5322 requires the generator to guarantee the identifier is globally unique, so two different messages must never carry the same value.
Why does the Message-ID matter for a reply thread?
Because replies point at it. The In-Reply-To and References fields carry the Message-ID values of earlier messages, and that chain is what lets a client group a conversation. Rewriting or dropping the identifier between sends breaks the thread, so a follow-up arrives as an unrelated message rather than under the original.
The domain on the right-hand side is worth keeping consistent with the sending domain. A mismatch makes log correlation harder across your own systems, and filters read it as one more small inconsistency between what a message claims and where it came from.
Frequently asked questions
They must not. RFC 5322 requires global uniqueness, and receiving systems rely on it for deduplication, so a duplicate value can cause the second message to be discarded silently as one already seen.