rfc1732.compatibiliy_IMAP2-IMAP2bis.txt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. Network Working Group M. Crispin
  2. Request for Comments: 1732 University of Washington
  3. Category: Informational December 1994
  4. IMAP4 COMPATIBILITY WITH IMAP2 AND IMAP2BIS
  5. Status of this Memo
  6. This memo provides information for the Internet community. This memo
  7. does not specify an Internet standard of any kind. Distribution of
  8. this memo is unlimited.
  9. Introduction
  10. This is a summary of hints and recommendations to enable an IMAP4
  11. implementation to interoperate with implementations that conform to
  12. earlier specifications. None of these hints and recommendations are
  13. required by the IMAP4 specification; implementors must decide for
  14. themselves whether they want their implementation to fail if it
  15. encounters old software.
  16. IMAP4 has been designed to be upwards compatible with earlier
  17. specifications. For the most part, IMAP4 facilities that were not in
  18. earlier specifications should be invisible to clients unless the
  19. client asks for the facility.
  20. In some cases, older servers may support some of the capabilities
  21. listed as being "new in IMAP4" as experimental extensions to the
  22. IMAP2 protocol described in RFC 1176.
  23. This information may not be complete; it reflects current knowledge
  24. of server and client implementations as well as "folklore" acquired
  25. in the evolution of the protocol.
  26. Crispin [Page 1]
  27. RFC 1732 IMAP4 - Compatibility December 1994
  28. IMAP4 client interoperability with old servers
  29. In general, a client should be able to discover whether an IMAP2
  30. server supports a facility by trial-and-error; if an attempt to use a
  31. facility generates a BAD response, the client can assume that the
  32. server does not support the facility.
  33. A quick way to check whether a server implementation supports the
  34. IMAP4 specification is to try the CAPABILITY command. An OK response
  35. that includes the IMAP4 capability value indicates a server that
  36. supports IMAP4; a BAD response or one without the IMAP4 capability
  37. value indicates an older server.
  38. The following is a list of facilities that are only in IMAP4, and
  39. suggestions for how new clients might interoperate with old servers:
  40. CAPABILITY command
  41. A BAD response to this command indicates that the server
  42. implements IMAP2 (or IMAP2bis) and not IMAP4.
  43. AUTHENTICATE command.
  44. Use the LOGIN command.
  45. LSUB and LIST commands
  46. Try the RFC 1176 FIND command.
  47. * in a sequence
  48. Use the number of messages in the mailbox from the EXISTS
  49. unsolicited response.
  50. SEARCH extensions (character set, additional criteria)
  51. Reformulate the search request using only the searching
  52. options listed in search_old in the IMAP4 grammar. This may
  53. entail doing multiple searches to achieve the desired
  54. results.
  55. BODYSTRUCTURE fetch data item
  56. Try to fetch the non-extensible BODY data item.
  57. body section number 0
  58. Fetch the entire message and extract the header.
  59. RFC822.HEADER.LINES and RFC822.HEADER.LINES.NOT fetch data items
  60. Use RFC822.HEADER and remove the unwanted information.
  61. BODY.PEEK[section], RFC822.PEEK, and RFC822.TEXT.PEEK fetch data
  62. items Use the corresponding non-PEEK versions and manually
  63. clear the \Seen flag as necessary.
  64. Crispin [Page 2]
  65. RFC 1732 IMAP4 - Compatibility December 1994
  66. UID fetch data item and the UID commands
  67. No equivalent capabilitity exists in older servers.
  68. FLAGS.SILENT, +FLAGS.SILENT, and -FLAGS.SILENT store data items
  69. Use the corresponding non-SILENT versions and ignore the
  70. untagged FETCH responses which com eback.
  71. The following IMAP4 facilities were introduced in the experimental
  72. IMAP2bis revisions to RFC-1176, and may be present in a server that
  73. does not support the CAPABILITY command:
  74. CREATE, DELETE, and RENAME commands
  75. To test whether these commands are present, try a CREATE
  76. INBOX command. If the response is NO, these commands are
  77. supported by the server. If the response is BAD, they are
  78. not. Older servers without the CREATE capability may sup-
  79. port implicit creation of a mailbox by a COPY command with a
  80. non-existant name as the destination.
  81. APPEND command
  82. To test whether this command is present, try to append a
  83. zero-length stream to a mailbox name that is known not to
  84. exist (or at least, highly unlikely to exist) on the remote
  85. system.
  86. SUBSCRIBE and UNSUBSCRIBE commands
  87. Try the form of these commands with the optional MAILBOX
  88. keyword.
  89. EXAMINE command
  90. Use the SELECT command instead.
  91. flags and internal date argument to APPEND command
  92. Try the APPEND without any flag list and internal date argu-
  93. ments.
  94. BODY, BODY[section], and FULL fetch data items
  95. Use RFC822.TEXT and ALL instead. Server does not support
  96. MIME.
  97. PARTIAL command
  98. Use the appropriate FETCH command and ignore the unwanted
  99. data.
  100. IMAP4 client implementations must accept all responses and data for-
  101. mats documented in the IMAP4 specification, including those labeled
  102. Crispin [Page 3]
  103. RFC 1732 IMAP4 - Compatibility December 1994
  104. as obsolete. This includes the COPY and STORE unsolicited responses
  105. and the old format of dates and times. In particular, client imple-
  106. mentations must not treat a date/time as a fixed format string; nor
  107. may they assume that the time begins at a particular octet.
  108. IMAP4 client implementations must not depend upon the presence of any
  109. server extensions that are not in the base IMAP4 specification.
  110. The experimental IMAP2bis version specified that the TRYCREATE spe-
  111. cial information token is sent as a separate unsolicited OK response
  112. instead of inside the NO response.
  113. The FIND BBOARDS, FIND ALL.BBOARDS, and BBOARD commands of RFC 1176
  114. are removed from IMAP4. There is no equivalent to the bboard com-
  115. mands, which provided a separate namespace with implicit restrictions
  116. on what may be done in that namespace.
  117. Older server implementations may automatically create the destination
  118. mailbox on COPY if that mailbox does not already exist. This was how
  119. a new mailbox was created in older specifications. If the server
  120. does not support the CREATE command (see above for how to test for
  121. this), it will probably create a mailbox on COPY.
  122. Older server implementations may not preserve flags or internal dates
  123. on COPY. Some server implementations may not permit the preservation
  124. of certain flags on COPY or their setting with APPEND as site policy.
  125. Crispin [Page 4]
  126. RFC 1732 IMAP4 - Compatibility December 1994
  127. IMAP4 server interoperability with old clients
  128. In general, there should be no interoperation problem between a
  129. server conforming to the IMAP4 specification and a well-written
  130. client that conforms to an earlier specification. Known problems are
  131. noted below:
  132. Poor wording in the description of the CHECK command in earlier
  133. specifications implied that a CHECK command is the way to get the
  134. current number of messages in the mailbox. This is incorrect. A
  135. CHECK command does not necessarily result in an EXISTS response.
  136. Clients must remember the most recent EXISTS value sent from the
  137. server, and should not generate unnecessary CHECK commands.
  138. An incompatibility exists with COPY in IMAP4. COPY in IMAP4
  139. servers does not automatically create the destination mailbox if
  140. that mailbox does not already exist. This may cause problems with
  141. old clients that expect automatic mailbox creation in COPY.
  142. The PREAUTH unsolicited response is new in IMAP4. It is highly
  143. unlikely that an old client would ever see this response.
  144. The format of dates and times has changed due to the impending end
  145. of the century. Clients that fail to accept a four-digit year or
  146. a signed four-digit timezone value will not work properly with
  147. IMAP4.
  148. An incompatibility exists with the use of "\" in quoted strings.
  149. This is best avoided by using literals instead of quoted strings
  150. if "\" or <"> is embedded in the string.
  151. Security Considerations
  152. Security issues are not discussed in this memo.
  153. Author's Address:
  154. Mark R. Crispin
  155. Networks and Distributed Computing, JE-30
  156. University of Washington
  157. Seattle, WA 98195
  158. Phone: (206) 543-5762
  159. EMail: MRC@CAC.Washington.EDU
  160. Crispin [Page 5]