[Dovecot] Re: mkdir {cur,tmp,new}?

Timo Sirainen tss at iki.fi
Sat Jun 14 19:03:29 EEST 2003


On Wed, 2003-06-04 at 21:07, Charlie Brady wrote:
> > > I would interpret any of cur, new and tmp being missing as "mailbox does 
> > > not exist".
> > 
> > Well, maybe. I was just thinking cases when a DELETE died in the middle
> > of it, and left only some of the dirs there. In that case you couldn't
> > then SELECT/APPEND the mailbox, but I guess you could DELETE it again..

Actually, this can't happen. Dovecot does atomic maildir deletion by
renaming the ".mailbox" into "..mailbox" which is then deleted.

> Can you DELETE a mailbox which doesn't exist?
> 
> If a DELETE dies in the middle, and the maildir isn't complete, then by my
> definition (and I'd claim, logically) the mailbox does not exist. If a
> mailbox doesn't exist, you can SELECT/APPEND or DELETE. But it shouldn't
> appear in a LIST, and you must be able to CREATE.

That'd be pretty broken. If mailbox doesn't exist, you can't select or
delete it. Most clients wouldn't even let you try.

> > Or maybe rather Dovecot should just create those dirs when it notices
> > they don't exist while trying to use them.
> 
> I think a maildir must be complete to exist. Hence it's wrong to "by 
> stealth" convert a partial maildir to a complete one.

Well, what harm could it cause?

> > I like to be able to create new mailboxes with "mkdir .boxname".
> 
> Shouldn't that be "CREATE boxname"? :-)

Easier to play with filesystem directly when testing.



More information about the dovecot mailing list