Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TIdMessage::MsgId question



Permlink Replies: 2 - Last Post: May 28, 2017 2:17 PM Last Post By: Asger Joergensen Threads: [ Previous | Next ]
Asger Joergensen

Posts: 370
Registered: 11/18/08
TIdMessage::MsgId question
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 24, 2017 1:57 PM
Hi

As I understand it, the TIdMessage::MsgId is world unique, it is assigned at
arrival to the mailbox and it stays the same over time as long as the message
stays in that mailbox.

Is that correct ?

I'm asking because my plan is to keep a list of downloaded MsgId's, so that I,
in a recovery situation, can check against that list, in order to avoid duplicate
mail and also avoid reintroducing locally deleted mails.

P.s. my mail client is a read only client, where only few messages are interesting.

I just noticed that in the mailbox I use for testing there are 26 mails where MsgId
is empty, all have both Subject and From Address.

Is it normal that this many messages can be without MsgId ?
Or do my provider have a problem ?

Thanks in advance
Best regards
Asger
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: TIdMessage::MsgId question [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 24, 2017 7:43 PM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger Joergensen wrote:

As I understand it, the TIdMessage::MsgId is world unique

It is supposed to be globally unique, but in reality it is only as
unique as the generator makes it to be.

it is assigned at arrival to the mailbox

It is usually generated by the original sender, not the receiving
server. Though the server may generate its own Message-ID if none
already exists.

and it stays the same over time as long as the message stays in
that mailbox.

Yes, provided the email is not altered, in which case a new Message-ID
should be generated.

I just noticed that in the mailbox I use for testing there are 26
mails where MsgId is empty, all have both Subject and From Address.

The Message-ID header is optional, so there is no guarantee that it is
always present.

--
Remy Lebeau (TeamB)
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: TIdMessage::MsgId question [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 28, 2017 2:17 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy

Thank you for clarifying.

Best regards
Asger
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02