[Dovecot] Need a quick, safe method to empty /home/user/Maildir/{.Junk, .Trash}

Timo Sirainen tss at iki.fi
Fri Jun 13 05:08:51 EEST 2008


On Thu, 2008-06-12 at 19:28 -0400, Bill Cole wrote:
> At 1:17 AM +0300 6/13/08, Timo Sirainen wrote:
> >On Thu, 2008-06-12 at 11:10 -0400, Bill Cole wrote:
> 
> [...]
> >>  However, I DO clobber the dovecot-uidlist in .Trash as part of my
> >>  monthly housekeeping because it tends to get very large
> >
> >All the expunged messages get removed from it the next time a new
> >message is added to the mailbox. So there should be no need to delete
> >it. (v1.1 doesn't always recreate the file, but it gets rewritten if the
> >resulting file would be 70% of the current size or less.)
> 
> I confess to running 1.0.0, which apparently lacks this bit of housekeeping.
> 
> At the moment I have no messages in my Trash folder (so there are no 
> files in ~/Maildir/.Trash/cur) and ~Maildir/.Trash/dovecot-uidlist 
> has 10273 lines, and the first messages listed are nowhere to be 
> found anywhere under Maildir.

As I said, they're removed *the next time a new message is added to the
mailbox*. So basically it works like:

1. 1000 messages added to mailbox -> dovecot-uidlist has 1001 lines.
2. 1000 messages expunged from mailbox -> dovecot-uidlist has 1001
lines.
3. 1 message added to the mailbox -> dovecot-uidlist has 2 lines.

Neither v1.0 nor v1.1 updates dovecot-uidlist when messages are
expunged. I don't know if it should - it's just unnecessary extra disk
I/O, but I guess if the space savings are large maybe it should..
-------------- 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/20080613/856444ce/attachment-0001.bin 


More information about the dovecot mailing list