When I'm getting IMAPMessage from the IMAP server and calling getMessageID() I got next id (for the privacy reasons it not real, but reproduce the differences) :
Then, when I saved this message to the disk and read it as MimeMessage and calling getMessageID() I got this :
As you can see the difference is in  for the string after @.
I'm saving to disk using Message.writeTo() method.
Found some more cases not only with , for example :
<122D4DEFEA5F484DACD7AAE386CDB1F40B4BAA@exchange.someserver land.com> from IMAP server
and after reading from the file :
<122D4DEFEA5F484DACD7AAE386CDB1F40B4BAA@exchange.someserver\r\n\tland.com> - (with \r \n\t)
And one more :
<firstname.lastname@example.org> from IMAP server
and after reading from file
email@example.com - no <>
I'm using Gmail IMAP server.
In the case of "xxx.yy.www.q" are server IP (numbers).
First of all I'm using Java 1.4.5.
In the protocol trace I see that message-id header is contains  but envelope that is used in the case of IMAPMessage to get the message id doesn't contains .
In the file message-id header also has .
i have some problem to find message without <> but it seems to be the same problem.
The question now is to understand why envelop's message id is different (not consistent) than message-id header.