[Dovecot] Purging Deleted Messages

Timo Sirainen tss at iki.fi
Mon Jun 2 20:54:51 EEST 2008


On Mon, 2008-06-02 at 13:36 -0400, Carlos Williams wrote:
> I noticed today I checked a users mailbox with the mutt command:
> 
> mutt -f /home/bob/email/
> 
> There I saw he had 100 messages that had been deleted but not yet
> purged from his inbox so they're still using up disk storage on my
> email server.
> My question is does Dovecot have a process to automatically delete
> these messages after a certain period of time? I would like to think
> that they don't
> just sit in a users mailbox for years waiting to be purged, right?
> Does anyone know exactly how this works?

Dovecot doesn't keep track of when flag changes have been done, so
there's no simple way to say "expunge messages which have been marked as
\Deleted after 7 days". With maildir you could check the file's ctime,
but with mbox there's just no way.

A nightly job that expunges all deleted messages would work though. You
could probably create a script to do that somewhat easily. I don't know
of any existing scripts/plugins that do this.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080602/535d733c/attachment.bin 


More information about the dovecot mailing list