Skip to content

feat: Implement RFC 2342 (NAMESPACE) in imap-codec #668

@qbit-0

Description

@qbit-0

(Edited by @duesee to include required syntax elements.)


Capability

IMAP4 servers that support this extension MUST list the keyword NAMESPACE in their CAPABILITY response.

Not defined formally, but should be ...

capability /= "NAMESPACE"

Command

The NAMESPACE command is valid in the Authenticated and Selected sate.

Namespace_Command = "NAMESPACE"

Response

Namespace_Response = "*" SP "NAMESPACE" SP Namespace SP Namespace SP Namespace
      ; The first Namespace is the Personal Namespace(s)
      ; The second Namespace is the Other Users' Namespace(s)
      ; The third Namespace is the Shared Namespace(s)

Namespace = nil /
            "("
              1*(
                "(" string SP  (<"> QUOTED_CHAR <"> / nil) *(Namespace_Response_Extension) ")"
              )
            ")"

Namespace_Response_Extension = SP string SP "(" string *(SP string) ")"

Updated by RFC 4466:

Capability

(...)

Command

Namespace-Command = "NAMESPACE"

Response

Namespace-Response = "NAMESPACE" SP Namespace SP Namespace SP Namespace
         ;; This response is currently only allowed
         ;; if the IMAP server supports [[NAMESPACE](https://www.rfc-editor.org/rfc/rfc4466#ref-NAMESPACE)].
         ;; The first Namespace is the Personal Namespace(s)
         ;; The second Namespace is the Other Users' Namespace(s)
         ;; The third Namespace is the Shared Namespace(s)

Namespace = nil / "(" 1*Namespace-Descr ")"

Namespace-Descr = "(" string SP (DQUOTE QUOTED-CHAR DQUOTE / nil) *(Namespace-Response-Extension) ")"

Namespace-Response-Extension = SP string SP "(" string *(SP string) ")"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions