@@ -4,26 +4,28 @@ module Net
4
4
class IMAP < Protocol
5
5
6
6
# -------------------------------------------------------------------------
7
- # :section: Message Flags: system flags
7
+ # :section: System Flags
8
8
#
9
9
# A message has a list of zero or more named tokens, known as "flags",
10
10
# associated with it. A flag is set by its addition to this list and is
11
- # cleared by its removal. There are two types of flags in IMAP4rev2: system
12
- # flags and keywords. A flag of either type can be permanent or
13
- # session-only.
14
- #
15
- # A "system flag" is a message flag name that is predefined in the IMAP
16
- # specification and begins with "\". +Net::IMAP+ returns all system flags
17
- # as symbols, without the "\" prefix.
18
- #
19
- # The descriptions here were copied from the IMAP4rev2 specification:
20
- # [RFC-9051 § 2.3.2](https://www.rfc-editor.org/rfc/rfc9051.html#section-2.3.2)
21
- #
22
- # See [RFC-3501 § 2.3.2](https://www.rfc-editor.org/rfc/rfc3501.html#section-2.3.2)
23
- # for a description of the flags message attribute and system flag semantics
24
- # in IMAP4rev1.
11
+ # cleared by its removal. There are two types of flags in
12
+ # IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html] and
13
+ # IMAP4rev2[https://www.rfc-editor.org/rfc/rfc9051.html]: flags and
14
+ # keywords. A flag of either type can be permanent or session-only.
15
+ #
16
+ # A "system flag" is a message flag name that is predefined in the \IMAP
17
+ # specifications and begins with <tt>"\"</tt>. Net::IMAP returns all
18
+ # system flags as symbols, without the <tt>"\"</tt> prefix.
19
+ #
20
+ # <em>The descriptions here were copied from</em> {[RFC-9051
21
+ # §2.3.2]}[https://www.rfc-editor.org/rfc/rfc9051.html#section-2.3.2].
22
+ # <em>See also</em> {[RFC-3501
23
+ # §2.3.2]}[https://www.rfc-editor.org/rfc/rfc3501.html#section-2.3.2],
24
+ # <em>which describes the flags message attribute semantics under</em>
25
+ # IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501.html].
25
26
# -------------------------------------------------------------------------
26
27
28
+ ##
27
29
# Flag indicating a message has been read.
28
30
SEEN = :Seen
29
31
@@ -52,30 +54,32 @@ class IMAP < Protocol
52
54
# of this message.
53
55
#
54
56
# This flag was defined by
55
- # IMAP4rev1 [RFC-3501]( https://www.rfc-editor.org/rfc/rfc3501.html),
56
- # and has been deprecated by
57
- # IMAP4rev2 [RFC-9051]( https://www.rfc-editor.org/rfc/rfc9051.html) .
57
+ # IMAP4rev1[ https://www.rfc-editor.org/rfc/rfc3501.html]
58
+ # and is deprecated by
59
+ # IMAP4rev2[ https://www.rfc-editor.org/rfc/rfc9051.html] .
58
60
RECENT = :Recent
59
61
60
62
# -------------------------------------------------------------------------
61
- # :section: Mailbox Name Attributes, Base attributes
62
- # Mailbox name attributes will be returned in LIST responses. Base
63
+ # :section: Basic Mailbox Attributes
64
+ # Mailbox name attributes will be returned in #list responses. Base
63
65
# attributes must be returned according to the server's capabilities.
64
66
#
65
67
# IMAP4 specifies that all mailbox name attributes, including future
66
- # extensions, begin with "\". + Net::IMAP+ returns all mailbox attributes as
67
- # symbols, without the "\" prefix.
68
+ # extensions, begin with <tt> "\"</tt> . Net::IMAP returns all mailbox
69
+ # attributes as symbols, without the <tt> "\"</tt> prefix.
68
70
#
69
- # The descriptions here were copied from the IMAP4rev2 specification:
70
- # [RFC9051 § 7.3.1](https://www.rfc-editor.org/rfc/rfc9051.html#section-7.3.1).
71
71
#
72
- # Other mailbox name attributes can be found in the [IANA IMAP Mailbox Name
73
- # Attributes registry](https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml)].
72
+ # <em>The descriptions here were copied from</em> {[RFC-9051 §
73
+ # 7.3.1]}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.3.1].
74
+ #
75
+ # Other mailbox name attributes can be found in the {IANA IMAP Mailbox Name
76
+ # Attributes registry}[https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml].
74
77
# -------------------------------------------------------------------------
75
78
76
- # The "\NonExistent" attribute indicates that a mailbox name does not refer
79
+ ##
80
+ # The +\NonExistent+ attribute indicates that a mailbox name does not refer
77
81
# to an existing mailbox. Note that this attribute is not meaningful by
78
- # itself, as mailbox names that match the canonical LIST pattern but don't
82
+ # itself, as mailbox names that match the canonical #list pattern but don't
79
83
# exist must not be returned unless one of the two conditions listed below
80
84
# is also satisfied:
81
85
#
@@ -84,23 +88,23 @@ class IMAP < Protocol
84
88
# specified).
85
89
#
86
90
# 2. "RECURSIVEMATCH" has been specified, and the mailbox name has at least
87
- # one descendant mailbox name that does not match the LIST pattern and
91
+ # one descendant mailbox name that does not match the #list pattern and
88
92
# does match the selection criteria.
89
93
#
90
- # In practice, this means that the " \NonExistent" attribute is usually
91
- # returned with one or more of " \Subscribed", " \Remote", " \HasChildren" , or
94
+ # In practice, this means that the + \NonExistent+ attribute is usually
95
+ # returned with one or more of + \Subscribed+, + \Remote+, + \HasChildren+ , or
92
96
# the CHILDINFO extended data item.
93
97
#
94
- # The client must treat the presence of the \NonExistent attribute as if the
95
- # \NoSelect attribute was also sent by the server
98
+ # The client must treat the presence of the + \NonExistent+ attribute as if the
99
+ # + \NoSelect+ attribute was also sent by the server
96
100
NONEXISTENT = :NonExistent
97
101
98
102
# Mailbox attribute indicating it is not possible for any child levels of
99
103
# hierarchy to exist under this name; no child levels exist now and none can
100
104
# be created in the future children.
101
105
#
102
- # The client must treat the presence of the \NoInferiors attribute as if the
103
- # \HasNoChildren attribute was also sent by the server
106
+ # The client must treat the presence of the + \NoInferiors+ attribute as if the
107
+ # + \HasNoChildren+ attribute was also sent by the server
104
108
NOINFERIORS = :Noinferiors
105
109
106
110
# Mailbox attribute indicating it is not possible to use this name as a
@@ -110,80 +114,83 @@ class IMAP < Protocol
110
114
# The presence of this attribute indicates that the mailbox has child
111
115
# mailboxes. A server SHOULD NOT set this attribute if there are child
112
116
# mailboxes and the user does not have permission to access any of them. In
113
- # this case, \HasNoChildren SHOULD be used. In many cases, however, a server
114
- # may not be able to efficiently compute whether a user has access to any
115
- # child mailboxes. Note that even though the \HasChildren attribute for a
116
- # mailbox must be correct at the time of processing the mailbox, a client
117
- # must be prepared to deal with a situation when a mailbox is marked with
118
- # the \HasChildren attribute, but no child mailbox appears in the response
119
- # to the LIST command. This might happen, for example, due to child
117
+ # this case, + \HasNoChildren+ SHOULD be used. In many cases, however, a
118
+ # server may not be able to efficiently compute whether a user has access to
119
+ # any child mailboxes. Note that even though the + \HasChildren+ attribute
120
+ # for a mailbox must be correct at the time of processing the mailbox, a
121
+ # client must be prepared to deal with a situation when a mailbox is marked
122
+ # with the + \HasChildren+ attribute, but no child mailbox appears in the
123
+ # response to the #list command. This might happen, for example, due to child
120
124
# mailboxes being deleted or made inaccessible to the user (using access
121
125
# control) by another client before the server is able to list them.
122
126
#
123
- # It is an error for the server to return both a \HasChildren and a
124
- # \HasNoChildren attribute in the same LIST response. A client that
125
- # encounters a LIST response with both \HasChildren and \HasNoChildren
126
- # attributes present should act as if both are absent in the LIST response.
127
+ # It is an error for the server to return both a + \HasChildren+ and a
128
+ # + \HasNoChildren+ attribute in the same #list response. A client that
129
+ # encounters a #list response with both + \HasChildren+ and + \HasNoChildren+
130
+ # attributes present should act as if both are absent in the #list response.
127
131
HAS_CHILDREN = :HasChildren
128
132
129
133
# The presence of this attribute indicates that the mailbox has NO child
130
134
# mailboxes that are accessible to the currently authenticated user.
131
135
#
132
- # It is an error for the server to return both a \HasChildren and a
133
- # \HasNoChildren attribute in the same LIST response. A client that
134
- # encounters a LIST response with both \HasChildren and \HasNoChildren
135
- # attributes present should act as if both are absent in the LIST response.
136
+ # It is an error for the server to return both a + \HasChildren+ and a
137
+ # + \HasNoChildren+ attribute in the same #list response. A client that
138
+ # encounters a #list response with both + \HasChildren+ and + \HasNoChildren+
139
+ # attributes present should act as if both are absent in the #list response.
136
140
#
137
- # Note: the \HasNoChildren attribute should not be confused with the
138
- # \NoInferiors attribute, which indicates that no child mailboxes exist now
139
- # and none can be created in the future.
141
+ # Note: the + \HasNoChildren+ attribute should not be confused with the
142
+ # + \NoInferiors+ attribute, which indicates that no child mailboxes exist
143
+ # now and none can be created in the future.
140
144
HAS_NO_CHILDREN = :HasNoChildren
141
145
142
146
# The mailbox has been marked "interesting" by the server; the mailbox
143
147
# probably contains messages that have been added since the last time the
144
148
# mailbox was selected.
145
149
#
146
150
# If it is not feasible for the server to determine whether or not the
147
- # mailbox is "interesting", the server SHOULD NOT send either \Marked or
148
- # \Unmarked. The server MUST NOT send more than one of \Marked, \Unmarked,
149
- # and \Noselect for a single mailbox, and it MAY send none of these.
151
+ # mailbox is "interesting", the server SHOULD NOT send either +\Marked+ or
152
+ # +\Unmarked+. The server MUST NOT send more than one of +\Marked+,
153
+ # +\Unmarked+, and +\NoSelect+ for a single mailbox, and it MAY send none of
154
+ # these.
150
155
MARKED = :Marked
151
156
152
157
# The mailbox does not contain any additional messages since the last time
153
158
# the mailbox was selected.
154
159
#
155
160
# If it is not feasible for the server to determine whether or not the
156
- # mailbox is "interesting", the server SHOULD NOT send either \Marked or
157
- # \Unmarked. The server MUST NOT send more than one of \Marked, \Unmarked,
158
- # and \Noselect for a single mailbox, and it MAY send none of these.
161
+ # mailbox is "interesting", the server SHOULD NOT send either +\Marked+ or
162
+ # +\Unmarked+. The server MUST NOT send more than one of +\Marked+,
163
+ # +\Unmarked+, and +\NoSelect+ for a single mailbox, and it MAY send none of
164
+ # these.
159
165
UNMARKED = :Unmarked
160
166
161
- # The mailbox name was subscribed to using the SUBSCRIBE command.
167
+ # The mailbox name was subscribed to using the #subscribe command.
162
168
SUBSCRIBED = :Subscribed
163
169
164
170
# The mailbox is a remote mailbox.
165
171
REMOTE = :Remove
166
172
167
173
# -------------------------------------------------------------------------
168
- # :section: Mailbox Name Attributes, Special Use
169
- # Mailbox name attributes will be returned in LIST responses. In addition
170
- # to the base mailbox name attributes defined above, an IMAP server MAY also
171
- # include any or all of the following attributes that denote "role" (or
174
+ # :section: Mailbox role attributes
175
+ #
176
+ # Mailbox name attributes will be returned in #list responses. In addition
177
+ # to the base mailbox name attributes defined above, an \IMAP server MAY
178
+ # also include any or all of the following attributes that denote "role" (or
172
179
# "special-use") of a mailbox. These attributes are included along with base
173
180
# attributes defined above. A given mailbox may have none, one, or more than
174
181
# one of these attributes. In some cases, a special use is advice to a
175
182
# client about what to put in that mailbox. In other cases, it's advice to a
176
183
# client about what to expect to find there.
177
184
#
178
185
# IMAP4 specifies that all mailbox name attributes, including future
179
- # extensions, begin with "\". + Net::IMAP+ returns all mailbox attributes as
180
- # symbols, without the "\" prefix.
186
+ # extensions, begin with <tt> "\"</tt> . Net::IMAP returns all mailbox
187
+ # attributes as symbols, without the <tt> "\"</tt> prefix.
181
188
#
182
- # The descriptions here were copied from the IMAP4rev2 specification:
183
- # [RFC-9051 § 7.3.1]( https://www.rfc-editor.org/rfc/rfc9051.html#section-7.3.1) .
189
+ # <em> The descriptions here were copied from</em> {[RFC-9051 §
190
+ # 7.3.1]}[ https://www.rfc-editor.org/rfc/rfc9051.html#section-7.3.1] .
184
191
#
185
- # Other mailbox name attributes can be found in the [ IANA IMAP Mailbox Name
186
- # Attributes registry]( https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml) ].
192
+ # Other mailbox name attributes can be found in the { IANA IMAP Mailbox Name
193
+ # Attributes registry}[ https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml].
187
194
# -------------------------------------------------------------------------
188
195
189
196
# Mailbox attribute indicating that this mailbox presents all messages in
@@ -206,7 +213,9 @@ class IMAP < Protocol
206
213
# client put drafts here
207
214
DRAFTS = :Drafts
208
215
209
- # FLAGGED is defined with the system flags section.
216
+ #--
217
+ # n.b. FLAGGED is defined in the system flags section.
218
+ #++
210
219
211
220
# Mailbox attribute indicating that this mailbox is where messages deemed to
212
221
# be junk mail are held. Some server implementations might put messages here
@@ -223,10 +232,10 @@ class IMAP < Protocol
223
232
# Mailbox attribute indicating that this mailbox is used to hold messages
224
233
# that have been deleted or marked for deletion. In some server
225
234
# implementations, this might be a virtual mailbox, containing messages from
226
- # other mailboxes that are marked with the " \Deleted" message flag.
235
+ # other mailboxes that are marked with the + \Deleted+ message flag.
227
236
# Alternatively, this might just be advice that a client that chooses not to
228
- # use the IMAP " \Deleted" model should use as its trash location. In server
229
- # implementations that strictly expect the IMAP " \Deleted" model, this
237
+ # use the \ IMAP + \Deleted+ model should use as its trash location. In server
238
+ # implementations that strictly expect the \ IMAP + \Deleted+ model, this
230
239
# special use is likely not to be supported.
231
240
TRASH = :Trash
232
241
0 commit comments