[Imap-protocol] SELECT of same mailbox
dave at cridland.net
Thu Sep 8 12:58:00 PDT 2005
On Thu Sep 8 16:13:50 2005, Dave Cridland wrote:
> On Thu Sep 8 07:29:59 2005, Cyrus Daboo wrote:
>> --On September 7, 2005 8:12:40 PM +0100 Dave Cridland
>> <dave at cridland.net> wrote:
>>> Personally I like it. It means that where I need to perform an
>>> but the server doesn't support that, I can issue a known bogus
>>> (In fact, I do: SELECT "&#-&#/#")
>> I do 'EXAMINE' then 'CLOSE' - which works without having to force
>> a server error.
> Yes, that's better.
Actually, I'll retract this, if you don't mind. :-)
I think best would be an EXAMINE "&#-&#/#" pipelined with a CLOSE.
This will, hopefully, fail, causing the state to switch to
authenticated. So I'm moving from trying to elicit a NO, to trying to
elicit a NO followed by a BAD.
An EXAMINE of a real mailbox will cause things like a UID check, etc,
which may be relatively expensive, and possibly time consuming. A
CLOSE of an EXAMINEd mailbox is less likely to cause much delay, but
it'll still be non-zero time adding to the round-trip. So it'll be a
longer round-trip - on some servers, very much longer.
I think your method is certainly cleaner, which is why I initially
decided it was better than mine, but when I actually looked at
changing the code, I decided there were potentially quicker ways of
emulating UNSELECT. I agree before you say anything that it's a very
dirty hack. :-)
For the benefit of anyone looking at the mailbox name I use in
bewilderment, it's the most invalid modified UTF-7 I could come up
with when I was writing it, and deliberately contains no alphanumeric
characters to reduce the outside chance someone might have created it.
More information about the Imap-protocol