UIDs bigger than 2**32-1 (was Re: Eudora and SEARCH)

2002-06-12 Thread Alexey Melnikov
Pete Maclean wrote: ... 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

Re: Eudora and SEARCH

2002-06-12 Thread Arnt Gulbrandsen
Simon Josefsson [EMAIL PROTECTED] UID SEARCH UID generates quite some data too, but it is just a fraction of the above. Well, you can improve on that too. I use a combination of FETCH UID and UID FETCH UID, and a loop that splits unknown UID ranges into smaller ranges. Assume that in my

Re: Eudora and SEARCH

2002-06-12 Thread David Harris
On 11 Jun 2002 at 12:09, Mark Crispin wrote: So, here comes another patentable idea that I'm giving away for free into the public domain: Don't fetch everything. At least, not at once. Do lazy fetching instead. Given sequence/UID mapping, you know how many messages are before or

Re: Eudora and SEARCH

2002-06-12 Thread Arnt Gulbrandsen
David Harris [EMAIL PROTECTED] This is fine in theory, but how do you handle sorting? I keep my client-side data sorted appropriately. When the server tells me something, I insert it into my clientside data structures and remind myself to update my display. If I discover that UID 12444 doesn't

re: UIDs bigger than 2**32-1 (was Re: Eudora and SEARCH)

2002-06-12 Thread Mark Crispin
On Wed, 12 Jun 2002 02:51:49 -0600, Alexey Melnikov wrote: I came across similar bug in Netscape 4.79: it can't cope with UIDs bigger than 2**32-1, Netscape just doesn't display them! Do you mean 2**31-1? No IMAP implementation is required to cope with UIDs bigger than 2**32-1. Also if my

Re: Eudora and SEARCH

2002-06-11 Thread Mark Crispin
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 example than your suggestion of: 00015 UID SEARCH UID 1:60 BODY target Since it seems that Eudora wants to search 60 messages at a time, with a progress bar

Re: Eudora and SEARCH

2002-06-11 Thread Simon Josefsson
Mark Crispin [EMAIL PROTECTED] writes: If you haven't already done so, you should ask yourself: why do I need to find all valid UIDs on the server? There are certainly good reasons why a client needs to do this, but there are also mistaken reasons. I need to find all valid UIDs on the

Re: Eudora and SEARCH

2002-06-11 Thread Mark Crispin
On Tue, 11 Jun 2002, Simon Josefsson wrote: In other words, it should do: 00015 UID SEARCH 1:60 BODY target 00016 UID SEARCH 61:120 BODY target etc. until it reaches the number of messages in the mailbox: 00020 UID SEARCH 300:343 BODY target This isn't a complete example -- the

Re: Eudora and SEARCH

2002-06-11 Thread Mark Crispin
On Tue, 11 Jun 2002, Simon Josefsson wrote: I need to find all valid UIDs on the server in order to synch the local header cache against the server. OK, this is the correct reason. Now, take it a step further. If, instead of getting a list of valid UIDs via UID SEARCH ALL, you get the

Re: Eudora and SEARCH

2002-06-11 Thread Simon Josefsson
Mark Crispin [EMAIL PROTECTED] writes: On Tue, 11 Jun 2002, Simon Josefsson wrote: In other words, it should do: 00015 UID SEARCH 1:60 BODY target 00016 UID SEARCH 61:120 BODY target etc. until it reaches the number of messages in the mailbox: 00020 UID SEARCH 300:343 BODY target

Re: Eudora and SEARCH

2002-06-11 Thread Pete Maclean
At 11:34 AM 6/11/2002 -0700, Mark Crispin wrote: On Tue, 11 Jun 2002, Simon Josefsson wrote: I need to find all valid UIDs on the server in order to synch the local header cache against the server. OK, this is the correct reason. Now, take it a step further. If, instead of getting a list

Re: Eudora and SEARCH

2002-06-11 Thread Simon Josefsson
Mark Crispin [EMAIL PROTECTED] writes: On Tue, 11 Jun 2002, Simon Josefsson wrote: I need to find all valid UIDs on the server in order to synch the local header cache against the server. OK, this is the correct reason. Now, take it a step further. If, instead of getting a list of valid