Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

New Post: Message unique identification?

$
0
0
Be aware that multiple messages can share the same Message-Id value (this tends to happen when you are subscribed to a mailing-list where you received a copy of the message from the list and directly via a Cc or something).

Also, there is a security issue with using the Message-Id as a unique ID for a message in that if an attacker knows the Message-Id of a message that he wants to block, he can send you a new message with the same Message-Id value. Not super likely, but it is just something to be aware of.

I'm not sure what exactly to use for your purposes (and the Message-Id may be fine for your use case, at least for personal use). Perhaps a hash of the most recent Received header? Assuming you trust your mail server, the most recent Received header will be "unique" in that it is time-stamped as well as containing the source hostname and IP of the sender. It might be vulnerable to an attack sent from the same IP during that 1 second period, but otherwise I'd imagine it to be fairly "safe".

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>