[Dovecot] keep users from deleting email

Angel Marin anmar at anmar.eu.org
Mon Apr 14 18:40:04 EEST 2008

Adam Williams wrote:
> Charles Marcus wrote:
>> Then you are using the wrong tool.
>> For legal purposes, your message archives should be completely 
>> separate from your normal mail store.
>> Set up a parallel delivery system for your archiver.
> Do you mean like, Postfix's "always_bcc = awilliam at mdah.state.ms.us" 
> option?  But, then I'm doubling my data.  One copy is the user's email, 
> and one copy for always_bcc.  Then I have twice the data to back up, 
> more CPU cycles to compress it to tape, etc...

If you still want to do it this way, upon source inspection it looks 
like you can accomplish it by making imap_expunge function 
(src/imap/imap-expunge.c) a noop, that is, returning always true. If it 
works for read-only mailboxes it should do for this, but haven't tested 
myself :) BTW I'm sure it can also be done as a plugin, but I'm not 
familiar with the plugin api at all.

Bright side is that if expunge is a noop, users stop seeing the message 
as it gets marked as deleted but it's left there.

Anyway as others have pointed out, I'd look at doing this outside the 
imap server. It's too easy to get something like this disabled by 
mistake (deploy an unpatched binary) and do unnoticed.

Angel Marin

More information about the dovecot mailing list