ietf-corpus

rfc-5032

WITHIN Search Extension to the IMAP Protocol

E. Burger (Editor)
date2007-09 streamIETF areaapp wglemonade statusPROPOSED STANDARD pages5 canonicalhttps://www.rfc-editor.org/rfc/rfc5032 doi10.17487/RFC5032
This document describes the WITHIN extension to IMAP SEARCH. IMAP SEARCH returns messages whose internal date is within or outside a specified interval. The mechanism described here, OLDER and YOUNGER, differs from BEFORE and SINCE in that the client specifies an interval, rather than a date. WITHIN is useful for persistent searches where either the device does not have the capacity to perform the search at regular intervals or the network is of limited bandwidth and thus there is a desire to reduce network traffic from sending repeated requests and redundant responses. [STANDARDS-TRACK]

updates

Extracted elements (10)

design-rationale §1

WITHIN (OLDER/YOUNGER) differs from BEFORE/SINCE in that the client specifies a relative interval in seconds rather than an absolute date. This is useful for persistent searches on devices with limited capacity or on bandwidth-constrained networks, reducing repeated requests and redundant responses.

email

interoperability-note §2

Both OLDER and YOUNGER searches use the server's current date and time as the reference point, and compare against INTERNALDATE as defined in RFC 3501. The resolution of matching is exact to the second.

email

normative-requirement §2 MUST

An IMAP4 server that supports the WITHIN capability MUST return "WITHIN" as one of the server supported capabilities in the CAPABILITY command response.

email

normative-requirement §2 MUST

Clients MUST be aware that dynamic search results (e.g., in a context evaluation) may not reflect the current state of the mailbox, as the server might perform evaluations periodically and delay updates.

email

normative-requirement §2 RECOMMENDED

If the client needs a search result that reflects the current state of the mailbox, it is RECOMMENDED that the client issue a new search rather than relying on dynamic evaluation results.

email

protocol-element §2

The OLDER search key takes a non-zero integer argument (interval in seconds). Messages match if their INTERNALDATE is less recent than or equal to the target time, which is computed by subtracting the interval from the server's current date and time.

email

protocol-element §2

The YOUNGER search key takes a non-zero integer argument (interval in seconds). Messages match if their INTERNALDATE is more recent than or equal to the target time, which is computed by subtracting the interval from the server's current date and time.

email

registry §6

IANA has added the WITHIN capability to the IMAP4 Capabilities registry (located at http://www.iana.org/assignments/imap4-capabilities). Registration requires a standards-track RFC or IESG-approved experimental RFC per RFC 3501.

email, registry

security-consideration §5

The WITHIN extension does not raise any security considerations beyond those present in the base IMAP protocol (RFC 3501). All security considerations from IMAP apply.

email, security

wire-format §3

The ABNF syntax extends RFC 3501's search-key rule: `search-key =/ ( "OLDER" / "YOUNGER" ) SP nz-number`, where nz-number is a non-zero positive integer representing the time interval in seconds.

email