[Dovecot] Re: Maildir unreliability

Geo Carncross geocar-dovecot at internetconnection.net
Tue Oct 26 20:00:13 EEST 2004


On Mon, 2004-10-25 at 20:21, Matthias Andree wrote:
> Timo Sirainen <tss at iki.fi> writes:
> 
> > I don't have a problem with readdir() returning a file that doesn't 
> > exist anymore. I have a problem of readdir() not returning an existing 
> > file. The exact opposite.
> 
> What rename/move operation exactly is problematic? Files _should_ be
> travelling from new/ to cur/, not vice versa, although marking a mail as
> "new" in mutt for instance might cause the "reverse" move.
> 
> So the problem appears to be that readdir misses a file renamed from
> cur/ back into new/ behind our backs, no?

No.

> I haven't read your code yet, is a renamed file in the same directory
> hiding from readdir() the problem?

Yes.

P1:	opendir(dir1)
P1:	readdir()
P2:	rename(dir1/f, dir1/f:2)
P1:	readdir()		<- never sees dir1/f _OR_ dir1/f:2

The problem only happens in cur/ because files aren't renamed *in* new/,
but they are renamed *in* cur/ -- this doesn't have to do with renaming
messages FROM new/ to cur/.


-- 
Geo Carncross <geocar at internetconnection.net>
Internet Connection Reliable Web Hosting
http://www.internetconnection.net/




More information about the dovecot mailing list