News for hackers. Stuff that matters.
Re:Ten Commandments of How to Write an IMAP Client (2006) by billpg on Monday October 28, 2019 @10:03AM (#21377071)

    "Hello IMAP server. I'd like to deal with the message with this UID."
    "The UIDVALIDITY has changed since then."
    "Can you tell me the new UID from my old UID perhaps?"
    "No."
(Okay, I last worked with IMAP back in the 90s. Has modern IMAP since added a persistent ID that will stay with a message?)
Re:Ten Commandments of How to Write an IMAP Client (2006) by throw0101a on Monday October 28, 2019 @12:53PM (#21378730)
OBJECTID extension:

* https://tools.ietf.org/html/rfc8474

Though if your mail server loses the UID-to-message mapping index and has to rev the UIDVALIDITY, that's a more a problem with the implementation IMHO.

Re:Ten Commandments of How to Write an IMAP Client (2006) by billpg on Wednesday October 30, 2019 @11:08AM (#21398546)
I'm an IMAP client and my user has clicked the delete-message button. Accordingly, I've sent a command to make the change and I'm waiting for the response from the server.

Oh no! Before the response came back, my connection to the server died. I don't know if my request arrived and was accepted.

Time passed and I've just now managed to reconnect. I need to know if the delete happened or not.

Re:Ten Commandments of How to Write an IMAP Client (2006) by throw0101a on Thursday October 31, 2019 @09:15AM (#21408327)
Check to see if the \Deleted flag was added to the message.
Re:Ten Commandments of How to Write an IMAP Client (2006) by billpg on Friday November 01, 2019 @11:33AM (#21419878)
Which message? I have a UID that's no longer valid and the message IDs have all moved.