Hello Tung!

Thanks for asking!

The Mime Message-Id header is defined in RFC-822. You can more or less
relate it with the content of a message.

The EmailId is defined in RFC-8621. It identifies a unique email in
somebody mailbox.

Now consider:

Bob sends a Message to Alice. That Message (as per RFC-822) will
correspond to two emails with the same content (one in Bob Sent mailbox,
one in Alice INBOX), so with the same Message-Id header, but two
distinct emailId.

Also the usages are different.

Message-Id is useful to relates messages to each other (A is a reply to
B, a forward) and can be used to form email threads. In your context
(Message Delivery Notification) it allows to know for which message a
given MDN is issued.

EmailId designate a single email in somebody mailbox, and I can use it
to delete the email, update its flags, move it to another mailbox.

https://jmap.io/spec-mail.html#emails

> id: Id (immutable; server-set) The id of the Email object. Note
> that this is the JMAP object id, NOT the Message-ID header field
> value of the message [@!RFC5322].

The message-id field needs to be specified while generating emails. I am
unsure here but javax.mail / mime4j should set one if none is specified.

Last but not least: this is a rather technical discussion, more related
to James development, but maybe not relevant for James users. As such I
believe next time we want to discuss technical details related to James
development (which is great!) we should do it on server-dev.

Cheers,

Benoit

Le 14/04/2021 à 15:12, Tung Tran Van a écrit :
> Hello all,
> 
> I am an amateur. I am confused about the difference between Message-ID *(a
> field at header in MimeMessage)* and EmailId*(or MessageId, both have the
> same name)*.
> 
> I usually use emailId to retrieve messages
> *(MessageIdManager.java.getMessage)*, but when I check related MimeMessage
> results, I detect that the Message-ID Header has other value.
> 
> So, What is the purpose of the Message-ID Header? How is it created?
> 
> May somebody help me understand it?
> 
> *Thank you,*
> 
> *Tung, Tran Van*
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to