RFC 5032
WITHIN Search Extension to the IMAP Protocol
RFC 5032: WITHIN Search Extension to the IMAP Protocol ๐
Okay bestie, here's the deets ๐
- Network Working Group ๐ธ
- RFC number: 5032
- Editor: Eric W. Burger (BEA Systems, Inc.) โจ
- Category: Standards Track ๐ฅ
- Date: September 2007 ๐
- Updates: RFC 3501 [RFC3501] ๐
- Obsoletes: none listed in the title block ๐ง
Status of This Memo
Okay so this doc is a standards track protocol for the whole Internet community, and it's basically asking everyone to weigh in with discussion and suggestions ๐ซถ. If you want to know where it stands officially, check the current edition of "Internet Official Protocol Standards" (STD 1) ๐. Distribution of this memo is unlimited, so share away ๐ฆ.
Abstract
So WITHIN is an extension to IMAP SEARCH ๐. Normal IMAP SEARCH gives you messages whose internal date is within or outside a range, but the new OLDER and YOUNGER keys are different from BEFORE and SINCE because the client picks an interval instead of a date ๐. This is clutch for persistent searches, especially when the device can't run searches at regular intervals, or when the network has limited bandwidth and you want to stop sending the same requests and getting the same responses over and over ๐โจ.
1. Introduction โจ
This extension adds two new search keys, OLDER and YOUNGER ๐ง. Each one takes a non-zero integer, which is a time interval in seconds โฑ๏ธ. The server works out the time of interest by subtracting the client's interval from its own current date and time ๐ซถ. Then it returns messages that are older or younger than that result, depending on which key you used ๐ .
1.1. Conventions Used in This Document
In examples, "C:" means lines from the client and "S:" means lines from the server ๐ฌ.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119] ๐ฅ.
When describing the general syntax, we skip some definitions, since RFC 3501 [RFC3501] already defines them ๐.
2. Protocol Operation ๐
An IMAP4 server that supports this capability MUST return "WITHIN" as one of its supported capabilities in the CAPABILITY command ๐.
For both OLDER and YOUNGER, the server works out a target date and time by subtracting the interval (in seconds) from its current date and time โฐ. Then it compares that target with the INTERNALDATE of each message, as IMAP [RFC3501] specifies ๐ฆ. For OLDER, a message matches if its INTERNALDATE is less recent than or equal to the target time ๐. For YOUNGER, a message matches if its INTERNALDATE is more recent than or equal to the target time โจ.
Both OLDER and YOUNGER searches always give exact matches, down to the second โฑ๏ธ. But if you're doing dynamic evaluation, like in a context [CONTEXT], keep in mind that the server might only evaluate periodically ๐. So the server may delay updates. Clients MUST be aware that dynamic search results may not reflect the current state of the mailbox ๐ญ. If the client needs a result that's up to date with the mailbox, we RECOMMEND that the client issue a new search ๐ซถ.
3. Formal Syntax ๐ง
The syntax below is written in Augmented Backus-Naur Form (ABNF) notation ๐. Anything not defined here can be found in the formal syntax of ABNF [RFC4234] and IMAP [RFC3501] ๐.
This document extends RFC 3501 [RFC3501] with two new search keys: OLDER <interval> and YOUNGER <interval> ๐.
search-key =/ ( "OLDER" / "YOUNGER" ) SP nz-number
; search-key defined in RFC 3501
4. Example ๐
C: a1 SEARCH UNSEEN YOUNGER 259200
S: a1 * SEARCH 4 8 15 16 23 42
This searches for all unseen messages from the past 3 days, which is 259200 seconds, based on the server's current time ๐ซถ.
5. Security Considerations ๐ฅ
Okay, this part is serious ๐ฅบ. The WITHIN extension doesn't add any security considerations that aren't already in the base protocol ๐ก๏ธ. The same considerations apply as for IMAP [RFC3501] ๐.
6. IANA Considerations ๐
So, per the IMAP RFC [RFC3501], registering a new IMAP capability in the IMAP Capability registry needs either a standards-track RFC or an IESG-approved experimental RFC ๐ง. The registry lives at <http://www.iana.org/assignments/imap4-capabilities> ๐ฆ. This standards-track document defines the WITHIN IMAP capability ๐. IANA has added this extension to the IANA IMAP Capability registry โ
.
7. References ๐
7.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, BCP 14, March 1997.
[RFC3501] Crispin, M., "Internet Message Access Protocol - Version
4rev1", RFC 3501, March 2003.
[RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 4234, October 2005.
7.2. Informative References
[CONTEXT] Melnikov, D. and C. King, "Contexts for IMAP4", Work
in Progress, May 2006.
Appendix A. Contributors ๐ธ
Stephane Maes and Ray Cromwell wrote the first version of this document as part of P-IMAP, plus the first versions for the IETF ๐ง. From an attribution standpoint, they are clearly authors ๐ .
Appendix B. Acknowledgements ๐ซถ
The authors want to thank everyone who brought key insight and reviewed and discussed the concepts of LPSEARCH extensively ๐. They also thank the authors of its early introduction in P-IMAP ๐.
Special thanks also go to Arnt Gilbrandsen, Ken Murchison, Zoltan Ordogh, and most especially Dave Cridland for their reviews and suggestions ๐. And a very special thank you to Alexey Melnikov for his choice submission of text ๐.
Author's Address ๐ฎ
Eric W. Burger (editor)
BEA Systems, Inc.
USA
EMail: eric.burger@bea.com
URI: http://www.standardstrack.com
Full Copyright Statement โ๏ธ
Copyright (C) The IETF Trust (2007) ๐.
This document is subject to the rights, licenses and restrictions in BCP 78, and except where BCP 78 says otherwise, the authors keep all their rights ๐.
This document and the info in it are provided "AS IS". THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT USING THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS, OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ๐ โโ๏ธ.
Intellectual Property ๐
The IETF doesn't take a side on whether any Intellectual Property Rights or other rights that someone might claim over the technology in this document are valid or in scope, or on whether any license for them is available ๐คทโโ๏ธ. It also doesn't claim to have done any independent work to find such rights ๐. You can find the procedures for rights in RFC documents in BCP 78 and BCP 79 ๐.
Copies of IPR disclosures sent to the IETF Secretariat, any assurances of licenses to be made available, and the results of any attempt to get a general license or permission for implementers or users to use those proprietary rights can be found in the IETF online IPR repository at http://www.ietf.org/ipr ๐๏ธ.
The IETF invites anyone interested to flag any copyrights, patents, patent applications, or other proprietary rights that may cover technology required to implement this standard ๐. Send that info to the IETF at ietf-ipr@ietf.org ๐.
๐ฆ where this page comes from
- ietf: rfc5032 2007-09
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms