On Tue, 24 Jun 2003, Gangadhar Mylapuram wrote:
> According to my observation, BYE response form server is the one. ARE
> THERE ANY OTHER REASONS?

The protocol is quite specific on this point: ANY untagged response can
come from the server at ANY time.

As a practical matter, some untagged responses generally only occur as the
result of certain commands.  But your client MUST NOT assume that.

> I am considering for mobile device, It is difficult to maintain all
> message information in inbox at client side, which has limited memory.

If you treat an IMAP server like a POP3 server, the result can be that
your client will fail in unexpected ways.  You must implement the IMAP
unsolicited data model correctly.

I doubt that mobile devices are as restrictive as 604K DOS PCs, yet we
once distributed Pine on that platform.  It may be necessary to discard
cached information when you run short of memory and/or roll out data to
secondary storage (that may not be an option with a mobile device), but
that doesn't change the fundamental principles of how an IMAP client needs
to work.

The price of ignoring this caution is that you may end up with an IMAP
client that fails in unexpected ways, or perhaps doesn't work at all, with
some servers.

The bottom line: implement a caching model, flush the cache as necessary
to stay within memory limitations, and make sure that the cache is at
least large enough to accomplish any operation that you undertake.  Keep
in mind that the larger the cache, the better the performance of your
client.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to