René J.V. Bertin
rjvbertin at gmail.com
Sat Oct 8 18:21:36 BST 2016
> > But shouldn't it be possible to select such messages and undelete them?
> > AFAIK that's what the state is for.
> Since the deleted messages end up in the waste bin, and can be moved out of it
> again, that would be surprising.
Message that are moved to the waste bin do not need the delete flag set. I am not entirely sure if IMAP has actual support for a waste bin (and thus 2 modes of deleting messages) or if the kind via a waste bin is just implemented by giving a special character to one of the folders on the imap server. I think that's what actually happens, otherwise you wouldn't need to configure which folder is to be the bin (/templates/drafts/sent) folder.
>From what I can remember, IMAP simply assigns a state to each message, which includes read/unread, but also whether the message is deleted (in the delete/expunge way). IIRC some older (simpler?) IMAP servers don't support server-side moving of messages from one folder to another, which explains why some MUAs give (or gave) the choice how messages were to be deleted.
Both approaches allow a message to be undeleted as long as it's still on the server; either because it's just in another folder from which it can be moved, or else because "deleted" is just another flag that can be cleared.
BTW: emptying the wastebin is most probably implemented by setting the delete flag on all contained messages and then expunging the folder. Unless there's a special command to empty a folder that I'm not aware of.
More information about the kdepim-users