[Dovecot] maildir maintenance?
Timo Sirainen
tss at iki.fi
Wed Nov 24 21:04:57 EET 2010
On 24.11.2010, at 18.59, 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?
It's all direct filesystem operations, no IMAP. But v1.2.15 can read v2.0's index files just fine.
>> 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 was more thinking what happens if the user creates a mailbox called `rm -rf /` or something.. Also if there are " or \ characters I think the LIST output will use literals and your parsing will break more or less badly.
> 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.
That would be a bit difficult at least to do via IMAP..
More information about the dovecot
mailing list