---
id: "message_id"
kind: "datatype"
status: "stable"
is_pii: false
categories: ["internet"]
langs: ["common"]
quality: 90
url: "http://registry.apicrafter.io/datatype/message_id"
---

# Message-ID (Email Message Identifier) (`message_id`)

Globally unique identifier of an email message, which the sending client or server writes in the Message-ID header (RFC 5322, section 3.6.4). It has the form <left@right>: the right part is usually the domain name of the host that created it, and the left part is a unique string such as a timestamp with a random suffix. Replies refer to it in their In-Reply-To and References headers.

- Personal data (PII): no
- Categories: Internet (internet)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^<[^<>@\s]+@[^<>@\s]+>$
```

## Examples

- `<1234@local.machine.example>` — Example of RFC 5322, appendix A.1.1
- `<5678.21-Nov-1997@example.com>` — Example of RFC 5322, appendix A.1.2
- `<testabcd.1234@silly.example>` — Example of RFC 5322, appendix A.1.3
- `1234@local.machine.example` (invalid example) — No angle brackets
- `<1234@local.machine.example> <3456@example.net>` (invalid example) — Two identifiers, as in a References header

## Metacrafter rules

2 rules: 1 match the field name, 1 match values.

- `messageidfield` (field, `common/internet.yaml`)
- `messageidvalue` (data, `common/internet.yaml`)

## Supported by tools

- `metacrafter`

## Translations

- ru: Идентификатор письма (Message-ID): Уникальный идентификатор письма из заголовка Message-ID в форме <левая_часть@правая_часть> (RFC 5322).

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Message-ID>
- doc: <https://www.rfc-editor.org/rfc/rfc5322.html#section-3.6.4>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <http://registry.apicrafter.io/api/v1/datatypes/message_id.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/internet/message_id.yaml>
