Andreas Aardal Hanssen <[EMAIL PROTECTED]> writes: > On Thu, 1 Aug 2002, Simon Josefsson wrote: > Andreas Aardal Hanssen <[EMAIL PROTECTED]> writes: >>> You get UIDNEXT from the SELECT response, then NOOP, IDLE etc will give >>> you status updates, so that you can find this number yourself. >>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. >>> It's not explicitly in the 2060 rfc, it's just common sense; it doesn't >>> make any sense to check the status of the folder that you are staring at, >>> using a method that gives you unreliable snapshot info. >>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. > But one tick (ok, or two) later, the status can (and often, will) > have changed. The STATUS command will attempt to access the mailbox > that you have currently selected in your case, and the race between > 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. My original mail contained two problems though, the second one being not able to select INBOX in that state. Any ideas on that one?
