Search code examples
emailsmtpuniqueidentifier

What is the use of Message-ID in email?


From what I've read, every Message-ID must be unique, however it is possible to create repeated Message-IDs if we force the header with a fixed value. So I don't understand what the point of them saying that the Message-ID should be unique, but they are very easy to create duplicates. If they can easily be generated by anyone with a little reading and basic programmatic knowledge, why do Message-IDs exist and what are they used for, which I can easily duplicate?


Solution

  • https://datatracker.ietf.org/doc/html/rfc5322#section-3.6.4

    in conjunction with the References and In-Reply-To fields, mail clients use Message-ID to organize multiple messages into threads.

    https://en.wikipedia.org/wiki/Message-ID

    and at least some clients will consider two messages with the same ID to be the same thing and discard one of them.