MessageID Header

Is the Message-ID header a mandatory header? And can it be safely used to distinguish between different messages on the inbox? (As in how unique is it in reality?).Also is there any other way to identify a particular message on the inbox?THanks,Prabhu
[279 byte] By [prabhu.ramadasa] at [2007-11-27 8:32:23]
# 1

Yes in rfc822 and no in reality...

You can use Message-ID in the mail header to identify a message.

(see javax.mail.search.MessageIDTerm)

But some servers allow empty Message-IDs, then you should use a md5 algorithm.

Calculates a MD5 hash from the "From", "To", "Subject", "Date" and "Message-ID" headers and uses that as message identifier.

alterna at 2007-7-12 20:28:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

> Yes in rfc822 and no in reality...

>

> You can use Message-ID in the mail header to identify

> a message.

> (see javax.mail.search.MessageIDTerm)

>

> But some servers allow empty Message-IDs, then you

> should use a md5 algorithm.

> Calculates a MD5 hash from the "From", "To",

> "Subject", "Date" and "Message-ID" headers and uses

> that as message identifier.

That was helpful. Thanks,

I have been looking up a few sites. I believe that a null Message-ID header is treated as spam by some of the mail servers. Is this true?

Also any idea as to any mail servers that don't attach a Message-ID? And this header is available for both IMAP as well as POP3 protocols?

Lots of questions, so really thankful to those who can share their views.

Thanks.

Prabhu

prabhu.ramadasa at 2007-7-12 20:28:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

>I have been looking up a few sites. I believe that a null Message-ID header is treated as spam by some of the mail servers. Is this true?

Yes i think, my atomic probe kill mail without Message-ID! :-)))

>Also any idea as to any mail servers that don't attach a Message-ID?

Don't know, but on 10.000 spam email only 200 don't have Message-ID!

>And this header is available for both IMAP as well as POP3 protocols?

Yes but see post bshannon, i think that will help you :

http://forum.java.sun.com/thread.jspa?forumID=43&threadID=783581

alterna at 2007-7-12 20:28:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...