[Dovecot] Index files

Steven F Siirila sfs at tc.umn.edu
Tue Oct 17 16:44:51 UTC 2006


On Tue, Oct 17, 2006 at 05:27:23PM +0300, Timo Sirainen wrote:
> 
> > > Deliver updates the indexes only when it determines that the indexes are
> > > up to date (mtime and file size match what indexes contain). If they
> > > aren't, it doesn't waste time in synchronizing the mbox but just lets
> > > the imap/pop3 do it later.
> > 
> > Hmm.  Would it make sense to remove the files in this case?  (Would it
> > be more efficient for the next delivery if the files simply did not exist?)
> 
> Well.. You would be correct, except in that case Dovecot just recreates
> the index file. Maybe I should change this some day, so that the index
> file is created only when the first synchronization is done.
> 
> In any case although deleting the index would make the next delivery a
> bit more efficient (no need to open+read header), it would make the next
> mailbox synchronization less efficient (full resync vs. small updates),
> so from a total efficiency point of view I think it would be a bad
> idea. :)

You've got a good point.  I suppose one could change some attribute of one
of the index files (make one zero-length?) which would allow stat() to
determine whether the index is valid or not.  deliver would do that stat()
and know that it doesn't need to check or update the index files, and
imap/pop would do that stat() and know that it should resync the index files.
Manual inspection of the index files (ls -l) would also reveal the state of
the index files, too.

Just a thought.

-- 

Steven F. Siirila			Office: Lind Hall, Room 130B
Internet Services			E-mail: sfs at umn.edu
Office of Information Technology	Voice: (612) 626-0244
University of Minnesota			Fax: (612) 626-7593


More information about the dovecot mailing list