annotate docs/rfc/rfc5092.txt @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
2
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
3
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
6
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
7 Network Working Group A. Melnikov, Ed.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
8 Request for Comments: 5092 Isode Ltd.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
9 Obsoletes: 2192 C. Newman
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
10 Updates: 4467 Sun Microsystems
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
11 Category: Standards Track November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
12
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
13
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
14 IMAP URL Scheme
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
15
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
16 Status of This Memo
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
17
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
18 This document specifies an Internet standards track protocol for the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
19 Internet community, and requests discussion and suggestions for
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
20 improvements. Please refer to the current edition of the "Internet
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
21 Official Protocol Standards" (STD 1) for the standardization state
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
22 and status of this protocol. Distribution of this memo is unlimited.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
23
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
24 Abstract
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
25
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
26 IMAP (RFC 3501) is a rich protocol for accessing remote message
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
27 stores. It provides an ideal mechanism for accessing public mailing
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
28 list archives as well as private and shared message stores. This
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
29 document defines a URL scheme for referencing objects on an IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
30 server.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
31
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
32 This document obsoletes RFC 2192. It also updates RFC 4467.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
33
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
34
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
35
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
36
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
37
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
38
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
39
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
40
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
41
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
42
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
43
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
44
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
45
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
46
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
47
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
48
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
49
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
50
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
51
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
52
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
53
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
54
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
55
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
56
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
57
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
58 Melnikov & Newman Standards Track [Page 1]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
59
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
60 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
61
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
62
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
63 Table of Contents
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
64
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
65 1. Introduction ....................................................2
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
66 2. Conventions Used in This Document ...............................3
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
67 3. IMAP userinfo Component (iuserinfo) .............................4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
68 3.1. IMAP Mailbox Naming Scope ..................................4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
69 3.2. IMAP User Name and Authentication Mechanism ................4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
70 3.3. Limitations of enc-user ....................................6
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
71 4. IMAP Server .....................................................7
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
72 5. Lists of Messages ...............................................7
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
73 6. A Specific Message or Message Part ..............................8
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
74 6.1. URLAUTH Authorized URL .....................................9
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
75 6.1.1. Concepts ............................................9
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
76 6.1.1.1. URLAUTH ....................................9
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
77 6.1.1.2. Mailbox Access Key .........................9
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
78 6.1.1.3. Authorized Access Identifier ...............9
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
79 6.1.1.4. Authorization Mechanism ...................10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
80 6.1.1.5. Authorization Token .......................10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
81 6.1.2. URLAUTH Extensions to IMAP URL .....................10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
82 7. Relative IMAP URLs .............................................11
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
83 7.1. absolute-path References ..................................12
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
84 7.2. relative-path References ..................................12
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
85 8. Internationalization Considerations ............................13
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
86 9. Examples .......................................................13
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
87 9.1. Examples of Relative URLs .................................16
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
88 10. Security Considerations .......................................16
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
89 10.1. Security Considerations Specific to URLAUTH Authorized
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
90 URL ......................................................17
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
91 11. ABNF for IMAP URL Scheme ......................................17
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
92 12. IANA Considerations ...........................................21
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
93 12.1. IANA Registration of imap: URI Scheme ....................21
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
94 13. References ....................................................22
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
95 13.1. Normative References .....................................22
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
96 13.2. Informative References ...................................23
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
97 Appendix A. Sample Code............................................24
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
98 Appendix B. List of Changes since RFC 2192.........................30
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
99 Appendix C. List of Changes since RFC 4467.........................31
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
100 Appendix D. Acknowledgments........................................31
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
101
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
102 1. Introduction
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
103
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
104 The IMAP URL scheme is used to designate IMAP servers, mailboxes,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
105 messages, MIME bodies [MIME], and search programs on Internet hosts
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
106 accessible using the IMAP protocol over TCP.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
107
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
108 The IMAP URL follows the common Internet scheme syntax as defined in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
109 [URI-GEN]. If :<port> is omitted, the port defaults to 143 (as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
110 defined in Section 2.1 of [IMAP4]).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
111
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
112
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
113
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
114 Melnikov & Newman Standards Track [Page 2]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
115
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
116 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
117
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
118
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
119 An absolute IMAP URL takes one of the following forms:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
120
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
121 imap://<iserver>[/]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
122
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
123 imap://<iserver>/<enc-mailbox>[<uidvalidity>][?<enc-search>]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
124
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
125 imap://<iserver>/<enc-mailbox>[<uidvalidity>]<iuid>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
126 [<isection>][<ipartial>][<iurlauth>]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
127
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
128 The first form is used to refer to an IMAP server (see Section 4),
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
129 the second form refers to the contents of a mailbox or a set of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
130 messages resulting from a search (see Section 5), and the final form
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
131 refers to a specific message or message part, and possibly a byte
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
132 range in that part (see Section 6). If [URLAUTH] extension is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
133 supported, then the final form can have the <iurlauth> component (see
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
134 Section 6.1 for more details).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
135
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
136 The <iserver> component common to all types of absolute IMAP URLs has
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
137 the following syntax expressed in ABNF [ABNF]:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
138
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
139 [iuserinfo "@"] host [ ":" port ]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
140
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
141 The <iserver> component is the same as "authority" defined in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
142 [URI-GEN]. The syntax and uses of the <iuserinfo> ("IMAP userinfo
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
143 component") are described in detail in Section 3. The syntax of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
144 <host> and <port> is described in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
145
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
146 2. Conventions Used in This Document
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
147
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
148 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
149 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
150 document are to be interpreted as described in RFC 2119 [KEYWORDS].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
151
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
152 This document references many productions from [URI-GEN]. When the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
153 document needs to emphasize IMAP URI-specific differences from [URI-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
154 GEN] (i.e., for parts of IMAP URIs that have more restricted syntax
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
155 than generic URIs), it uses a non-terminal i<foo> to define an IMAP-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
156 specific version of the non-terminal <foo> from [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
157
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
158 Note that the ABNF syntax shown in Section 11 is normative. Sections
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
159 2-6 may use a less formal syntax that does not necessarily match the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
160 normative ABNF shown in Section 11. If there are any differences
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
161 between the syntax shown in Sections 2-6 and Section 11, then the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
162 syntax shown in Section 11 must be treated as authoritative. Non-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
163 syntax requirements included in Sections 2-6 are, of course,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
164 normative.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
165
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
166
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
167
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
168
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
169
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
170 Melnikov & Newman Standards Track [Page 3]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
171
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
172 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
173
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
174
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
175 3. IMAP userinfo Component (iuserinfo)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
176
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
177 The <iuserinfo> component conforms to the generic syntax of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
178 <userinfo> defined in [URI-GEN]. It has the following syntax
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
179 expressed in ABNF [ABNF]:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
180
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
181 enc-user [iauth] / [enc-user] iauth
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
182
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
183 The meaning of the different parts is described in subsections of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
184 this section.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
185
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
186 3.1. IMAP Mailbox Naming Scope
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
187
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
188 The "enc-user" part of the "iuserinfo" component, if present, denotes
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
189 mailbox naming scope. If it is absent, the IMAP URL can only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
190 reference mailboxes with globally unique names, i.e., mailboxes with
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
191 names that don't change depending on the user the client
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
192 authenticated as to the IMAP server. Note that not all IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
193 implementations support globally unique names.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
194
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
195 For example, a personal mailbox described by the following URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
196 <imap://michael@example.org/INBOX> is most likely different from a
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
197 personal mailbox described by <imap://bester@example.org/INBOX>, even
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
198 though both URLs use the same mailbox name.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
199
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
200 3.2. IMAP User Name and Authentication Mechanism
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
201
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
202 The userinfo component (see [URI-GEN]) of an IMAP URI may contain an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
203 IMAP user name (a.k.a. authorization identity [SASL], "enc-user")
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
204 and/or an authentication mechanism. (Note that the "enc-user" also
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
205 defines a mailbox naming scope as described in Section 3.1). The
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
206 IMAP user name and the authentication mechanism are used in the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
207 "LOGIN" or "AUTHENTICATE" commands after making the connection to the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
208 IMAP server.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
209
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
210 If no user name and no authentication mechanism are supplied, the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
211 client MUST authenticate as anonymous to the server. If the server
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
212 advertises AUTH=ANONYMOUS IMAP capability, the client MUST use the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
213 AUTHENTICATE command with ANONYMOUS [ANONYMOUS] SASL mechanism. If
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
214 SASL ANONYMOUS is not available, the (case-insensitive) user name
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
215 "anonymous" is used with the "LOGIN" command and the Internet email
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
216 address of the end user accessing the resource is supplied as the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
217 password. The latter option is given in order to provide for
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
218 interoperability with deployed servers.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
219
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
220 Note that, as described in RFC 3501, the "LOGIN" command MUST NOT be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
221 used when the IMAP server advertises the LOGINDISABLED capability.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
222
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
223
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
224
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
225
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
226 Melnikov & Newman Standards Track [Page 4]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
227
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
228 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
229
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
230
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
231 An authentication mechanism (as used by the IMAP AUTHENTICATE
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
232 command) can be expressed by adding ";AUTH=<enc-auth-type>" to the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
233 end of the user name in an IMAP URL. When such an <enc-auth-type> is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
234 indicated, the client SHOULD request appropriate credentials from
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
235 that mechanism and use the "AUTHENTICATE" command instead of the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
236 "LOGIN" command. If no user name is specified, one MUST be obtained
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
237 from the mechanism or requested from the user/configuration as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
238 appropriate.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
239
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
240 The string ";AUTH=*" indicates that the client SHOULD select an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
241 appropriate authentication mechanism. (Though the '*' character in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
242 this usage is not strictly a delimiter, it is being treated like a
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
243 sub-delim [URI-GEN] in this instance. It MUST NOT be percent-encoded
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
244 in this usage, as ";AUTH=%2A" will not match this production.) It
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
245 MAY use any mechanism listed in the response to the CAPABILITY
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
246 command (or CAPABILITY response code) or use an out-of-band security
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
247 service resulting in a PREAUTH connection. If no user name is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
248 specified and no appropriate authentication mechanisms are available,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
249 the client SHOULD fall back to anonymous login as described above.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
250 The behavior prescribed in this section allows a URL that grants
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
251 read-write access to authorized users and read-only anonymous access
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
252 to other users.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
253
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
254 If a user name is included with no authentication mechanism, then
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
255 ";AUTH=*" is assumed.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
256
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
257 Clients must take care when resolving a URL that requires or requests
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
258 any sort of authentication, since URLs can easily come from untrusted
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
259 sources. Supplying authentication credentials to the wrong server
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
260 may compromise the security of the user's account; therefore, the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
261 program resolving the URL should meet at least one of the following
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
262 criteria in this case:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
263
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
264 1) The URL comes from a trusted source, such as a referral server
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
265 that the client has validated and trusts according to site policy.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
266 Note that user entry of the URL may or may not count as a trusted
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
267 source, depending on the experience level of the user and site
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
268 policy.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
269
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
270 2) Explicit local site policy permits the client to connect to the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
271 server in the URL. For example, a company example.com may have a
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
272 site policy to trust all IMAP server names ending in example.com,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
273 whereas such a policy would be unwise for example.edu where random
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
274 students can set up IMAP servers.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
275
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
276 3) The user confirms that connecting to that domain name with the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
277 specified credentials and/or mechanism is permitted. For example,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
278 when using "LOGIN" or SASL PLAIN with Transport Layer Security
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
279
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
280
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
281
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
282 Melnikov & Newman Standards Track [Page 5]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
283
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
284 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
285
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
286
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
287 (TLS), the IMAP URL client presents a dialog box "Is it OK to send
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
288 your password to server "example.com"? Please be aware the owners
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
289 of example.com will be able to reuse your password to connect to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
290 other servers on your behalf".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
291
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
292 4) A mechanism is used that validates the server before passing
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
293 potentially compromising client credentials. For example, a site
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
294 has a designated TLS certificate used to certify site-trusted IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
295 server certificates, and this has been configured explicitly into
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
296 the IMAP URL client. Another example is use of a Simple
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
297 Authentication and Security Layer (SASL) mechanism such as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
298 DIGEST-MD5 [DIGEST-MD5], which supports mutual authentication.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
299
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
300 5) An authentication mechanism is used that will not reveal any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
301 information to the server that could be used to compromise future
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
302 connections. Examples are SASL ANONYMOUS [ANONYMOUS] or GSSAPI
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
303 [GSSAPI].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
304
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
305 URLs that do not include a user name but include an authentication
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
306 mechanism (";AUTH=<mech>") must be treated with extra care, since for
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
307 some <mech>s they are more likely to compromise the user's primary
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
308 account. A URL containing ";AUTH=*" must also be treated with extra
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
309 care since it might fall back on a weaker security mechanism.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
310 Finally, clients are discouraged from using a plaintext password as a
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
311 fallback with ";AUTH=*" unless the connection has strong encryption.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
312
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
313 A program interpreting IMAP URLs MAY cache open connections to an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
314 IMAP server for later reuse. If a URL contains a user name, only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
315 connections authenticated as that user may be reused. If a URL does
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
316 not contain a user name or authentication mechanism, then only an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
317 anonymous connection may be reused.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
318
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
319 Note that if unsafe or reserved characters such as " " (space) or ";"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
320 are present in the user name or authentication mechanism, they MUST
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
321 be percent-encoded as described in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
322
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
323 3.3. Limitations of enc-user
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
324
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
325 As per Sections 3.1 and 3.2 of this document, the IMAP URI enc-user
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
326 has two purposes:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
327
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
328 1) It provides context for user-specific mailbox paths such as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
329 "INBOX" (Section 3.1).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
330
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
331 2) It specifies that resolution of the URL requires logging in as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
332 that user and limits use of that URL to only that user (Section
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
333 3.2).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
334
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
335
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
336
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
337
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
338 Melnikov & Newman Standards Track [Page 6]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
339
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
340 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
341
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
342
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
343 An obvious limitation of using the same field for both purposes is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
344 that the URL can be resolved only by the mailbox owner. In order to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
345 avoid this restriction, implementations should use globally unique
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
346 mailbox names (see Section 3.1) whenever possible.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
347
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
348 Note: There is currently no general way in IMAP of learning a
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
349 globally unique name for a mailbox. However, by looking at the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
350 NAMESPACE [NAMESPACE] command result, it is possible to determine
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
351 whether or not a mailbox name is globally unique.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
352
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
353 The URLAUTH component overrides the second purpose of the enc-user in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
354 the IMAP URI and by default permits the URI to be resolved by any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
355 user permitted by the <access> identifier. URLAUTH and <access>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
356 identifier are described in Section 6.1.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
357
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
358 4. IMAP Server
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
359
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
360 An IMAP URL referring to an IMAP server has the following form:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
361
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
362 imap://<iserver>[/]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
363
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
364 This URL type is frequently used to describe a location of an IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
365 server, both in referrals and in configuration. It may optionally
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
366 contain the <iuserinfo> component (see Sections 3 and 11). A program
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
367 interpreting this URL would issue the standard set of commands it
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
368 uses to present a view of the content of the IMAP server, as visible
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
369 to the user described by the "enc-user" part of the <iuserinfo>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
370 component, if the "enc-user" part is specified.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
371
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
372 5. Lists of Messages
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
373
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
374 An IMAP URL referring to a list of messages has the following form:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
375
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
376 imap://<iserver>/<enc-mailbox>[<uidvalidity>][?<enc-search>]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
377
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
378 The <enc-mailbox> field is used as the argument to the IMAP4 "SELECT"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
379 or "EXAMINE" command. Note that if unsafe or reserved characters
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
380 such as " " (space), ";", or "?" are present in <enc-mailbox>, they
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
381 MUST be percent-encoded as described in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
382
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
383 The <uidvalidity> field is optional. If it is present, it MUST be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
384 the same as the value of IMAP4 UIDVALIDITY response code at the time
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
385 the URL was created. This MUST be used by the program interpreting
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
386 the IMAP URL to determine if the URL is stale. If the IMAP URL is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
387 stale, then the program should behave as if the corresponding mailbox
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
388 doesn't exist.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
389
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
390
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
391
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
392
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
393
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
394 Melnikov & Newman Standards Track [Page 7]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
395
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
396 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
397
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
398
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
399 Note that the <uidvalidity> field is a modifier to the <enc-mailbox>,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
400 i.e., it is considered a part of the last "component" (as used in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
401 [URI-GEN]) of the <enc-mailbox>. This is significant during relative
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
402 URI resolution.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
403
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
404 The "?<enc-search>" field is optional. If it is not present, the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
405 program interpreting the URL will present the entire content of the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
406 mailbox.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
407
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
408 If the "?<enc-search>" field is present, the program interpreting the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
409 URL should use the contents of this field as arguments following an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
410 IMAP4 SEARCH command. These arguments are likely to contain unsafe
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
411 characters such as " " (space) (which are likely to be present in the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
412 <enc-search>). If unsafe characters are present, they MUST be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
413 percent-encoded as described in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
414
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
415 Note that quoted strings and non-synchronizing literals [LITERAL+]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
416 are allowed in the <enc-search> content; however, synchronizing
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
417 literals are not allowed, as their presence would effectively mean
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
418 that the agent interpreting IMAP URLs needs to parse an <enc-search>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
419 content, find all synchronizing literals, and perform proper command
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
420 continuation request handling (see Sections 4.3 and 7 of [IMAP4]).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
421
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
422 6. A Specific Message or Message Part
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
423
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
424 An IMAP URL referring to a specific message or message part has the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
425 following form:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
426
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
427 imap://<iserver>/<enc-mailbox>[<uidvalidity>]<iuid>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
428 [<isection>][<ipartial>][<iurlauth>]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
429
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
430 The <enc-mailbox> and [uidvalidity] are as defined in Section 5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
431 above.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
432
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
433 If <uidvalidity> is present in this form, it SHOULD be used by the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
434 program interpreting the URL to determine if the URL is stale.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
435
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
436 The <iuid> refers to an IMAP4 message Unique Identifier (UID), and it
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
437 SHOULD be used as the <set> argument to the IMAP4 "UID FETCH"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
438 command.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
439
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
440 The <isection> field is optional. If not present, the URL refers to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
441 the entire Internet message as returned by the IMAP command "UID
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
442 FETCH <uid> BODY.PEEK[]". If present, the URL refers to the object
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
443 returned by a "UID FETCH <uid> BODY.PEEK[<section>]" command. The
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
444 type of the object may be determined by using a "UID FETCH <uid>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
445 BODYSTRUCTURE" command and locating the appropriate part in the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
446
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
447
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
448
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
449
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
450 Melnikov & Newman Standards Track [Page 8]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
451
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
452 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
453
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
454
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
455 resulting BODYSTRUCTURE. Note that unsafe characters in [isection]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
456 MUST be percent-encoded as described in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
457
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
458 The <ipartial> field is optional. If present, it effectively appends
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
459 "<<partial-range>>" to the end of the UID FETCH BODY.PEEK[<section>]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
460 command constructed as described in the previous paragraph. In other
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
461 words, it allows the client to request a byte range of the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
462 message/message part.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
463
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
464 The <iurlauth> field is described in detail in Section 6.1.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
465
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
466 6.1. URLAUTH Authorized URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
467
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
468 URLAUTH authorized URLs are only supported by an IMAP server
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
469 advertising the URLAUTH IMAP capability [URLAUTH].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
470
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
471 6.1.1. Concepts
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
472
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
473 6.1.1.1. URLAUTH
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
474
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
475 URLAUTH is a component, appended at the end of a URL, that conveys
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
476 authorization to access the data addressed by that URL. It contains
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
477 an authorized access identifier, an authorization mechanism name, and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
478 an authorization token. The authorization token is generated from
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
479 the URL, the authorized access identifier, authorization mechanism
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
480 name, and a mailbox access key.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
481
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
482 Note: This specification only allows for the URLAUTH component in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
483 IMAP URLs describing a message or its part.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
484
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
485 6.1.1.2. Mailbox Access Key
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
486
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
487 The mailbox access key is an unpredictable, random string. To ensure
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
488 unpredictability, the random string with at least 128 bits of entropy
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
489 is generated by software or hardware (not by the human user).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
490
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
491 Each user has a table of mailboxes and an associated mailbox access
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
492 key for each mailbox. Consequently, the mailbox access key is per-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
493 user and per-mailbox. In other words, two users sharing the same
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
494 mailbox each have a different mailbox access key for that mailbox,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
495 and each mailbox accessed by a single user also has a different
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
496 mailbox access key.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
497
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
498 6.1.1.3. Authorized Access Identifier
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
499
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
500 The authorized <access> identifier restricts use of the URLAUTH
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
501 authorized URL to certain users authorized on the server, as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
502 described in Section 6.1.2.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
503
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
504
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
505
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
506 Melnikov & Newman Standards Track [Page 9]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
507
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
508 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
509
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
510
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
511 6.1.1.4. Authorization Mechanism
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
512
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
513 The authorization mechanism is the algorithm by which the URLAUTH is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
514 generated and subsequently verified, using the mailbox access key.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
515
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
516 6.1.1.5. Authorization Token
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
517
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
518 The authorization token is a deterministic string of at least 128
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
519 bits that an entity with knowledge of the secret mailbox access key
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
520 and URL authorization mechanism can use to verify the URL.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
521
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
522 6.1.2. URLAUTH Extensions to IMAP URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
523
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
524 A specific message or message part IMAP URL can optionally contain
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
525 ";EXPIRE=<datetime>" and/or ";URLAUTH=<access>:<mech>:<token>".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
526
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
527 When ";EXPIRE=<datetime>" is used, this indicates the latest date and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
528 time that the URL is valid. After that date and time, the URL has
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
529 expired and server implementations MUST reject the URL. If
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
530 ";EXPIRE=<datetime>" is not used, the URL has no expiration, but can
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
531 still be revoked using the RESETKEY command [URLAUTH].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
532
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
533 The URLAUTH takes the form ";URLAUTH=<access>:<mech>:<token>", and it
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
534 MUST be at the end of the URL. It is composed of three parts. The
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
535 <access> portion provides the authorized access identifiers that may
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
536 constrain the operations and users that are permitted to use this
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
537 URL. The <mech> portion provides the authorization mechanism used by
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
538 the IMAP server to generate the authorization token that follows.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
539 The <token> portion provides the authorization token, which can be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
540 generated using the GENURLAUTH command [URLAUTH].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
541
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
542 The "submit+" <access> identifier prefix, followed by a userid,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
543 indicates that only a userid authorized as a message submission
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
544 entity on behalf of the specified userid is permitted to use this
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
545 URL. The IMAP server does not validate the specified userid but does
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
546 validate that the IMAP session has an authorization identity that is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
547 authorized as a message submission entity. The authorized message
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
548 submission entity MUST validate the userid prior to contacting the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
549 IMAP server.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
550
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
551 The "user+" <access> identifier prefix, followed by a userid,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
552 indicates that use of this URL is limited to IMAP sessions that are
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
553 logged in as the specified userid (that is, have authorization
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
554 identity as that userid).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
555
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
556 Note: If a SASL mechanism that provides both authorization and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
557 authentication identifiers is used to authenticate to the IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
558 server, the "user+" <access> identifier MUST match the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
559
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
560
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
561
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
562 Melnikov & Newman Standards Track [Page 10]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
563
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
564 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
565
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
566
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
567 authorization identifier. If the SASL mechanism can't transport
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
568 the authorization identifier, the "user+" <access> identifier MUST
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
569 match the authorization identifier derived from the authentication
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
570 identifier (see [SASL]).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
571
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
572 The "authuser" <access> identifier indicates that use of this URL is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
573 limited to authenticated IMAP sessions that are logged in as any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
574 non-anonymous user (that is, have authorization identity as a non-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
575 anonymous user) of that IMAP server. To restate this: use of this
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
576 type of URL is prohibited to anonymous IMAP sessions, i.e., any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
577 URLFETCH command containing this type of URL issued in an anonymous
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
578 session MUST return NIL in the URLFETCH response.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
579
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
580 The "anonymous" <access> identifier indicates that use of this URL is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
581 not restricted by session authorization identity; that is, any IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
582 session in authenticated or selected state (as defined in [IMAP4]),
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
583 including anonymous sessions, may issue a URLFETCH [URLAUTH] using
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
584 this URL.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
585
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
586 The authorization token is represented as an ASCII-encoded
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
587 hexadecimal string, which is used to authorize the URL. The length
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
588 and the calculation of the authorization token depend upon the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
589 mechanism used, but in all cases, the authorization token is at least
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
590 128 bits (and therefore at least 32 hexadecimal digits).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
591
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
592 Example:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
593
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
594 <imap://joe@example.com/INBOX/;uid=20/;section=1.2;urlauth=
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
595 submit+fred:internal:91354a473744909de610943775f92038>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
596
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
597 7. Relative IMAP URLs
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
598
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
599 Relative IMAP URLs are permitted and are resolved according to the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
600 rules defined in [URI-GEN]. In particular, in IMAP URLs parameters
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
601 (such as ";uid=" or ";section=") are treated as part of the normal
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
602 path with respect to relative URL resolution.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
603
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
604 [URI-GEN] defines four forms of relative URLs: <inetwork-path>,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
605 <iabsolute-path>, <irelative-path>, and <ipath-empty>. Their syntax
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
606 is defined in Section 11.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
607
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
608 A relative reference that begins with two slash characters is termed
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
609 a network-path reference (<inetwork-path>); such references are
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
610 rarely used, because in most cases they can be replaced with an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
611 equivalent absolute URL. A relative reference that begins with a
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
612 single slash character is termed an absolute-path reference
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
613 (<iabsolute-path>; see also Section 7.1). A relative reference that
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
614 does not begin with a slash character is termed a relative-path
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
615
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
616
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
617
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
618 Melnikov & Newman Standards Track [Page 11]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
619
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
620 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
621
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
622
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
623 reference (<irelative-path>; see also Section 7.2). The final form
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
624 is <ipath-empty>, which is "same-document reference" (see Section 4.4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
625 of [URI-GEN]).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
626
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
627 The following observations about relative URLs are important:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
628
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
629 The <iauth> grammar element (which is a part of <iuserinfo>, which
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
630 is, in turn, a part of <iserver>; see Section 3) is considered part
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
631 of the user name for purposes of resolving relative IMAP URLs. This
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
632 means that unless a new user name/server specification is included in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
633 the relative URL, the authentication mechanism is inherited from the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
634 base IMAP URL.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
635
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
636 URLs always use "/" as the hierarchy delimiter for the purpose of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
637 resolving paths in relative URLs. IMAP4 permits the use of any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
638 hierarchy delimiter in mailbox names. For this reason, relative
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
639 mailbox paths will only work if the mailbox uses "/" as the hierarchy
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
640 delimiter. Relative URLs may be used on mailboxes that use other
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
641 delimiters, but in that case, the entire mailbox name MUST be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
642 specified in the relative URL or inherited as a whole from the base
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
643 URL.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
644
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
645 If an IMAP server allows for mailbox names starting with "./" or
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
646 "../", ending with "/." or "/..", or containing sequences "/../" or
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
647 "/./", then such mailbox names MUST be percent-encoded as described
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
648 in [URI-GEN]. Otherwise, they would be misinterpreted as dot-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
649 segments (see Section 3.3 of [URI-GEN]), which are processed
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
650 specially during the relative path resolution process.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
651
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
652 7.1. absolute-path References
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
653
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
654 A relative reference that begins with a single slash character is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
655 termed an absolute-path reference (see Section 4.2 of [URI-GEN]). If
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
656 an IMAP server permits mailbox names with a leading "/", then the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
657 leading "/" MUST be percent-encoded as described in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
658 Otherwise, the produced absolute-path reference URI will be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
659 misinterpreted as a network-path reference [URI-GEN] described by the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
660 <inetwork-path> non-terminal.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
661
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
662 7.2. relative-path References
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
663
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
664 A relative reference that does not begin with a slash character is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
665 termed a relative-path reference [URI-GEN]. Implementations MUST NOT
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
666 generate or accept relative-path IMAP references.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
667
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
668 See also Section 4.2 of [URI-GEN] for restrictions on relative-path
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
669 references.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
670
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
671
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
672
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
673
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
674 Melnikov & Newman Standards Track [Page 12]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
675
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
676 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
677
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
678
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
679 8. Internationalization Considerations
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
680
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
681 IMAP4, Section 5.1.3 [IMAP4] includes a convention for encoding non-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
682 US-ASCII characters in IMAP mailbox names. Because this convention
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
683 is private to IMAP, it is necessary to convert IMAP's encoding to one
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
684 that can be more easily interpreted by a URL display program. For
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
685 this reason, IMAP's modified UTF-7 encoding for mailboxes MUST be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
686 converted to UTF-8 [UTF-8]. Since 8-bit octets are not permitted in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
687 URLs, the UTF-8 octets are percent-encoded as required by the URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
688 specification [URI-GEN], Section 2.1. Sample code is included in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
689 Appendix A to demonstrate this conversion.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
690
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
691 IMAP user names are UTF-8 strings and MUST be percent-encoded as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
692 required by the URL specification [URI-GEN], Section 2.1.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
693
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
694 Also note that IMAP SEARCH criteria can contain non-US-ASCII
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
695 characters. 8-bit octets in those strings MUST be percent-encoded as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
696 required by the URL specification [URI-GEN], Section 2.1.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
697
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
698 9. Examples
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
699
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
700 The following examples demonstrate how an IMAP4 client program might
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
701 translate various IMAP4 URLs into a series of IMAP4 commands.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
702 Commands sent from the client to the server are prefixed with "C:",
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
703 and responses sent from the server to the client are prefixed with
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
704 "S:".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
705
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
706 The URL:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
707
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
708 <imap://minbari.example.org/gray-council;UIDVALIDITY=385759045/;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
709 UID=20/;PARTIAL=0.1024>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
710
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
711 may result in the following client commands and server responses:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
712
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
713 <connect to minbari.example.org, port 143>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
714 S: * OK [CAPABILITY IMAP4rev1 STARTTLS AUTH=ANONYMOUS] Welcome
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
715 C: A001 AUTHENTICATE ANONYMOUS
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
716 S: +
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
717 C: c2hlcmlkYW5AYmFieWxvbjUuZXhhbXBsZS5vcmc=
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
718 S: A001 OK Welcome sheridan@babylon5.example.org
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
719 C: A002 SELECT gray-council
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
720 <client verifies the UIDVALIDITY matches>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
721 C: A003 UID FETCH 20 BODY.PEEK[]<0.1024>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
722
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
723 The URL:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
724
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
725 <imap://psicorp.example.org/~peter/%E6%97%A5%E6%9C%AC%E8%AA%9E/
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
726 %E5%8F%B0%E5%8C%97>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
727
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
728
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
729
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
730 Melnikov & Newman Standards Track [Page 13]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
731
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
732 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
733
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
734
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
735 may result in the following client commands:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
736
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
737 <connect to psicorp.example.org, port 143>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
738 S: * OK [CAPABILITY IMAP4rev1 STARTTLS AUTH=CRAM-MD5] Welcome
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
739 C: A001 LOGIN ANONYMOUS bester@psycop.psicorp.example.org
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
740 C: A002 SELECT ~peter/&ZeVnLIqe-/&U,BTFw-
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
741 <commands the client uses for viewing the contents of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
742 the mailbox>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
743
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
744 The URL:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
745
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
746 <imap://;AUTH=GSSAPI@minbari.example.org/gray-council/;uid=20/
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
747 ;section=1.2>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
748
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
749 may result in the following client commands:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
750
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
751 <connect to minbari.example.org, port 143>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
752 S: * OK Greetings
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
753 C: A000 CAPABILITY
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
754 S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=GSSAPI
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
755 S: A000 OK
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
756 C: A001 AUTHENTICATE GSSAPI
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
757 <authentication exchange>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
758 C: A002 SELECT gray-council
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
759 C: A003 UID FETCH 20 BODY.PEEK[1.2]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
760
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
761 If the following relative URL is located in that body part:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
762
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
763 <;section=1.4>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
764
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
765 this could result in the following client commands:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
766
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
767 C: A004 UID FETCH 20 (BODY.PEEK[1.2.MIME]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
768 BODY.PEEK[1.MIME]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
769 BODY.PEEK[HEADER.FIELDS (Content-Location)])
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
770 <Client looks for Content-Location headers in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
771 result. If no such headers, then it does the following>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
772 C: A005 UID FETCH 20 BODY.PEEK[1.4]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
773
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
774 The URL:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
775
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
776 <imap://;AUTH=*@minbari.example.org/gray%20council?
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
777 SUBJECT%20shadows>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
778
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
779
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
780
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
781
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
782
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
783
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
784
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
785
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
786 Melnikov & Newman Standards Track [Page 14]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
787
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
788 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
789
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
790
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
791 could result in the following:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
792
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
793 <connect to minbari.example.org, port 143>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
794 S: * OK Welcome
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
795 C: A001 CAPABILITY
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
796 S: * CAPABILITY IMAP4rev1 AUTH=DIGEST-MD5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
797 S: A001 OK
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
798 C: A002 AUTHENTICATE DIGEST-MD5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
799 <authentication exchange>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
800 S: A002 OK user lennier authenticated
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
801 C: A003 SELECT "gray council"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
802 ...
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
803 C: A004 SEARCH SUBJECT shadows
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
804 S: * SEARCH 8 10 13 14 15 16
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
805 S: A004 OK SEARCH completed
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
806 C: A005 FETCH 8,10,13:16 ALL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
807 ...
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
808
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
809 In the example above, the client has implementation-dependent
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
810 choices. The authentication mechanism could be anything, including
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
811 PREAUTH. The final FETCH command could fetch more or less
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
812 information about the messages, depending on what it wishes to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
813 display to the user.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
814
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
815 The URL:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
816
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
817 <imap://john;AUTH=*@minbari.example.org/babylon5/personel?
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
818 charset%20UTF-8%20SUBJECT%20%7B14+%7D%0D%0A%D0%98%D0%B2%
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
819 D0%B0%D0%BD%D0%BE%D0%B2%D0%B0>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
820
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
821 shows that 8-bit data can be sent using non-synchronizing literals
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
822 [LITERAL+]. This could result in the following:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
823
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
824 <connect to minbari.example.org, port 143>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
825 S: * OK Hi there
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
826 C: A001 CAPABILITY
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
827 S: * CAPABILITY IMAP4rev1 LITERAL+ AUTH=DIGEST-MD5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
828 S: A001 OK
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
829 C: A002 AUTHENTICATE DIGEST-MD5
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
830 <authentication exchange>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
831 S: A002 OK user john authenticated
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
832 C: A003 SELECT babylon5/personel
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
833 ...
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
834 C: A004 SEARCH CHARSET UTF-8 SUBJECT {14+}
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
835 C: XXXXXXXXXXXXXX
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
836 S: * SEARCH 7 10 12
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
837 S: A004 OK SEARCH completed
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
838 C: A005 FETCH 7,10,12 ALL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
839
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
840
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
841
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
842 Melnikov & Newman Standards Track [Page 15]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
843
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
844 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
845
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
846
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
847 ...
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
848
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
849 where XXXXXXXXXXXXXX is 14 bytes of UTF-8 encoded data as specified
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
850 in the URL above.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
851
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
852 9.1. Examples of Relative URLs
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
853
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
854 The following absolute-path reference
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
855
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
856 </foo/;UID=20/..>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
857
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
858 is the same as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
859
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
860 </foo>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
861
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
862 That is, both of them reference the mailbox "foo" located on the IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
863 server described by the corresponding Base URI.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
864
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
865 The following relative-path reference
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
866
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
867 <;UID=20>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
868
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
869 references a message with UID in the mailbox specified by the Base
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
870 URI.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
871
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
872 The following edge case example demonstrates that the ;UIDVALIDITY=
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
873 modifier is a part of the mailbox name as far as relative URI
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
874 resolution is concerned:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
875
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
876 <..;UIDVALIDITY=385759045/;UID=20>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
877
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
878 In this example, ".." is not a dot-segment [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
879
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
880 10. Security Considerations
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
881
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
882 Security considerations discussed in the IMAP specification [IMAP4]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
883 and the URI specification [URI-GEN] are relevant. Security
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
884 considerations related to authenticated URLs are discussed in Section
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
885 3.2 of this document.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
886
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
887 Many email clients store the plaintext password for later use after
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
888 logging into an IMAP server. Such clients MUST NOT use a stored
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
889 password in response to an IMAP URL without explicit permission from
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
890 the user to supply that password to the specified host name.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
891
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
892 Clients resolving IMAP URLs that wish to achieve data confidentiality
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
893 and/or integrity SHOULD use the STARTTLS command (if supported by the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
894
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
895
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
896
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
897
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
898 Melnikov & Newman Standards Track [Page 16]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
899
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
900 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
901
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
902
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
903 server) before starting authentication, or use a SASL mechanism, such
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
904 as GSSAPI, that provides a confidentiality security layer.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
905
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
906 10.1. Security Consideration Specific to URLAUTH Authorized URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
907
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
908 The "user+<userid>" <access> identifier limits resolution of that URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
909 to a particular userid, whereas the "submit+<userid>" <access>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
910 identifier is more general and simply requires that the session be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
911 authorized by a user that has been granted a "submit" role within the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
912 authentication system. Use of either of these mechanisms limits the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
913 scope of the URL. An attacker who cannot authenticate using the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
914 appropriate credentials cannot make use of the URL.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
915
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
916 The "authuser" and "anonymous" <access> identifiers do not have this
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
917 level of protection. These access identifiers are primarily useful
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
918 for public export of data from an IMAP server, without requiring that
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
919 it be copied to a web or anonymous FTP server.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
920
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
921 The decision to use the "authuser" <access> identifier should be made
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
922 with caution. An "authuser" <access> identifier can be used by any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
923 authorized user of the IMAP server; therefore, use of this access
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
924 identifier should be limited to content that may be disclosed to any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
925 authorized user of the IMAP server.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
926
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
927 The decision to use the "anonymous" <access> identifier should be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
928 made with extreme caution. An "anonymous" <access> identifier can be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
929 used by anyone; therefore, use of this access identifier should be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
930 limited to content that may be disclosed to anyone.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
931
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
932 11. ABNF for IMAP URL Scheme
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
933
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
934 Formal syntax is defined using ABNF [ABNF], extending the ABNF rules
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
935 in Section 9 of [IMAP4]. Elements not defined here can be found in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
936 [ABNF], [IMAP4], [IMAPABNF], or [URI-GEN]. Strings are not case
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
937 sensitive, and free insertion of linear white space is not permitted.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
938
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
939 sub-delims-sh = "!" / "$" / "'" / "(" / ")" /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
940 "*" / "+" / ","
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
941 ;; Same as [URI-GEN] sub-delims,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
942 ;; but without ";", "&" and "=".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
943
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
944 uchar = unreserved / sub-delims-sh / pct-encoded
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
945
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
946 achar = uchar / "&" / "="
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
947 ;; Same as [URI-GEN] 'unreserved / sub-delims /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
948 ;; pct-encoded', but ";" is disallowed.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
949
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
950 bchar = achar / ":" / "@" / "/"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
951
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
952
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
953
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
954 Melnikov & Newman Standards Track [Page 17]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
955
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
956 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
957
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
958
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
959 enc-auth-type = 1*achar
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
960 ; %-encoded version of [IMAP4] "auth-type"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
961
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
962 enc-mailbox = 1*bchar
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
963 ; %-encoded version of [IMAP4] "mailbox"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
964
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
965 enc-search = 1*bchar
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
966 ; %-encoded version of [IMAPABNF]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
967 ; "search-program". Note that IMAP4
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
968 ; literals may not be used in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
969 ; a "search-program", i.e., only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
970 ; quoted or non-synchronizing
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
971 ; literals (if the server supports
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
972 ; LITERAL+ [LITERAL+]) are allowed.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
973
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
974 enc-section = 1*bchar
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
975 ; %-encoded version of [IMAP4] "section-spec"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
976
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
977 enc-user = 1*achar
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
978 ; %-encoded version of [IMAP4] authorization
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
979 ; identity or "userid".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
980
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
981 imapurl = "imap://" iserver ipath-query
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
982 ; Defines an absolute IMAP URL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
983
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
984 ipath-query = ["/" [ icommand ]]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
985 ; Corresponds to "path-abempty [ "?" query ]"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
986 ; in [URI-GEN]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
987
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
988 Generic syntax for relative URLs is defined in Section 4.2 of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
989 [URI-GEN]. For ease of implementation, the relative IMAP URL syntax
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
990 is defined below:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
991
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
992 imapurl-rel = inetwork-path
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
993
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
994 / iabsolute-path
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
995 / irelative-path
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
996 / ipath-empty
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
997
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
998 inetwork-path = "//" iserver ipath-query
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
999 ; Corresponds to '"//" authority path-abempty
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1000 ; [ "?" query ]' in [URI-GEN]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1001
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1002 iabsolute-path = "/" [ icommand ]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1003 ; icommand, if present, MUST NOT start with '/'.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1004 ;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1005 ; Corresponds to 'path-absolute [ "?" query ]'
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1006 ; in [URI-GEN]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1008
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1009
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1010 Melnikov & Newman Standards Track [Page 18]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1011
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1012 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1013
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1014
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1015 irelative-path = imessagelist /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1016 imsg-or-part
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1017 ; Corresponds to 'path-noscheme [ "?" query ]'
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1018 ; in [URI-GEN]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1019
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1020 imsg-or-part = ( imailbox-ref "/" iuid-only ["/" isection-only]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1021 ["/" ipartial-only] ) /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1022 ( iuid-only ["/" isection-only]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1023 ["/" ipartial-only] ) /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1024 ( isection-only ["/" ipartial-only] ) /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1025 ipartial-only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1026
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1027 ipath-empty = 0<pchar>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1028 ; Zero characters.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1029 ; The same-document reference.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1030
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1031 The following three rules are only used in the presence of the IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1032 [URLAUTH] extension:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1033
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1034 authimapurl = "imap://" iserver "/" imessagepart
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1035 ; Same as "imapurl" when "[icommand]" is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1036 ; "imessagepart"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1037
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1038 authimapurlfull = authimapurl iurlauth
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1039 ; Same as "imapurl" when "[icommand]" is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1040 ; "imessagepart iurlauth"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1041
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1042 authimapurlrump = authimapurl iurlauth-rump
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1043
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1044
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1045 enc-urlauth = 32*HEXDIG
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1046
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1047 iurlauth = iurlauth-rump iua-verifier
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1048
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1049 iua-verifier = ":" uauth-mechanism ":" enc-urlauth
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1050
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1051 iurlauth-rump = [expire] ";URLAUTH=" access
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1052
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1053 access = ("submit+" enc-user) / ("user+" enc-user) /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1054 "authuser" / "anonymous"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1055
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1056 expire = ";EXPIRE=" date-time
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1057 ; date-time is defined in [DATETIME]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1058
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1059 uauth-mechanism = "INTERNAL" / 1*(ALPHA / DIGIT / "-" / ".")
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1060 ; Case-insensitive.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1061 ; New mechanisms MUST be registered with IANA.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1062
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1063
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1064
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1065
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1066 Melnikov & Newman Standards Track [Page 19]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1067
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1068 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1069
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1070
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1071 iauth = ";AUTH=" ( "*" / enc-auth-type )
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1072
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1073 icommand = imessagelist /
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1074 imessagepart [iurlauth]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1075
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1076 imailbox-ref = enc-mailbox [uidvalidity]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1077
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1078 imessagelist = imailbox-ref [ "?" enc-search ]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1079 ; "enc-search" is [URI-GEN] "query".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1080
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1081 imessagepart = imailbox-ref iuid [isection] [ipartial]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1082
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1083 ipartial = "/" ipartial-only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1084
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1085 ipartial-only = ";PARTIAL=" partial-range
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1086
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1087 isection = "/" isection-only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1088
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1089 isection-only = ";SECTION=" enc-section
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1090
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1091 iserver = [iuserinfo "@"] host [ ":" port ]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1092 ; This is the same as "authority" defined
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1093 ; in [URI-GEN]. See [URI-GEN] for "host"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1094 ; and "port" definitions.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1095
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1096 iuid = "/" iuid-only
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1097
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1098 iuid-only = ";UID=" nz-number
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1099 ; See [IMAP4] for "nz-number" definition
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1100
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1101 iuserinfo = enc-user [iauth] / [enc-user] iauth
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1102 ; conforms to the generic syntax of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1103 ; "userinfo" as defined in [URI-GEN].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1104
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1105 partial-range = number ["." nz-number]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1106 ; partial FETCH. The first number is
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1107 ; the offset of the first byte,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1108 ; the second number is the length of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1109 ; the fragment.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1110
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1111 uidvalidity = ";UIDVALIDITY=" nz-number
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1112 ; See [IMAP4] for "nz-number" definition
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1113
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1114
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1115
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1116
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1117
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1118
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1119
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1120
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1121
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1122 Melnikov & Newman Standards Track [Page 20]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1123
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1124 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1125
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1126
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1127 12. IANA Considerations
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1128
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1129 IANA has updated the "imap" definition in the "Uniform Resource
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1130 Identifier scheme registry" to point to this document.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1131
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1132 The registration template (as per [URI-REG]) is specified in Section
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1133 12.1 of this document.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1134
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1135 12.1. IANA Registration of imap: URI Scheme
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1136
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1137 This section provides the information required to register the imap:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1138 URI scheme.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1139
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1140 URI scheme name: imap
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1141
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1142 Status: permanent
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1143
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1144 URI scheme syntax:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1145
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1146 See Section 11 of [RFC5092].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1147
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1148 URI scheme semantics:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1149
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1150 The imap: URI scheme is used to designate IMAP servers, mailboxes,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1151 messages, MIME bodies [MIME] and their parts, and search programs
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1152 on Internet hosts accessible using the IMAP protocol.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1153
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1154 There is no MIME type associated with this URI.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1155
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1156 Encoding considerations:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1157
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1158 See Section 8 of [RFC5092].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1159
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1160 Applications/protocols that use this URI scheme name:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1161
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1162 The imap: URI is intended to be used by applications that might
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1163 need access to an IMAP mailstore. Such applications may include
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1164 (but are not limited to) IMAP-capable web browsers; IMAP clients
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1165 that wish to access a mailbox, message, or edit a message on the
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1166 server using [CATENATE]; [SUBMIT] clients and servers that are
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1167 requested to assemble a complete message on submission using
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1168 [BURL].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1169
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1170 Interoperability considerations:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1171
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1172 A widely deployed IMAP client Netscape Mail (and possibly
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1173 Mozilla/Thunderbird/Seamonkey) uses a different imap: scheme
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1174 internally.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1175
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1176
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1177
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1178 Melnikov & Newman Standards Track [Page 21]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1179
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1180 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1181
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1182
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1183 Security considerations:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1184
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1185 See Security Considerations (Section 10) of [RFC5092].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1186
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1187 Contact:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1188
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1189 Alexey Melnikov <alexey.melnikov@isode.com>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1190
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1191 Author/Change controller:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1192
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1193 IESG
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1194
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1195 References:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1196
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1197 [RFC5092] and [IMAP4].
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1198
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1199 13. References
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1200
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1201 13.1. Normative References
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1202
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1203 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1204 Requirement Levels", BCP 14, RFC 2119, March 1997.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1205
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1206 [IMAP4] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1207 4rev1", RFC 3501, March 2003.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1208
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1209 [IMAPABNF] Melnikov, A. and C. Daboo, "Collected Extensions to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1210 IMAP4 ABNF", RFC 4466, April 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1211
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1212 [ABNF] Crocker, D., Ed., and P. Overell, "Augmented BNF for
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1213 Syntax Specifications: ABNF", RFC 4234, October 2005.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1214
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1215 [MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1216 Extensions (MIME) Part One: Format of Internet Message
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1217 Bodies", RFC 2045, November 1996.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1218
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1219 [URI-GEN] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1220 Resource Identifier (URI): Generic Syntax", STD 66, RFC
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1221 3986, January 2005.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1222
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1223 [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1224 10646", STD 63, RFC 3629, November 2003.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1225
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1226 [NAMESPACE] Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1227 May 1998.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1228
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1229 [LITERAL+] Myers, J., "IMAP4 non-synchronizing literals", RFC 2088,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1230 January 1997.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1231
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1232
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1233
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1234 Melnikov & Newman Standards Track [Page 22]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1235
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1236 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1237
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1238
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1239 [ANONYMOUS] Zeilenga, K., "Anonymous Simple Authentication and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1240 Security Layer (SASL) Mechanism", RFC 4505, June 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1241
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1242 [DATETIME] Klyne, G. and C. Newman, "Date and Time on the Internet:
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1243 Timestamps", RFC 3339, July 2002.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1244
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1245 [URLAUTH] Crispin, M., "Internet Message Access Protocol (IMAP) -
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1246 URLAUTH Extension", RFC 4467, May 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1247
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1248 13.2. Informative References
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1249
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1250 [SUBMIT] Gellens, R. and J. Klensin, "Message Submission for
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1251 Mail", RFC 4409, April 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1252
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1253 [BURL] Newman, C., "Message Submission BURL Extension", RFC
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1254 4468, May 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1255
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1256 [CATENATE] Resnick, P., "Internet Message Access Protocol (IMAP)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1257 CATENATE Extension", RFC 4469, April 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1258
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1259 [SASL] Melnikov, A., Ed., and K. Zeilenga, Ed., "Simple
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1260 Authentication and Security Layer (SASL)", RFC 4422,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1261 June 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1262
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1263 [GSSAPI] Melnikov, A., Ed., "The Kerberos V5 ("GSSAPI") Simple
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1264 Authentication and Security Layer (SASL) Mechanism", RFC
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1265 4752, November 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1266
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1267 [DIGEST-MD5] Leach, P. and C. Newman, "Using Digest Authentication as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1268 a SASL Mechanism", RFC 2831, May 2000.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1269
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1270 [URI-REG] Hansen, T., Hardie, T., and L. Masinter, "Guidelines and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1271 Registration Procedures for New URI Schemes", BCP 115,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1272 RFC 4395, February 2006.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1273
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1274
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1275
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1276
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1277
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1278
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1279
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1280
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1281
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1282
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1283
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1284
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1285
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1286
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1287
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1288
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1289
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1290 Melnikov & Newman Standards Track [Page 23]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1291
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1292 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1293
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1294
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1295 Appendix A. Sample Code
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1296
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1297 Here is sample C source code to convert between URL paths and IMAP
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1298 mailbox names, taking into account mapping between IMAP's modified
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1299 UTF-7 [IMAP4] and hex-encoded UTF-8, which is more appropriate for
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1300 URLs. This code has not been rigorously tested nor does it
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1301 necessarily behave reasonably with invalid input, but it should serve
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1302 as a useful example. This code just converts the mailbox portion of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1303 the URL and does not deal with parameters, query, or server
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1304 components of the URL.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1305
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1306 /* Copyright (C) The IETF Trust (2007). This version of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1307 sample C code is part of RFC XXXX; see the RFC itself
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1308 for full legal notices.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1309
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1310 Regarding this sample C code (or any portion of it), the authors
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1311 make no guarantees and are not responsible for any damage
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1312 resulting from its use. The authors grant irrevocable permission
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1313 to anyone to use, modify, and distribute it in any way that does
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1314 not diminish the rights of anyone else to use, modify, and
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1315 distribute it, provided that redistributed derivative works do
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1316 not contain misleading author or version information.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1317
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1318 Derivative works need not be licensed under similar terms.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1319 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1320
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1321 #include <stdio.h>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1322 #include <string.h>
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1323
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1324 /* hexadecimal lookup table */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1325 static const char hex[] = "0123456789ABCDEF";
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1326
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1327 #define XX 127
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1328 /*
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1329 * Table for decoding hexadecimal in %encoding
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1330 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1331 static const char index_hex[256] = {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1332 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1333 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1334 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1335 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1336 XX,10,11,12, 13,14,15,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1337 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1338 XX,10,11,12, 13,14,15,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1339 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1340 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1341 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1342 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1343
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1344
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1345
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1346 Melnikov & Newman Standards Track [Page 24]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1347
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1348 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1349
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1350
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1351 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1352 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1353 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1354 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1355 XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX, XX,XX,XX,XX,
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1356 };
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1357 #define HEXCHAR(c) (index_hex[(unsigned char)(c)])
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1358
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1359 /* "gen-delims" excluding "/" but including "%" */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1360 #define GENERAL_DELIMS_NO_SLASH ":?#[]@" "%"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1361
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1362 /* "gen-delims" (excluding "/", but including "%")
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1363 plus subset of "sub-delims" */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1364 #define GENERAL_UNSAFE_NO_SLASH GENERAL_DELIMS_NO_SLASH ";&=+"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1365 #define OTHER_UNSAFE " \"<>\\^`{|}"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1366
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1367 /* URL unsafe printable characters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1368 static const char mailbox_url_unsafe[] = GENERAL_UNSAFE_NO_SLASH
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1369 OTHER_UNSAFE;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1370
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1371 /* UTF7 modified base64 alphabet */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1372 static const char base64chars[] =
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1373 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,";
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1374
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1375 #define UNDEFINED 64
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1376
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1377 /* UTF16 definitions */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1378 #define UTF16MASK 0x03FFUL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1379 #define UTF16SHIFT 10
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1380 #define UTF16BASE 0x10000UL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1381 #define UTF16HIGHSTART 0xD800UL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1382 #define UTF16HIGHEND 0xDBFFUL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1383 #define UTF16LOSTART 0xDC00UL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1384 #define UTF16LOEND 0xDFFFUL
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1385
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1386 /* Convert an IMAP mailbox to a URL path
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1387 * dst needs to have roughly 4 times the storage space of src
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1388 * Hex encoding can triple the size of the input
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1389 * UTF-7 can be slightly denser than UTF-8
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1390 * (worst case: 8 octets UTF-7 becomes 9 octets UTF-8)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1391 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1392 void MailboxToURL(char *dst, char *src)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1393 {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1394 unsigned char c, i, bitcount;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1395 unsigned long ucs4, utf16, bitbuf;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1396 unsigned char base64[256], utf8[6];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1397
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1398 /* initialize modified base64 decoding table */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1399
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1400
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1401
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1402 Melnikov & Newman Standards Track [Page 25]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1403
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1404 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1405
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1406
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1407 memset(base64, UNDEFINED, sizeof (base64));
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1408 for (i = 0; i < sizeof (base64chars); ++i) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1409 base64[(int) base64chars[i]] = i;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1410 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1411
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1412 /* loop until end of string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1413 while (*src != '\0') {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1414 c = *src++;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1415 /* deal with literal characters and &- */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1416 if (c != '&' || *src == '-') {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1417 /* NB: There are no "URL safe" characters after the '~' */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1418 if (c < ' ' || c > '~' ||
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1419 strchr(mailbox_url_unsafe, c) != NULL) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1420 /* hex encode if necessary */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1421 dst[0] = '%';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1422 dst[1] = hex[c >> 4];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1423 dst[2] = hex[c & 0x0f];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1424 dst += 3;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1425 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1426 /* encode literally */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1427 *dst++ = c;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1428 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1429 /* skip over the '-' if this is an &- sequence */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1430 if (c == '&') ++src;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1431
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1432 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1433 /* convert modified UTF-7 -> UTF-16 -> UCS-4 -> UTF-8 -> HEX */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1434 bitbuf = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1435 bitcount = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1436 ucs4 = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1437 while ((c = base64[(unsigned char) *src]) != UNDEFINED) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1438 ++src;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1439 bitbuf = (bitbuf << 6) | c;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1440 bitcount += 6;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1441 /* enough bits for a UTF-16 character? */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1442 if (bitcount >= 16) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1443 bitcount -= 16;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1444 utf16 = (bitcount ? bitbuf >> bitcount
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1445 : bitbuf) & 0xffff;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1446 /* convert UTF16 to UCS4 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1447 if
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1448 (utf16 >= UTF16HIGHSTART && utf16 <= UTF16HIGHEND) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1449 ucs4 = (utf16 - UTF16HIGHSTART) << UTF16SHIFT;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1450 continue;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1451 } else if
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1452 (utf16 >= UTF16LOSTART && utf16 <= UTF16LOEND) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1453 ucs4 += utf16 - UTF16LOSTART + UTF16BASE;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1454 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1455
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1456
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1457
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1458 Melnikov & Newman Standards Track [Page 26]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1459
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1460 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1461
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1462
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1463 ucs4 = utf16;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1464 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1465 /* convert UTF-16 range of UCS4 to UTF-8 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1466 if (ucs4 <= 0x7fUL) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1467 utf8[0] = (unsigned char) ucs4;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1468 i = 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1469 } else if (ucs4 <= 0x7ffUL) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1470 utf8[0] = 0xc0 | (unsigned char) (ucs4 >> 6);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1471 utf8[1] = 0x80 | (unsigned char) (ucs4 & 0x3f);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1472 i = 2;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1473 } else if (ucs4 <= 0xffffUL) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1474 utf8[0] = 0xe0 | (unsigned char) (ucs4 >> 12);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1475 utf8[1] = 0x80 | (unsigned char) ((ucs4 >> 6) & 0x3f);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1476 utf8[2] = 0x80 | (unsigned char) (ucs4 & 0x3f);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1477 i = 3;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1478 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1479 utf8[0] = 0xf0 | (unsigned char) (ucs4 >> 18);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1480 utf8[1] = 0x80 | (unsigned char) ((ucs4 >> 12) & 0x3f);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1481 utf8[2] = 0x80 | (unsigned char) ((ucs4 >> 6) & 0x3f);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1482 utf8[3] = 0x80 | (unsigned char) (ucs4 & 0x3f);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1483 i = 4;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1484 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1485 /* convert utf8 to hex */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1486 for (c = 0; c < i; ++c) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1487 dst[0] = '%';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1488 dst[1] = hex[utf8[c] >> 4];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1489 dst[2] = hex[utf8[c] & 0x0f];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1490 dst += 3;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1491 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1492 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1493 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1494 /* skip over trailing '-' in modified UTF-7 encoding */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1495 if (*src == '-') ++src;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1496 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1497 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1498 /* terminate destination string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1499 *dst = '\0';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1500 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1501
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1502 /* Convert hex coded UTF-8 URL path to modified UTF-7 IMAP mailbox
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1503 * dst should be about twice the length of src to deal with non-hex
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1504 * coded URLs
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1505 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1506 int URLtoMailbox(char *dst, char *src)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1507 {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1508 unsigned int utf8pos = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1509 unsigned int utf8total, i, c, utf7mode, bitstogo, utf16flag;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1510 unsigned long ucs4 = 0, bitbuf = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1511
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1512
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1513
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1514 Melnikov & Newman Standards Track [Page 27]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1515
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1516 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1517
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1518
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1519 utf7mode = 0; /* is the output UTF7 currently in base64 mode? */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1520 utf8total = 0; /* how many octets is the current input UTF-8 char;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1521 0 == between characters */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1522 bitstogo = 0; /* bits that need to be encoded into base64; if
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1523 bitstogo != 0 then utf7mode == 1 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1524 while ((c = (unsigned char)*src) != '\0') {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1525 ++src;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1526 /* undo hex-encoding */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1527 if (c == '%' && src[0] != '\0' && src[1] != '\0') {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1528 c = HEXCHAR(src[0]);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1529 i = HEXCHAR(src[1]);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1530 if (c == XX || i == XX) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1531 return 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1532 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1533 c = (char)((c << 4) | i);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1534 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1535 src += 2;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1536 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1537 /* normal character? */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1538 if (c >= ' ' && c <= '~') {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1539 /* switch out of UTF-7 mode */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1540 if (utf7mode) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1541 if (bitstogo) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1542 *dst++ = base64chars[(bitbuf << (6 - bitstogo)) & 0x3F];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1543 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1544 *dst++ = '-';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1545 utf7mode = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1546 bitstogo = bitbuf = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1547 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1548 *dst++ = c;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1549 /* encode '&' as '&-' */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1550 if (c == '&') {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1551 *dst++ = '-';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1552 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1553 continue;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1554 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1555 /* switch to UTF-7 mode */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1556 if (!utf7mode) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1557 *dst++ = '&';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1558 utf7mode = 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1559 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1560 /* Encode US-ASCII characters as themselves */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1561 if (c < 0x80) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1562 ucs4 = c;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1563 utf8total = 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1564 } else if (utf8total) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1565 /* this is a subsequent octet of a multi-octet character */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1566 /* save UTF8 bits into UCS4 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1567
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1568
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1569
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1570 Melnikov & Newman Standards Track [Page 28]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1571
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1572 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1573
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1574
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1575 ucs4 = (ucs4 << 6) | (c & 0x3FUL);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1576 if (++utf8pos < utf8total) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1577 continue;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1578 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1579 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1580 /* this is the first octet of a multi-octet character */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1581 utf8pos = 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1582 if (c < 0xE0) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1583 utf8total = 2;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1584 ucs4 = c & 0x1F;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1585 } else if (c < 0xF0) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1586 utf8total = 3;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1587 ucs4 = c & 0x0F;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1588 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1589 /* NOTE: can't convert UTF8 sequences longer than 4 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1590 utf8total = 4;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1591 ucs4 = c & 0x03;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1592 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1593 continue;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1594 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1595 /* Finished with UTF-8 character. Make sure it isn't an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1596 overlong sequence. If it is, return failure. */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1597 if ((ucs4 < 0x80 && utf8total > 1) ||
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1598 (ucs4 < 0x0800 && utf8total > 2) ||
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1599 (ucs4 < 0x00010000 && utf8total > 3) ||
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1600 (ucs4 < 0x00200000 && utf8total > 4) ||
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1601 (ucs4 < 0x04000000 && utf8total > 5) ||
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1602 (ucs4 < 0x80000000 && utf8total > 6)) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1603 return 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1604 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1605 /* loop to split ucs4 into two utf16 chars if necessary */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1606 utf8total = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1607 do {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1608 if (ucs4 >= UTF16BASE) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1609 ucs4 -= UTF16BASE;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1610 bitbuf = (bitbuf << 16) | ((ucs4 >> UTF16SHIFT)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1611 + UTF16HIGHSTART);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1612 ucs4 = (ucs4 & UTF16MASK) + UTF16LOSTART;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1613 utf16flag = 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1614 } else {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1615 bitbuf = (bitbuf << 16) | ucs4;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1616 utf16flag = 0;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1617 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1618 bitstogo += 16;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1619 /* spew out base64 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1620 while (bitstogo >= 6) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1621 bitstogo -= 6;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1622 *dst++ = base64chars[(bitstogo ? (bitbuf >> bitstogo)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1623
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1624
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1625
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1626 Melnikov & Newman Standards Track [Page 29]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1627
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1628 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1629
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1630
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1631 : bitbuf)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1632 & 0x3F];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1633 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1634 } while (utf16flag);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1635 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1636 /* if in UTF-7 mode, finish in ASCII */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1637 if (utf7mode) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1638 if (bitstogo) {
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1639 *dst++ = base64chars[(bitbuf << (6 - bitstogo)) & 0x3F];
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1640 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1641 *dst++ = '-';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1642 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1643 /* tie off string */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1644 *dst = '\0';
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1645 return 1;
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1646 }
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1647
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1648 Appendix B. List of Changes since RFC 2192
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1649
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1650 Updated boilerplate, list of editor's, etc.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1651 Updated references.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1652 Updated ABNF not to use _, to use SP instead of SPACE, etc.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1653 Updated example domains to use example.org.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1654 Fixed ABNF error in "imessagelist" non-terminal.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1655 Updated ABNF, due to changes in RFC 3501, RFC 4466, and RFC 3986.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1656 Renamed "iuserauth" non-terminal to <iuserinfo>.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1657 Clarified that the userinfo component describes both authorization
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1658 identity and mailbox naming scope.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1659 Allow for non-synchronizing literals in "enc-search".
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1660 Added "ipartial" specifier that denotes a partial FETCH.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1661 Moved URLAUTH text from RFC 4467 to this document.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1662 Updated ABNF for the whole server to allow missing trailing "/"
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1663 (e.g., "imap://imap.example.com" is now valid and is the same as
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1664 "imap://imap.example.com/").
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1665 Clarified how relative-path references are constructed.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1666 Added more examples demonstrating relative-path references.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1667 Added rules for relative URLs and restructured ABNF as the result.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1668 Removed text on use of relative URLs in MHTML.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1669 Added examples demonstrating security considerations when resolving
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1670 URLs.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1671 Recommend usage of STARTTLS/SASL security layer to protect
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1672 confidential data.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1673 Removed some advices about connection reuse that were incorrect.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1674 Removed URLs referencing a list of mailboxes, as this feature
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1675 hasn't seen any deployments.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1676 Clarified that user name "anonymous" is case-insensitive.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1677
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1678
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1679
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1680
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1681
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1682 Melnikov & Newman Standards Track [Page 30]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1683
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1684 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1685
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1686
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1687 Appendix C. List of Changes since RFC 4467
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1688
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1689 Renamed <mechanism> to <uauth-mechanism>. Restructured ABNF.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1690
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1691 Appendix D. Acknowledgments
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1692
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1693 Text describing URLAUTH was lifted from [URLAUTH] by Mark Crispin.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1694
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1695 Stephane H. Maes contributed some ideas to this document; he also
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1696 co-edited early versions of this document.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1697
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1698 The editors would like to thank Mark Crispin, Ken Murchison, Ted
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1699 Hardie, Zoltan Ordogh, Dave Cridland, Kjetil Torgrim Homme, Lisa
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1700 Dusseault, Spencer Dawkins, Filip Navara, Shawn M. Emery, Sam
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1701 Hartman, Russ Housley, and Lars Eggert for the time they devoted to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1702 reviewing this document and/or for the comments received.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1703
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1704 Authors' Addresses
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1705
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1706 Chris Newman (Author/Editor)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1707 Sun Microsystems
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1708 3401 Centrelake Dr., Suite 410
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1709 Ontario, CA 91761
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1710 EMail: chris.newman@sun.com
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1711
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1712 Alexey Melnikov (Editor)
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1713 Isode Limited
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1714 5 Castle Business Village
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1715 36 Station Road
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1716 Hampton, Middlesex
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1717 TW12 2BX, UK
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1718 EMail: Alexey.Melnikov@isode.com
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1719 URI: http://www.melnikov.ca/
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1720
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1721
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1722
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1723
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1724
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1725
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1726
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1727
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1728
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1729
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1730
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1731
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1732
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1733
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1734
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1735
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1736
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1737
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1738 Melnikov & Newman Standards Track [Page 31]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1739
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1740 RFC 5092 IMAP URL Scheme November 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1741
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1742
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1743 Full Copyright Statement
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1744
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1745 Copyright (C) The IETF Trust (2007).
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1746
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1747 This document is subject to the rights, licenses and restrictions
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1748 contained in BCP 78, and except as set forth therein, the authors
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1749 retain all their rights.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1750
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1751 This document and the information contained herein are provided on an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1752 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1753 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1754 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1755 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1756 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1757 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1758
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1759 Intellectual Property
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1760
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1761 The IETF takes no position regarding the validity or scope of any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1762 Intellectual Property Rights or other rights that might be claimed to
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1763 pertain to the implementation or use of the technology described in
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1764 this document or the extent to which any license under such rights
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1765 might or might not be available; nor does it represent that it has
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1766 made any independent effort to identify any such rights. Information
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1767 on the procedures with respect to rights in RFC documents can be
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1768 found in BCP 78 and BCP 79.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1769
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1770 Copies of IPR disclosures made to the IETF Secretariat and any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1771 assurances of licenses to be made available, or the result of an
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1772 attempt made to obtain a general license or permission for the use of
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1773 such proprietary rights by implementers or users of this
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1774 specification can be obtained from the IETF on-line IPR repository at
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1775 http://www.ietf.org/ipr.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1776
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1777 The IETF invites any interested party to bring to its attention any
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1778 copyrights, patents or patent applications, or other proprietary
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1779 rights that may cover technology that may be required to implement
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1780 this standard. Please address the information to the IETF at
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1781 ietf-ipr@ietf.org.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1782
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1783
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1784
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1785
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1786
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1787
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1788
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1789
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1790
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1791
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1792
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1793
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1794 Melnikov & Newman Standards Track [Page 32]
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1795

yatex.org