On Mon, 2005-06-06 at 12:51 +0200, Cor Bosman wrote:
Well, it should be possible, after all UW can do it..and if they can...;) To delete a file, theoretically there should be no writing necessary. Just unlink the file and forget about updating indexes
It's not so simple, because the error could come at any point, even in the middle of updating indexes. I'd have to check all write operations and make sure they can correctly fallback to just keeping indexes in memory.
(btw, our indexes are on a seperate filesystem without quotas!). Actually it seemed dovecot wanted to create the dovecot-uidlist file, and barfed on not being able to do that.
This is another problem. Hmm. I tried to look up some of my older explanations for this, but couldn't. Well, here goes again:
Mails need to be assigned UIDs with IMAP. If the UIDs aren't written to dovecot-uidlist file, it's possible that different mails will get different UIDs between logins. This really confuses clients which have cached mails locally.
If we assumed that:
When maildir filenames are sorted, the newly arrived mails come always after old ones. Dovecot doesn't currently satisfy this requirement even itself, if multiple mails are saved within a second. Have to change that..
After user has expunged mails, there is space to write dovecot-uidlist file.
No new clients try to open the mailbox between expunging and dovecot-uidlist locking. (This requirement could be avoided by using fcntl() or similar locking.)
Then I think it *might* work correctly.
mbox has similar problem, but the solution is much easier and can probably be made fully working and race-free without any special conditions.
Anyway, you can specify different directory for dovecot-uidlist using :CONTROLDIR=path in default_mail_env.