GithubHelp home page GithubHelp logo

Comments (1)

jordwest avatar jordwest commented on May 3, 2024

Need to think about how to deal with the three possibilities where a range can be specified:

From RFC3501 - 9. Formal Syntax:

seq-number  = nz-number / "*"
                ; message sequence number (COPY, FETCH, STORE
                ; commands) or unique identifier (UID COPY,
                ; UID FETCH, UID STORE commands).
                ; * represents the largest number in use.  In
                ; the case of message sequence numbers, it is
                ; the number of messages in a non-empty mailbox.
                ; In the case of unique identifiers, it is the
                ; unique identifier of the last message in the
                ; mailbox or, if the mailbox is empty, the
                ; mailbox's current UIDNEXT value.
                ; The server should respond with a tagged BAD
                ; response to a command that uses a message
                ; sequence number greater than the number of
                ; messages in the selected mailbox.  This
                ; includes "*" if the selected mailbox is empty.

seq-range   = seq-number ":" seq-number
                ; two seq-number values and all values between
                ; these two regardless of order.
                ; Example: 2:4 and 4:2 are equivalent and indicate
                ; values 2, 3, and 4.
                ; Example: a unique identifier sequence range of
                ; 3291:* includes the UID of the last message in
                ; the mailbox, even if that value is less than 3291.

sequence-set= (seq-number / seq-range) *("," sequence-set)
                ; set of seq-number values, regardless of order.
                ; Servers MAY coalesce overlaps and/or execute the
                ; sequence in any order.
                ; Example: a message sequence number set of
                ; 2,4:7,9,12:* for a mailbox with 15 messages is
                ; equivalent to 2,4,5,6,7,9,12,13,14,15
                ; Example: a message sequence number set of *:4,5:7
                ; for a mailbox with 10 messages is equivalent to
                ; 10,9,8,7,6,5,4,5,6,7 and MAY be reordered and
                ; overlap coalesced to be 4,5,6,7,8,9,10.

from imap-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.