[Dovecot] plugin: Don't allow deleting the last instance of a mail

Timo Sirainen tss at iki.fi
Tue May 15 21:57:54 EEST 2012


Before beginning to code it, does anyone have any related ideas that could be useful before starting it?

Mainly what I'm intending to do is to write a plugin for mdbox storage that allows users to expunge mails in a specific namespace only if there are other instances for the mail. So basically:

 * Users can't accidentally delete mails (in shared mailboxes)
 * Users can still move mails within folders

For v2.1 this can be implemented only to a specific storage backend, so at least for now only mdbox will support it. Maildir and sdbox support would also be possible by looking at hard link counts. Race conditions would allow deleting the mails, but that's unlikely to be an issue since the main point is to avoid accidental deletions that shouldn't be attempted in the first place anyway.




More information about the dovecot mailing list