On Thu, 1 Aug 2002, Simon Josefsson wrote:
>Andreas Aardal Hanssen <[EMAIL PROTECTED]> writes:
>> On Thu, 1 Aug 2002, Simon Josefsson wrote:
>> Andreas Aardal Hanssen <[EMAIL PROTECTED]> writes:
>>>Well, UIDNEXT is not returned in the untagged responses returned
>>>during NOOP or IDLE.  Using 1+UIDMAX could work as a guess though.
>> What exactly do you need UIDNEXT for?
>To see if I need to select the mailbox and get the lowest and highest
>article number, which is needed by my mail client for historical
>reasons.  If the 1+UIDMAX guess for UIDNEXT is wrong (which it seem to
>be for some servers) it may be quite time consuming as I haven't seen
>a server where EXAMINE is faster than STATUS.

Then don't select anything; just run status on all. And don't assume that
the number you get is accurate, because it can never be (and it shouldn't
matter to your application).

>> It does work - it tells you the status of the mailbox at the time that you
>> submitted the command.
>The server complained that my client is buggy, so something is not
>working properly.

...because you're issuing STATUS on a selected mailbox!!

>> the two will confuse your client, however it's coded.
>I'll cope with the race by simply always using the UIDNEXT value I get
>from STATUS.  If new mail arrived, the UIDNEXT value will be different
>the next time I query, and then I can investigate it further.

That's a good way to do it.

>My original mail contained two problems though, the second one being
>not able to select INBOX in that state.  Any ideas on that one?

You didn't close the first mailbox first, did you?

Andy

-- 
Andreas Aardal Hanssen


Reply via email to