Re:Protonmail can delete the wrong email and nobody cares
by survirtual on Thursday November 03, 2022 @11:59AM
(#33453066)
Why is this complex…just take a sha3 hash of the email body + timestamp, then b58 it or format any way you want. Instant uuid per email.
Re:Protonmail can delete the wrong email and nobody cares
by cryptonector on Thursday November 03, 2022 @02:03PM
(#33454926)
Yes, that's what I say elsewhere. Digest some of the headers (not all) and the body. If you do it right you can even use that for dedup.
Thus in practice IMAP servers generally assign `UID`s ephemerally per-session, which means that clients can't rely on the stability of `UID`s, which means that clients have to re-obtain `UID`s before operating on emails via IMAP even if they have cached those emails locally. `UIDVALIDITY` exists to help clients cache and invalidate `UID`s. The RFC has text about this.
A bridge from IMAP to something else (which is basically what every IMAP server ever is) needs to deal with this. To make `UID`s stable requires keeping state.
Clients should really not assume stable `UID`s. Instead clients should `SEARCH` or list to get [temporarily] valid `UID`s then use those to delete etc.