og det må så være unikt så vidt jeg kan forstå?
så er der kun id 1 2 og 3, og sletter jeg en og får en ny mail så får den nye mail id 3, hvilket er lidt ubrugeligt,
The message ID has nothing to do with IMAP but is part of the mail itself and specified in RFC 2822 as "optional" (although it says that it should be present):Though optional, every message SHOULD have a "Message-ID:" field.So you are not doing anything wrong if some mails lack a Message-ID. It happens for all the mails that the MUA that originally sent the mail did not generate one for (which however every commonly used MUA should do).Concerning a unique ID for identifying mails via IMAP, you may want to have a look at the UID field described in the standard.