rfc2221.IMAP4_Login_referrals.txt 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. Network Working Group M. Gahrns
  2. Request for Comments: 2221 Microsoft
  3. Category: Standards Track October 1997
  4. IMAP4 Login Referrals
  5. Status of this Memo
  6. This document specifies an Internet standards track protocol for the
  7. Internet community, and requests discussion and suggestions for
  8. improvements. Please refer to the current edition of the "Internet
  9. Official Protocol Standards" (STD 1) for the standardization state
  10. and status of this protocol. Distribution of this memo is unlimited.
  11. Copyright Notice
  12. Copyright (C) The Internet Society (1997). All Rights Reserved.
  13. 1. Abstract
  14. When dealing with large amounts of users and many IMAP4 [RFC-2060]
  15. servers, it is often necessary to move users from one IMAP4 server to
  16. another. For example, hardware failures or organizational changes
  17. may dictate such a move.
  18. Login referrals allow clients to transparently connect to an
  19. alternate IMAP4 server, if their home IMAP4 server has changed.
  20. A referral mechanism can provide efficiencies over the alternative
  21. 'proxy method', in which the local IMAP4 server contacts the remote
  22. server on behalf of the client, and then transfers the data from the
  23. remote server to itself, and then on to the client. The referral
  24. mechanism's direct client connection to the remote server is often a
  25. more efficient use of bandwidth, and does not require the local
  26. server to impersonate the client when authenticating to the remote
  27. server.
  28. 2. Conventions used in this document
  29. In examples, "C:" and "S:" indicate lines sent by the client and
  30. server respectively.
  31. A home server, is an IMAP4 server that contains the user's inbox.
  32. A remote server is a server that contains remote mailboxes.
  33. Gahrns Standards Track [Page 1]
  34. RFC 2221 IMAP4 Login Referrals October 1997
  35. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  36. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  37. document are to be interpreted as described in [RFC-2119].
  38. 3. Introduction and Overview
  39. IMAP4 servers that support this extension MUST list the keyword
  40. LOGIN-REFERRALS in their CAPABILITY response. No client action is
  41. needed to invoke the LOGIN-REFERRALS capability in a server.
  42. A LOGIN-REFERRALS capable IMAP4 server SHOULD NOT return a referral
  43. to a server that will return a referral. A client MUST NOT follow
  44. more than 10 levels of referral without consulting the user.
  45. A LOGIN-REFERRALS response code MUST contain as an argument a valid
  46. IMAP server URL as defined in [IMAP-URL].
  47. A home server referral consists of either a tagged NO or OK, or an
  48. untagged BYE response that contains a LOGIN-REFERRALS response code.
  49. Example: A001 NO [REFERRAL IMAP://user;AUTH=*@SERVER2/] Remote Server
  50. NOTE: user;AUTH=* is specified as required by [IMAP-URL] to avoid a
  51. client falling back to anonymous login.
  52. 4. Home Server Referrals
  53. A home server referral may be returned in response to an AUTHENTICATE
  54. or LOGIN command, or it may appear in the connection startup banner.
  55. If a server returns a home server referral in a tagged NO response,
  56. that server does not contain any mailboxes that are accessible to the
  57. user. If a server returns a home server referral in a tagged OK
  58. response, it indicates that the user's personal mailboxes are
  59. elsewhere, but the server contains public mailboxes which are
  60. readable by the user. After receiving a home server referral, the
  61. client can not make any assumptions as to whether this was a
  62. permanent or temporary move of the user.
  63. 4.1. LOGIN and AUTHENTICATE Referrals
  64. An IMAP4 server MAY respond to a LOGIN or AUTHENTICATE command with a
  65. home server referral if it wishes to direct the user to another IMAP4
  66. server.
  67. Example: C: A001 LOGIN MIKE PASSWORD
  68. S: A001 NO [REFERRAL IMAP://MIKE@SERVER2/] Specified user
  69. is invalid on this server. Try SERVER2.
  70. Gahrns Standards Track [Page 2]
  71. RFC 2221 IMAP4 Login Referrals October 1997
  72. Example: C: A001 LOGIN MATTHEW PASSWORD
  73. S: A001 OK [REFERRAL IMAP://MATTHEW@SERVER2/] Specified
  74. user's personal mailboxes located on Server2, but
  75. public mailboxes are available.
  76. Example: C: A001 AUTHENTICATE GSSAPI
  77. <authentication exchange>
  78. S: A001 NO [REFERRAL IMAP://user;AUTH=GSSAPI@SERVER2/]
  79. Specified user is invalid on this server. Try
  80. SERVER2.
  81. 4.2. BYE at connection startup referral
  82. An IMAP4 server MAY respond with an untagged BYE and a REFERRAL
  83. response code that contains an IMAP URL to a home server if it is not
  84. willing to accept connections and wishes to direct the client to
  85. another IMAP4 server.
  86. Example: S: * BYE [REFERRAL IMAP://user;AUTH=*@SERVER2/] Server not
  87. accepting connections. Try SERVER2
  88. 5. Formal Syntax
  89. The following syntax specification uses the augmented Backus-Naur
  90. Form (BNF) as described in [ABNF].
  91. This amends the "resp_text_code" element of the IMAP4 grammar
  92. described in [RFC-2060]
  93. resp_text_code =/ "REFERRAL" SPACE <imapurl>
  94. ; See [IMAP-URL] for definition of <imapurl>
  95. ; See [RFC-2060] for base definition of resp_text_code
  96. 6. Security Considerations
  97. The IMAP4 login referral mechanism makes use of IMAP URLs, and as
  98. such, have the same security considerations as general internet URLs
  99. [RFC-1738], and in particular IMAP URLs [IMAP-URL].
  100. A server MUST NOT give a login referral if authentication for that
  101. user fails. This is to avoid revealing information about the user's
  102. account to an unauthorized user.
  103. With the LOGIN-REFERRALS capability, it is potentially easier to
  104. write a rogue 'password catching' server that collects login data and
  105. then refers the client to their actual IMAP4 server. Although
  106. referrals reduce the effort to write such a server, the referral
  107. response makes detection of the intrusion easier.
  108. Gahrns Standards Track [Page 3]
  109. RFC 2221 IMAP4 Login Referrals October 1997
  110. 7. References
  111. [RFC-2060], Crispin, M., "Internet Message Access Protocol - Version
  112. 4rev1", RFC 2060, December 1996.
  113. [IMAP-URL], Newman, C., "IMAP URL Scheme", RFC 2192, Innosoft,
  114. September 1997.
  115. [RFC-1738], Berners-Lee, T., Masinter, L. and M. McCahill, "Uniform
  116. Resource Locators (URL)", RFC 1738, December 1994.
  117. [RFC-2119], Bradner, S., "Key words for use in RFCs to Indicate
  118. Requirement Levels", RFC 2119, March 1997.
  119. [ABNF], DRUMS working group, Dave Crocker Editor, "Augmented BNF for
  120. Syntax Specifications: ABNF", Work in Progress.
  121. 8. Acknowledgments
  122. Many valuable suggestions were received from private discussions and
  123. the IMAP4 mailing list. In particular, Raymond Cheng, Mark Crispin,
  124. Mark Keasling Chris Newman and Larry Osterman made significant
  125. contributions to this document.
  126. 9. Author's Address
  127. Mike Gahrns
  128. Microsoft
  129. One Microsoft Way
  130. Redmond, WA, 98072
  131. Phone: (206) 936-9833
  132. EMail: mikega@microsoft.com
  133. Gahrns Standards Track [Page 4]
  134. RFC 2221 IMAP4 Login Referrals October 1997
  135. 10. Full Copyright Statement
  136. Copyright (C) The Internet Society (1997). All Rights Reserved.
  137. This document and translations of it may be copied and furnished to
  138. others, and derivative works that comment on or otherwise explain it
  139. or assist in its implmentation may be prepared, copied, published
  140. andand distributed, in whole or in part, without restriction of any
  141. kind, provided that the above copyright notice and this paragraph are
  142. included on all such copies and derivative works. However, this
  143. document itself may not be modified in any way, such as by removing
  144. the copyright notice or references to the Internet Society or other
  145. Internet organizations, except as needed for the purpose of
  146. developing Internet standards in which case the procedures for
  147. copyrights defined in the Internet Standards process must be
  148. followed, or as required to translate it into languages other than
  149. English.
  150. The limited permissions granted above are perpetual and will not be
  151. revoked by the Internet Society or its successors or assigns.
  152. This document and the information contained herein is provided on an
  153. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  154. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  155. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  156. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  157. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."
  158. Gahrns Standards Track [Page 5]