3 ms·
I'm wondering why they don't give every mail a UUID. Probably because someone wanted to save a few bytes.
by amelius 4y ago
I'm wondering why they don't give every mail a UUID. Probably because someone wanted to save a few bytes.
- c0l0 4y agoThey do, on a per-session basis - but it's an optional feature (that's supported by ~100% of all imap server implementations).
- KRAKRISMOTT 4y agoWhat's the name of this extension?
- epilys 4y agoIt's actually in the original IMAP4rev1 RFC: https://www.rfc-editor.org/rfc/rfc3501#section-2.3.1.1 https://www.rfc-editor.org/rfc/rfc3501#section-2.3.1.1 Using UIDs is opt-in, by prefixing `UID ` in front of some commands. There are indeed extensions that add more `UID ` commands to the protocol. I've implemented IMAP clients and never used sequence numbers at all.
- vidarh 4y agoUID was present already in RFC 1730 (IMAPv4): https://www.rfc-editor.org/rfc/rfc1730#section-6.4.9 https://www.rfc-editor.org/rfc/rfc1730#section-6.4.9
- jcranmer 4y agoOne of the extensions to IMAP is the UID extension, which gives every email something akin to a UUID. It's technically not mandatory, but virtually every email client is going to try to use it if possible, and likely some email clients don't even attempt to use message sequence numbers. So you don't need to maintain message sequence numbers, except for the few places in the protocol where only the message sequence number is reported (e.g., the unsolicited message deleted alerts). In practice, I would actually expect that trying to use message sequence numbers would be buggier than not using them. But servers still have to support them!
- Mailtemi 4y agoYep, just a few bites :) Especially if you're on vacation. IMAP IDs can change, requiring the email client to re-download all emails.