What Is a Message-ID?
The unique label every email carries, how threading uses it, and why it is not proof of origin.
A Message-ID is a unique identifier that the sending system gives each message. It appears in angle brackets with a left part and a domain, and mail programs use it to link replies into threads and to avoid showing duplicates.
Format
Message-ID: <[email protected]>
^ unique part ^ domain of the generating systemThe text before the @ is chosen by the system that created it, often a timestamp, counter or random value. The part after the @ is typically the hostname or domain of that system. Square-bracket IP literals are allowed but unusual.
How it is used
- Replies carry the original ID in In-Reply-To and References, which is how clients build conversation threads.
- Mail servers use it to detect duplicate deliveries.
- Administrators search server logs for it to follow one message across systems.
Reading the domain part
The domain tells you which system generated the ID, which is often the sender's mail platform. It is common for it to differ from the From domain when a marketing or transactional service sends on behalf of someone. A domain such as localhost, or a name without a dot, suggests a misconfigured or custom sender, which is an observation rather than a verdict.
Anomalies worth noting
- Missing Message-ID (most mail has one; receivers often add it).
- No angle brackets, whitespace or more than one @.
- More than one Message-ID header in a single message.
- An IP literal or a non-qualified domain on the right-hand side.
It does not prove origin
The system that creates a message chooses its Message-ID. Anyone can set an ID that mimics another domain, so it cannot tell you who sent a message or from where.
The Email Header Analyzer parses the Message-ID, shows its domain part and format, and flags duplicates or unusual structure. Because IDs can be used to look up a message in logs, treat them as sensitive and remove them with the Log Sanitizer before you share headers.
Frequently asked questions
- Can two emails have the same Message-ID?
- A Message-ID is meant to be globally unique per message, but a message copied or resent by some systems can reuse one. Duplicates in a single message's headers are a different, unusual case.
- Does the Message-ID domain have to match the From domain?
- No. Mail platforms commonly generate IDs under their own domain, so a mismatch is common and not suspicious by itself.
- What is Message-ID used for?
- Threading (through In-Reply-To and References), de-duplication and finding a message in server logs.
Try it yourself
The tool that pairs with this guide.
Did this help you tighten your security headers?
If these free developer tools save you time, consider buying me a byte. Your support helps keep DevCraftKit free and growing.
Related articles
HTTP Security Headers Explained: A Practical Developer Guide
A handful of response headers tell the browser how to defend the page they came with. Here's what each one actually does.
Published
Content-Security-Policy (CSP) Explained With Examples
CSP is an allow-list for where your page's resources can load from. Here's how the directives fit together.
Published
What Is HSTS? Strict-Transport-Security Explained
HSTS closes a narrow but real window for downgrade attacks. Here's exactly what it enforces and how to configure it.
Published