[Dovecot] maildir maintenance?

Brian Kroth bpkroth at gmail.com
Wed Nov 24 20:59:13 EET 2010


Timo Sirainen <tss at iki.fi> 2010-11-24 18:01:
> On 24.11.2010, at 2.55, Brian Kroth wrote:
> 
> > Hi, I'm running version 1.2.15 (so no doveadm)
> 
> You could build Dovecot v2.0 and only use doveadm binary from it.

Does it just issue the command via IMAP?  No direct filesystem
operations?

> > I recently wrote the attached script (could probably be improved) meant
> > in theory to be run as a nightly cron job to do the follow:
> ..
> > To the devs, I'm wondering if this seems sane?
> 
> Looks about ok. The main thing I'm worried is what happens if user creates mailboxes containing " or ' or ` characters.

Yeah, that was mostly me being lazy in my wanting to deal with escaping,
so I just ignored them.

In what I originally wrote, I think it just won't touch them.

Or is the issue that the find command might remove them and then the
indexes don't get fixed up?  I suppose I could just make sure that the
find ignores those dirs, but I thought (from other maillist reading)
that the next time their client SELECTs the folder it'll fix it up
anyways.

I suppose another spin on this would be for me to script the preauth
imap client to figure out which mailboxes have messages marked for
deletion of such and such an age and then try to use EXPUNGE to wipe
just them out.  I'm not sure off hand if that's possible.

I suppose that's what doveadm already does.

Thanks,
Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20101124/e7dd6471/attachment.bin 


More information about the dovecot mailing list