-1

An email has a Message-ID that is guarenteed unique by either the client program sending the email or the first email server (source).

To declare an email as unique then, I'd need both the Message-ID and an ID of the client program sending the email or first mail server- is this possible? I can't find any reference to the latter in the following email standards:

Preston
  • 7,399
  • 8
  • 54
  • 84
  • 1
    Please share more details. Why do you need these IDs? How is your problem related to programming? – Nico Haase Feb 14 '23 at 10:26
  • @NicoHaase to guarentee incoming emails are unique, to avoid duplication of emails. If this isn't the appropriate place to ask, please feel free to suggest another stack exchange platform that would be better – Preston Feb 14 '23 at 10:39
  • Shouldn't the sending mailserver provide that guarantee? – Nico Haase Feb 14 '23 at 10:44
  • That's the issue though, the sending mail server can only guarentee that it's unique as per the sending mail server. 2 emails from separate mail servers could have the same Message-ID – Preston Feb 14 '23 at 10:48
  • Unless I'm fundementally misunderstanding that part, and it's unique across mail servers – Preston Feb 14 '23 at 10:50
  • Yes, that might be the case, but still I don't get how your problem is related to programming – Nico Haase Feb 14 '23 at 11:06

1 Answers1

1

Mail clients often use a universally unique identifier (UUID) for this purpose – which (in this case) is just a special formatting of a random number. Since 122 of the 128 bits are chosen randomly, the chance of a collision is vanishingly small.

There are two main reasons why mail clients should add the Message-ID:

  • If the outgoing mail server adds the Message-ID, then this information is missing in the sent folder on the incoming mail server, which means the sender couldn't use it for conversation threading, defeating its purpose.
  • The mail client may submit several versions of the same message to the outgoing mail server, such as mentioning each Bcc recipient in its own copy of the message, and all these versions should have the same Message-ID.
Kaspar Etter
  • 3,155
  • 1
  • 14
  • 21