apple / swift-nio-imap

A Swift project that provides an implementation of the IMAP4rev1 protocol, built upon SwiftNIO.
Apache License 2.0
101 stars 14 forks source link

IMAP Paged SEARCH & FETCH Support #746

Closed danieleggert closed 1 year ago

danieleggert commented 1 year ago

IMAP Paged SEARCH & FETCH Support

Motivation:

This adds support for the IMAP Paged SEARCH & FETCH Extension — also called “Partial”.

This extension allows clients to limit the number of SEARCH results or FETCH results returned by the server.

Modifications:

Add support for encoding & parsing for

  1. PARTIAL as part of a SEARCH command, e.g.

    A02 UID SEARCH RETURN (PARTIAL 23500:24000) UNDELETED
  2. PARTIAL as part of the response to a SEARCH command, e.g.

    * ESEARCH (TAG "A02") UID PARTIAL (-1:-4 67,100:102)
  3. PARTIAL as of a FETCH, e.g.

    A101 UID FETCH 25900:26600 (UID FLAGS) (PARTIAL -1:-30 CHANGEDSINCE 98305)