Andreas Aardal Hanssen <[EMAIL PROTECTED]> writes:

> 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).

But my problem is I don't understand why I need to de-select the
current mailbox to invoke STATUS UIDNEXT on it.

Are you saying that to get UIDNEXT of the currently selected mailbox I
should close it and then invoke STATUS UIDNEXT?

>>>>Indeed, thanks for the pointer.  I think this should be made clearer
>>>>in the description for STATUS -- right now it doesn't mention that the
>>>>command partially doesn't work if you use it on the currently selected
>>>>mailbox, which seems like critical information.  Mark?
>>> 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!!

So?  Either the command works or it doesn't, you said it worked, but
now you are saying it doesn't work because I used STATUS on a selected
mailbox.  If the latter is true, I think this should be documented.

Re-reading 5.2 more carefully I see it only refers to using any
command to get the size of the mailbox.  What exactly does "size of
the mailbox" refer to?  I'd assume this means STATUS MESSAGES and not
UIDNEXT.  So again I'm not sure I see any text forbiding the use
STATUS UIDNEXT on the currently selected mailbox.

>>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?

No, I didn't want to expunge the mailbox.  SELECT + SELECT is legal.

Reply via email to