In the two and a half years that I have been working with IMAP, I have 
become increasingly despondent about the sad state of IMAP implementation 
in email clients and how that is holding back the use of a very valuable 
protocol.  Of course there are clients, notably Mulberry, that use IMAP 
with brilliance, but the popular clients for Windows shape up as a very 
sorry bunch indeed.

Now, this mailing list has not shown itself to be a forum for client 
bashing, and I do not wish to make it one.  I am, however, so amazed by my 
latest discovery of bad IMAP usage that I feel compelled to share it 
here.  I find it surprising that it has not been mentioned before, but I 
searched the archives and can find no mention of it.

I noticed a while ago that Eudora (specifically version 5.1 for Windows) 
can be very slow when searching IMAP folders.  I wondered if it could be 
pulling down messages and searching them itself rather than using the 
SEARCH command.  Yesterday I decided to investigate and discovered what is 
really going on.  Eudora performs searches over messages in batches of 60 
messages at a time, as exemplified by this command:

00015 UID SEARCH UID 
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60
 
BODY target

This organization is intelligent and user-friendly in that it allows Eudora 
to display a progress bar and a "Stop" button.  (There seems to be a bug 
though in that the progress bar sometimes does not appear.)  It's a small 
matter, but one must wonder however why Eudora does not express this 
command as:

00015 UID SEARCH UID 1:60 BODY target

The trouble is that Eudora sends SEARCH commands for every possible UID 
from the lowest to the highest irrespective of whether or not the UID is 
actually represented in the selected mailbox.  Which means, in the worst 
pathological case of a mailbox containing just two messages, one with a UID 
of 1 and one with a UID of 4294967295 (the highest possible), a search 
would take 2 weeks or more.  (This is calculated based on timings made with 
my own server with the client running on the same computer.)

Having a few spare moments on my hands, I decided to test this.  I set up a 
server mailbox with two messages identified as described above.  I 
connected with Eudora and launched a search.  It did not take two 
weeks!  It took no time at all -- Eudora crashed at the very start.  (This 
is not so reprehensible perhaps.  I'll give Eudora the benefit of any doubt 
and assume this was a bug due to a boundary problem.  Most of us have them.)

I am glad we don't use 64-bit UIDs.  If we did, a worst case search of a 
mailbox holding two messages would take a little over 150 million years.

Pete


-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/imap-list.html
-----------------------------------------------------------------

Reply via email to