Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the "Message ID" Email Header unique for each recipient?

Tags:

email

rfc5322

How unique is the Message ID header of an email? If I address an email to two people, will the both have the same Message ID? Or will they be different?

(This is assuming nobody's doing any funny business. I know that with spam, all the rules go out the window...)

like image 868
Evan Avatar asked May 06 '09 19:05

Evan


People also ask

Is the Message-ID of an email unique?

Message-ID (also known as Internet message ID or Client ID) is an identifier of emails. It is generated by the sending mail system. This identifier is not always unique - there might be multiple copies of the same message in more than one folder (or mailbox), and all of them might have the same Message-ID.

Do you need a header for every email?

Some headers are mandatory, such as the FROM, TO and DATE headers. Others are optional, but very commonly used, such as SUBJECT and CC. Other headers include the sending time stamps and the receiving time stamps of all mail transfer agents that have received and sent the message.

Do outlook emails have a unique ID?

Yes, this exists, but no, you can't use it from Outlook. Do Outlook Emails or Email Threads have a unique identifier hash that can be used within the search syntax? Each message has a Message-ID header, and this is what most systems (such as mailing-list archives) will use to reference a specific message.

What is the header of an email message?

The email header is a code snippet in an HTML email, that contains information about the sender, recipient, email's route to get to the inbox and various authentication details. The email header always precedes the email body.


3 Answers

Typically, all recipients will receive exactly the same message, both body and headers, with the exception of headers that are added en-route (eg: "Received" headers). The Message-ID header is generated by the sender, so all recipients should see the same Message-ID.

like image 22
Laurence Gonsalves Avatar answered Oct 09 '22 16:10

Laurence Gonsalves


According to RFC2822 - Internet Message Format, the short answer is that the "Message ID should be unique for each instance of the message"; however, the MESSAGE-ID field is considered optional and how the MESSAGE-ID field is created is up to the server. Quoted below:

The "Message-ID:" field provides a unique message identifier that refers to a particular version of a particular message. The uniqueness of the message identifier is guaranteed by the host that generates it (see below). This message identifier is intended to be machine readable and not necessarily meaningful to humans. A message identifier pertains to exactly one instantiation of a particular message; subsequent revisions to the message each receive new message identifiers. Note: There are many instances when messages are "changed", but those changes do not constitute a new instantiation of that message, and therefore the message would not get a new message identifier. For example, when messages are introduced into the transport system, they are often prepended with additional header fields such as trace fields (described in section 3.6.7) and resent fields (described in section 3.6.6). The addition of such header fields does not change the identity of the message and therefore the original "Message-ID:" field is retained. In all cases, it is the meaning that the sender of the message wishes to convey (i.e., whether this is the same message or a different message) that determines whether or not the "Message-ID:" field changes, not any particular syntactic difference that appears (or does not appear) in the message.

like image 192
Robert Cartaino Avatar answered Oct 09 '22 17:10

Robert Cartaino


for bulk mailing, it's better to be unique for each mail, the message id may be the only information your get back from spam notifications or bounces so it should be unique for each message.

like image 4
MrTexas Avatar answered Oct 09 '22 15:10

MrTexas