Timo Sirainen
2012-May-15 18:57 UTC
[Dovecot] plugin: Don't allow deleting the last instance of a mail
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.
Robert Schetterer
2012-May-16 06:58 UTC
[Dovecot] plugin: Don't allow deleting the last instance of a mail
Am 15.05.2012 20:57, schrieb Timo Sirainen:> 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. >Hi Timo, is this feature often asked by dovecot-users ? or are there special reasons for hacking it now, perhaps other stuff is more urgent... -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria