imapext-2007

view docs/rfc/rfc5032.txt @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line source
7 Network Working Group E. Burger, Ed.
8 Request for Comments: 5032 BEA Systems, Inc.
9 Updates: 3501 September 2007
10 Category: Standards Track
13 WITHIN Search Extension to the IMAP Protocol
15 Status of This Memo
17 This document specifies an Internet standards track protocol for the
18 Internet community, and requests discussion and suggestions for
19 improvements. Please refer to the current edition of the "Internet
20 Official Protocol Standards" (STD 1) for the standardization state
21 and status of this protocol. Distribution of this memo is unlimited.
23 Abstract
25 This document describes the WITHIN extension to IMAP SEARCH. IMAP
26 SEARCH returns messages whose internal date is within or outside a
27 specified interval. The mechanism described here, OLDER and YOUNGER,
28 differs from BEFORE and SINCE in that the client specifies an
29 interval, rather than a date. WITHIN is useful for persistent
30 searches where either the device does not have the capacity to
31 perform the search at regular intervals or the network is of limited
32 bandwidth and thus there is a desire to reduce network traffic from
33 sending repeated requests and redundant responses.
35 1. Introduction
37 This extension exposes two new search keys, OLDER and YOUNGER, each
38 of which takes a non-zero integer argument corresponding to a time
39 interval in seconds. The server calculates the time of interest by
40 subtracting the time interval the client presents from the current
41 date and time of the server. The server then either returns messages
42 older or younger than the resultant time and date, depending on the
43 search key used.
45 1.1. Conventions Used in This Document
47 In examples, "C:" and "S:" indicate lines sent by the client and
48 server, respectively.
50 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
51 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
52 document are to be interpreted as described in RFC 2119 [RFC2119].
58 Burger Standards Track [Page 1]
60 RFC 5032 Search Within September 2007
63 When describing the general syntax, we omit some definitions, as RFC
64 3501 [RFC3501] defines them.
66 2. Protocol Operation
68 An IMAP4 server that supports the capability described here MUST
69 return "WITHIN" as one of the server supported capabilities in the
70 CAPABILITY command.
72 For both the OLDER and YOUNGER search keys, the server calculates a
73 target date and time by subtracting the interval, specified in
74 seconds, from the current date and time of the server. The server
75 then compares the target time with the INTERNALDATE of the message,
76 as specified in IMAP [RFC3501]. For OLDER, messages match if the
77 INTERNALDATE is less recent than or equal to the target time. For
78 YOUNGER, messages match if the INTERNALDATE is more recent than or
79 equal to the target time.
81 Both OLDER and YOUNGER searches always result in exact matching, to
82 the resolution of a second. However, if one is doing a dynamic
83 evaluation, for example, in a context [CONTEXT], one needs to be
84 aware that the server might perform the evaluation periodically.
85 Thus, the server may delay the updates. Clients MUST be aware that
86 dynamic search results may not reflect the current state of the
87 mailbox. If the client needs a search result that reflects the
88 current state of the mailbox, we RECOMMEND that the client issue a
89 new search.
91 3. Formal Syntax
93 The following syntax specification uses the Augmented Backus-Naur
94 Form (ABNF) notation. Elements not defined here can be found in the
95 formal syntax of ABNF [RFC4234] and IMAP [RFC3501].
97 This document extends RFC 3501 [RFC3501] with two new search keys:
98 OLDER <interval> and YOUNGER <interval>.
100 search-key =/ ( "OLDER" / "YOUNGER" ) SP nz-number
101 ; search-key defined in RFC 3501
103 4. Example
105 C: a1 SEARCH UNSEEN YOUNGER 259200
106 S: a1 * SEARCH 4 8 15 16 23 42
108 Search for all unseen messages within the past 3 days, or 259200
109 seconds, according to the server's current time.
114 Burger Standards Track [Page 2]
116 RFC 5032 Search Within September 2007
119 5. Security Considerations
121 The WITHIN extension does not raise any security considerations that
122 are not present in the base protocol. Considerations are the same as
123 for IMAP [RFC3501].
125 6. IANA Considerations
127 Per the IMAP RFC [RFC3501], registration of a new IMAP capability in
128 the IMAP Capability registry requires the publication of a standards-
129 track RFC or an IESG approved experimental RFC. The registry is
130 currently located at
131 <http://www.iana.org/assignments/imap4-capabilities>. This
132 standards-track document defines the WITHIN IMAP capability. IANA
133 has added this extension to the IANA IMAP Capability registry.
135 7. References
137 7.1. Normative References
139 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
140 Requirement Levels", RFC 2119, BCP 14, March 1997.
142 [RFC3501] Crispin, M., "Internet Message Access Protocol - Version
143 4rev1", RFC 3501, March 2003.
145 [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
146 Specifications: ABNF", RFC 4234, October 2005.
148 7.2. Informative References
150 [CONTEXT] Melnikov, D. and C. King, "Contexts for IMAP4", Work
151 in Progress, May 2006.
170 Burger Standards Track [Page 3]
172 RFC 5032 Search Within September 2007
175 Appendix A. Contributors
177 Stephane Maes and Ray Cromwell wrote the original version of this
178 document as part of P-IMAP, as well as the first versions for the
179 IETF. From an attribution perspective, they are clearly authors.
181 Appendix B. Acknowledgements
183 The authors want to thank all who have contributed key insight and
184 who have extensively reviewed and discussed the concepts of LPSEARCH.
185 They also thank the authors of its early introduction in P-IMAP.
187 We also want to give a special thanks to Arnt Gilbrandsen, Ken
188 Murchison, Zoltan Ordogh, and most especially Dave Cridland for their
189 review and suggestions. A special thank you goes to Alexey Melnikov
190 for his choice submission of text.
192 Author's Address
194 Eric W. Burger (editor)
195 BEA Systems, Inc.
196 USA
198 EMail: eric.burger@bea.com
199 URI: http://www.standardstrack.com
226 Burger Standards Track [Page 4]
228 RFC 5032 Search Within September 2007
231 Full Copyright Statement
233 Copyright (C) The IETF Trust (2007).
235 This document is subject to the rights, licenses and restrictions
236 contained in BCP 78, and except as set forth therein, the authors
237 retain all their rights.
239 This document and the information contained herein are provided on an
240 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
241 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
242 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
243 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
244 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
245 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
247 Intellectual Property
249 The IETF takes no position regarding the validity or scope of any
250 Intellectual Property Rights or other rights that might be claimed to
251 pertain to the implementation or use of the technology described in
252 this document or the extent to which any license under such rights
253 might or might not be available; nor does it represent that it has
254 made any independent effort to identify any such rights. Information
255 on the procedures with respect to rights in RFC documents can be
256 found in BCP 78 and BCP 79.
258 Copies of IPR disclosures made to the IETF Secretariat and any
259 assurances of licenses to be made available, or the result of an
260 attempt made to obtain a general license or permission for the use of
261 such proprietary rights by implementers or users of this
262 specification can be obtained from the IETF on-line IPR repository at
263 http://www.ietf.org/ipr.
265 The IETF invites any interested party to bring to its attention any
266 copyrights, patents or patent applications, or other proprietary
267 rights that may cover technology that may be required to implement
268 this standard. Please address the information to the IETF at
269 ietf-ipr@ietf.org.
282 Burger Standards Track [Page 5]

UW-IMAP'd extensions by yuuji