[Dovecot] Re: Small change to make dovecot pop3uw-imapmigrationfriendly
B.Candler at pobox.com
Mon May 31 22:39:37 EEST 2004
On Sun, May 30, 2004 at 09:55:39PM +0200, Matthias Andree wrote:
> > The main purpose of UIDL is for when clients leave mail on the server; each
> > time they connect they issue UIDL to check for new mail. So if they have
> > 1000 messages held on the server, each time they log in you don't want to
> > have to open and read each of those 1000 files.
> And clients will also assume that you don't insert messages into the
> middle of the mailbox, but append them at the end of the list, and that
> message-number <-> UIDL assignments remain in the known order
They will?? They shouldn't. RFC1939 doesn't allow them to do this as far as
> (obviously, DELE from the middle will change the assignment overall, but
> if you had
> no uid
> 1 abc
> 2 def
> 3 ghi
> dele 2 should keep 1 abc and 2 ghi.
I don't believe they have any permission to assume this. If the server
happens to maintain this ordering, well, the client could attempt some sort
of dubious binary-chop to work out where new mail has arrived (since some or
all messages may have been deleted); I think 'fetchmail' has some code to do
this. I consider this an abuse of the protocol.
This requirement would mandate that the server do a sort() on the directory
listing, because otherwise the order of files returned by opendir/readdir/
closedir is not necessarily the order in which they are created.
More information about the dovecot