net-imap 0.5.4 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,8 +4,12 @@ module Net
4
4
  class IMAP < Protocol
5
5
  autoload :ESearchResult, "#{__dir__}/esearch_result"
6
6
  autoload :FetchData, "#{__dir__}/fetch_data"
7
+ autoload :UIDFetchData, "#{__dir__}/fetch_data"
7
8
  autoload :SearchResult, "#{__dir__}/search_result"
8
9
  autoload :SequenceSet, "#{__dir__}/sequence_set"
10
+ autoload :UIDPlusData, "#{__dir__}/uidplus_data"
11
+ autoload :AppendUIDData, "#{__dir__}/uidplus_data"
12
+ autoload :CopyUIDData, "#{__dir__}/uidplus_data"
9
13
  autoload :VanishedData, "#{__dir__}/vanished_data"
10
14
 
11
15
  # Net::IMAP::ContinuationRequest represents command continuation requests.
@@ -159,13 +163,20 @@ module Net
159
163
  # The raw response data.
160
164
  end
161
165
 
162
- # Net::IMAP::ResponseText represents texts of responses.
166
+ # ResponseText represents texts of responses.
163
167
  #
164
168
  # The text may be prefixed by a ResponseCode.
165
169
  #
166
- # ResponseText is returned from TaggedResponse#data, or from
167
- # UntaggedResponse#data when the response type is a "condition" ("OK", "NO",
168
- # "BAD", "PREAUTH", or "BYE").
170
+ # ResponseText is returned from TaggedResponse#data or
171
+ # UntaggedResponse#data for
172
+ # {"status responses"}[https://www.rfc-editor.org/rfc/rfc3501#section-7.1]:
173
+ # * every TaggedResponse, name[rdoc-ref:TaggedResponse#name] is always
174
+ # "+OK+", "+NO+", or "+BAD+".
175
+ # * any UntaggedResponse when name[rdoc-ref:UntaggedResponse#name] is
176
+ # "+OK+", "+NO+", "+BAD+", "+PREAUTH+", or "+BYE+".
177
+ #
178
+ # Note that these "status responses" are confusingly _not_ the same as the
179
+ # +STATUS+ UntaggedResponse (see IMAP#status and StatusData).
169
180
  class ResponseText < Struct.new(:code, :text)
170
181
  # Used to avoid an allocation when ResponseText is empty
171
182
  EMPTY = new(nil, "").freeze
@@ -183,32 +194,35 @@ module Net
183
194
  # Returns the response text, not including any response code
184
195
  end
185
196
 
186
- # Net::IMAP::ResponseCode represents response codes. Response codes can be
187
- # retrieved from ResponseText#code and can be included in any "condition"
188
- # response: any TaggedResponse and UntaggedResponse when the response type
189
- # is a "condition" ("OK", "NO", "BAD", "PREAUTH", or "BYE").
197
+ # ResponseCode represents an \IMAP response code, which can be retrieved
198
+ # from ResponseText#code for
199
+ # {"status responses"}[https://www.rfc-editor.org/rfc/rfc3501#section-7.1]:
200
+ # * every TaggedResponse, name[rdoc-ref:TaggedResponse#name] is always
201
+ # "+OK+", "+NO+", or "+BAD+".
202
+ # * any UntaggedResponse when name[rdoc-ref:UntaggedResponse#name] is
203
+ # "+OK+", "+NO+", "+BAD+", "+PREAUTH+", or "+BYE+".
204
+ #
205
+ # Note that these "status responses" are confusingly _not_ the same as the
206
+ # +STATUS+ UntaggedResponse (see IMAP#status and StatusData).
190
207
  #
191
208
  # Some response codes come with additional data which will be parsed by
192
209
  # Net::IMAP. Others return +nil+ for #data, but are used as a
193
210
  # machine-readable annotation for the human-readable ResponseText#text in
194
- # the same response. When Net::IMAP does not know how to parse response
195
- # code text, #data returns the unparsed string.
211
+ # the same response.
196
212
  #
197
213
  # Untagged response code #data is pushed directly onto Net::IMAP#responses,
198
214
  # keyed by #name, unless it is removed by the command that generated it.
199
215
  # Use Net::IMAP#add_response_handler to view tagged response codes for
200
216
  # command methods that do not return their TaggedResponse.
201
217
  #
218
+ # == Standard response codes
219
+ #
202
220
  # \IMAP extensions may define new codes and the data that comes with them.
203
221
  # The IANA {IMAP Response
204
222
  # Codes}[https://www.iana.org/assignments/imap-response-codes/imap-response-codes.xhtml]
205
223
  # registry has links to specifications for all standard response codes.
206
- # Response codes are backwards compatible: Servers are allowed to send new
207
- # response codes even if the client has not enabled the extension that
208
- # defines them. When unknown response code data is encountered, #data
209
- # will return an unparsed string.
210
224
  #
211
- # ==== +IMAP4rev1+ Response Codes
225
+ # === +IMAP4rev1+ response codes
212
226
  # See [IMAP4rev1[https://www.rfc-editor.org/rfc/rfc3501]] {§7.1, "Server
213
227
  # Responses - Status
214
228
  # Responses"}[https://www.rfc-editor.org/rfc/rfc3501#section-7.1] for full
@@ -239,24 +253,24 @@ module Net
239
253
  # the <tt>\Seen</tt> flag set.
240
254
  # <em>DEPRECATED by IMAP4rev2.</em>
241
255
  #
242
- # ==== +BINARY+ extension
256
+ # === +BINARY+ extension
243
257
  # See {[RFC3516]}[https://www.rfc-editor.org/rfc/rfc3516].
244
258
  # * +UNKNOWN-CTE+, with a tagged +NO+ response, when the server does not
245
259
  # known how to decode a CTE (content-transfer-encoding). #data is +nil+.
246
260
  # See IMAP#fetch.
247
261
  #
248
- # ==== +UIDPLUS+ extension
262
+ # === +UIDPLUS+ extension
249
263
  # See {[RFC4315 §3]}[https://www.rfc-editor.org/rfc/rfc4315#section-3].
250
264
  # * +APPENDUID+, #data is UIDPlusData. See IMAP#append.
251
265
  # * +COPYUID+, #data is UIDPlusData. See IMAP#copy.
252
266
  # * +UIDNOTSTICKY+, #data is +nil+. See IMAP#select.
253
267
  #
254
- # ==== +SEARCHRES+ extension
268
+ # === +SEARCHRES+ extension
255
269
  # See {[RFC5182]}[https://www.rfc-editor.org/rfc/rfc5182].
256
270
  # * +NOTSAVED+, with a tagged +NO+ response, when the search result variable
257
271
  # is not saved. #data is +nil+.
258
272
  #
259
- # ==== +RFC5530+ Response Codes
273
+ # === +RFC5530+ response codes
260
274
  # See {[RFC5530]}[https://www.rfc-editor.org/rfc/rfc5530], "IMAP Response
261
275
  # Codes" for the definition of the following response codes, which are all
262
276
  # machine-readable annotations for the human-readable ResponseText#text, and
@@ -279,22 +293,22 @@ module Net
279
293
  # * +ALREADYEXISTS+
280
294
  # * +NONEXISTENT+
281
295
  #
282
- # ==== +QRESYNC+ extension
296
+ # === +QRESYNC+ extension
283
297
  # See {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html].
284
298
  # * +CLOSED+, returned when the currently selected mailbox is closed
285
299
  # implicitly by selecting or examining another mailbox. #data is +nil+.
286
300
  #
287
- # ==== +IMAP4rev2+ Response Codes
301
+ # === +IMAP4rev2+ response codes
288
302
  # See {[RFC9051]}[https://www.rfc-editor.org/rfc/rfc9051] {§7.1, "Server
289
303
  # Responses - Status
290
304
  # Responses"}[https://www.rfc-editor.org/rfc/rfc9051#section-7.1] for full
291
305
  # descriptions of IMAP4rev2 response codes. IMAP4rev2 includes all of the
292
- # response codes listed above (except "UNSEEN") and adds the following:
306
+ # response codes listed above (except "+UNSEEN+") and adds the following:
293
307
  # * +HASCHILDREN+, with a tagged +NO+ response, when a mailbox delete failed
294
308
  # because the server doesn't allow deletion of mailboxes with children.
295
309
  # #data is +nil+.
296
310
  #
297
- # ==== +CONDSTORE+ extension
311
+ # === +CONDSTORE+ extension
298
312
  # See {[RFC7162]}[https://www.rfc-editor.org/rfc/rfc7162.html].
299
313
  # * +NOMODSEQ+, when selecting a mailbox that does not support
300
314
  # mod-sequences. #data is +nil+. See IMAP#select.
@@ -304,10 +318,17 @@ module Net
304
318
  # since the +UNCHANGEDSINCE+ mod-sequence given to +STORE+ or <tt>UID
305
319
  # STORE</tt>.
306
320
  #
307
- # ==== +OBJECTID+ extension
321
+ # === +OBJECTID+ extension
308
322
  # See {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html].
309
323
  # * +MAILBOXID+, #data is a string
310
324
  #
325
+ # == Extension compatibility
326
+ #
327
+ # Response codes are backwards compatible: Servers are allowed to send new
328
+ # response codes even if the client has not enabled the extension that
329
+ # defines them. When Net::IMAP does not know how to parse response
330
+ # code text, #data returns the unparsed string.
331
+ #
311
332
  class ResponseCode < Struct.new(:name, :data)
312
333
  ##
313
334
  # method: name
@@ -326,64 +347,8 @@ module Net
326
347
  # code data can take.
327
348
  end
328
349
 
329
- # Net::IMAP::UIDPlusData represents the ResponseCode#data that accompanies
330
- # the +APPENDUID+ and +COPYUID+ response codes.
331
- #
332
- # See [[UIDPLUS[https://www.rfc-editor.org/rfc/rfc4315.html]].
333
- #
334
- # ==== Capability requirement
335
- #
336
- # The +UIDPLUS+ capability[rdoc-ref:Net::IMAP#capability] must be supported.
337
- # A server that supports +UIDPLUS+ should send a UIDPlusData object inside
338
- # every TaggedResponse returned by the append[rdoc-ref:Net::IMAP#append],
339
- # copy[rdoc-ref:Net::IMAP#copy], move[rdoc-ref:Net::IMAP#move], {uid
340
- # copy}[rdoc-ref:Net::IMAP#uid_copy], and {uid
341
- # move}[rdoc-ref:Net::IMAP#uid_move] commands---unless the destination
342
- # mailbox reports +UIDNOTSTICKY+.
343
- #
344
- #--
345
- # TODO: support MULTIAPPEND
346
- #++
347
- #
348
- class UIDPlusData < Struct.new(:uidvalidity, :source_uids, :assigned_uids)
349
- ##
350
- # method: uidvalidity
351
- # :call-seq: uidvalidity -> nonzero uint32
352
- #
353
- # The UIDVALIDITY of the destination mailbox.
354
-
355
- ##
356
- # method: source_uids
357
- # :call-seq: source_uids -> nil or an array of nonzero uint32
358
- #
359
- # The UIDs of the copied or moved messages.
360
- #
361
- # Note:: Returns +nil+ for Net::IMAP#append.
362
-
363
- ##
364
- # method: assigned_uids
365
- # :call-seq: assigned_uids -> an array of nonzero uint32
366
- #
367
- # The newly assigned UIDs of the copied, moved, or appended messages.
368
- #
369
- # Note:: This always returns an array, even when it contains only one UID.
370
-
371
- ##
372
- # :call-seq: uid_mapping -> nil or a hash
373
- #
374
- # Returns a hash mapping each source UID to the newly assigned destination
375
- # UID.
376
- #
377
- # Note:: Returns +nil+ for Net::IMAP#append.
378
- def uid_mapping
379
- source_uids&.zip(assigned_uids)&.to_h
380
- end
381
- end
382
-
383
- # Net::IMAP::MailboxList represents contents of the LIST response,
384
- # representing a single mailbox path.
385
- #
386
- # Net::IMAP#list returns an array of MailboxList objects.
350
+ # MailboxList represents the data of an untagged +LIST+ response, for a
351
+ # _single_ mailbox path. IMAP#list returns an array of MailboxList objects.
387
352
  #
388
353
  class MailboxList < Struct.new(:attr, :delim, :name)
389
354
  ##
@@ -393,11 +358,11 @@ module Net
393
358
  # Returns the name attributes. Each name attribute is a symbol capitalized
394
359
  # by String#capitalize, such as :Noselect (not :NoSelect). For the
395
360
  # semantics of each attribute, see:
396
- # * rdoc-ref:Net::IMAP@Basic+Mailbox+Attributes
397
- # * rdoc-ref:Net::IMAP@Mailbox+role+Attributes
398
- # * Net::IMAP@SPECIAL-USE
361
+ # * Net::IMAP@Basic+Mailbox+Attributes
362
+ # * Net::IMAP@Mailbox+role+Attributes
399
363
  # * The IANA {IMAP Mailbox Name Attributes
400
364
  # registry}[https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml]
365
+ # has links to specifications for all standard mailbox attributes.
401
366
 
402
367
  ##
403
368
  # method: delim
@@ -412,16 +377,16 @@ module Net
412
377
  # Returns the mailbox name.
413
378
  end
414
379
 
415
- # Net::IMAP::MailboxQuota represents contents of GETQUOTA response.
416
- # This object can also be a response to GETQUOTAROOT. In the syntax
417
- # specification below, the delimiter used with the "#" construct is a
418
- # single space (SPACE).
380
+ # MailboxQuota represents the data of an untagged +QUOTA+ response.
419
381
  #
420
- # Net:IMAP#getquota returns an array of MailboxQuota objects.
382
+ # IMAP#getquota returns an array of MailboxQuota objects.
421
383
  #
422
384
  # Net::IMAP#getquotaroot returns an array containing both MailboxQuotaRoot
423
385
  # and MailboxQuota objects.
424
386
  #
387
+ # == Required capability
388
+ # Requires +QUOTA+ [RFC2087[https://www.rfc-editor.org/rfc/rfc2087]]
389
+ # capability.
425
390
  class MailboxQuota < Struct.new(:mailbox, :usage, :quota)
426
391
  ##
427
392
  # method: mailbox
@@ -443,12 +408,14 @@ module Net
443
408
  #
444
409
  end
445
410
 
446
- # Net::IMAP::MailboxQuotaRoot represents part of the GETQUOTAROOT
447
- # response. (GETQUOTAROOT can also return Net::IMAP::MailboxQuota.)
411
+ # MailboxQuotaRoot represents the data of an untagged +QUOTAROOT+ response.
448
412
  #
449
- # Net::IMAP#getquotaroot returns an array containing both MailboxQuotaRoot
450
- # and MailboxQuota objects.
413
+ # IMAP#getquotaroot returns an array containing both MailboxQuotaRoot and
414
+ # MailboxQuota objects.
451
415
  #
416
+ # == Required capability
417
+ # Requires +QUOTA+ [RFC2087[https://www.rfc-editor.org/rfc/rfc2087]]
418
+ # capability.
452
419
  class MailboxQuotaRoot < Struct.new(:mailbox, :quotaroots)
453
420
  ##
454
421
  # method: mailbox
@@ -463,12 +430,13 @@ module Net
463
430
  # Zero or more quotaroots that affect the quota on the specified mailbox.
464
431
  end
465
432
 
466
- # Net::IMAP::MailboxACLItem represents the response from GETACL.
433
+ # MailboxACLItem represents the data of an untagged +ACL+ response.
467
434
  #
468
- # Net::IMAP#getacl returns an array of MailboxACLItem objects.
435
+ # IMAP#getacl returns an array of MailboxACLItem objects.
469
436
  #
470
- # ==== Required capability
471
- # +ACL+ - described in [ACL[https://tools.ietf.org/html/rfc4314]]
437
+ # == Required capability
438
+ # Requires +ACL+ [RFC4314[https://www.rfc-editor.org/rfc/rfc4314]]
439
+ # capability.
472
440
  class MailboxACLItem < Struct.new(:user, :rights, :mailbox)
473
441
  ##
474
442
  # method: mailbox
@@ -490,11 +458,12 @@ module Net
490
458
  # The access rights the indicated #user has to the #mailbox.
491
459
  end
492
460
 
493
- # Net::IMAP::Namespace represents a single namespace contained inside a
494
- # NAMESPACE response.
495
- #
496
- # Returned by Net::IMAP#namespace, contained inside a Namespaces object.
461
+ # Namespace represents a _single_ namespace, contained inside a Namespaces
462
+ # object.
497
463
  #
464
+ # == Required capability
465
+ # Requires either +NAMESPACE+ [RFC2342[https://www.rfc-editor.org/rfc/rfc2342]]
466
+ # or +IMAP4rev2+ capability.
498
467
  class Namespace < Struct.new(:prefix, :delim, :extensions)
499
468
  ##
500
469
  # method: prefix
@@ -516,11 +485,14 @@ module Net
516
485
  # Extension parameter semantics would be defined by the extension.
517
486
  end
518
487
 
519
- # Net::IMAP::Namespaces represents a +NAMESPACE+ server response, which
520
- # contains lists of #personal, #shared, and #other namespaces.
488
+ # Namespaces represents the data of an untagged +NAMESPACE+ response,
489
+ # returned by IMAP#namespace.
521
490
  #
522
- # Net::IMAP#namespace returns a Namespaces object.
491
+ # Contains lists of #personal, #shared, and #other namespaces.
523
492
  #
493
+ # == Required capability
494
+ # Requires either +NAMESPACE+ [RFC2342[https://www.rfc-editor.org/rfc/rfc2342]]
495
+ # or +IMAP4rev2+ capability.
524
496
  class Namespaces < Struct.new(:personal, :other, :shared)
525
497
  ##
526
498
  # method: personal
@@ -541,9 +513,9 @@ module Net
541
513
  # Returns an array of Shared Namespace objects.
542
514
  end
543
515
 
544
- # Net::IMAP::StatusData represents the contents of the STATUS response.
516
+ # StatusData represents the contents of an untagged +STATUS+ response.
545
517
  #
546
- # Net::IMAP#status returns the contents of #attr.
518
+ # IMAP#status returns the contents of #attr.
547
519
  class StatusData < Struct.new(:mailbox, :attr)
548
520
  ##
549
521
  # method: mailbox
@@ -564,11 +536,11 @@ module Net
564
536
  # [Note]
565
537
  # When the #sender and #reply_to fields are absent or empty, they will
566
538
  # return the same value as #from. Also, fields may return values that are
567
- # invalid for well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
539
+ # invalid for well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
568
540
  # messages when the message is malformed or a draft message.
569
541
  #
570
- # See [{IMAP4rev1 §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2]]
571
- # and [{IMAP4rev2 §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2]]
542
+ # See [{IMAP4rev1 §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501#section-7.4.2]]
543
+ # and [{IMAP4rev2 §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051#section-7.5.2]]
572
544
  # for full description of the envelope fields, and
573
545
  # Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.
574
546
  #
@@ -582,7 +554,7 @@ module Net
582
554
  # Returns a string that represents the +Date+ header.
583
555
  #
584
556
  # [Note]
585
- # For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
557
+ # For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
586
558
  # message, the #date field must not be +nil+. However it can be +nil+
587
559
  # for a malformed or draft message.
588
560
 
@@ -608,7 +580,7 @@ module Net
608
580
  # returns +nil+ for this envelope field.
609
581
  #
610
582
  # [Note]
611
- # For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
583
+ # For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
612
584
  # message, the #from field must not be +nil+. However it can be +nil+
613
585
  # for a malformed or draft message.
614
586
 
@@ -621,7 +593,7 @@ module Net
621
593
  # [Note]
622
594
  # If the <tt>Sender</tt> header is absent, or is present but empty, the
623
595
  # server sets this field to be the same value as #from. Therefore, in a
624
- # well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]] message,
596
+ # well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] message,
625
597
  # the #sender envelope field must not be +nil+. However it can be
626
598
  # +nil+ for a malformed or draft message.
627
599
 
@@ -635,7 +607,7 @@ module Net
635
607
  # [Note]
636
608
  # If the <tt>Reply-To</tt> header is absent, or is present but empty,
637
609
  # the server sets this field to be the same value as #from. Therefore,
638
- # in a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
610
+ # in a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
639
611
  # message, the #reply_to envelope field must not be +nil+. However it
640
612
  # can be +nil+ for a malformed or draft message.
641
613
 
@@ -664,7 +636,7 @@ module Net
664
636
  # Returns a string that represents the <tt>In-Reply-To</tt> header.
665
637
  #
666
638
  # [Note]
667
- # For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
639
+ # For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
668
640
  # message, the #in_reply_to field, if present, must not be empty. But
669
641
  # it can still return an empty string for malformed messages.
670
642
  #
@@ -680,7 +652,7 @@ module Net
680
652
  # Returns a string that represents the <tt>Message-ID</tt>.
681
653
  #
682
654
  # [Note]
683
- # For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
655
+ # For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
684
656
  # message, the #message_id field, if present, must not be empty. But it
685
657
  # can still return an empty string for malformed messages.
686
658
  #
@@ -694,10 +666,10 @@ module Net
694
666
  # parsed into its component parts by the server. Address objects are
695
667
  # returned within Envelope fields.
696
668
  #
697
- # === Group syntax
669
+ # == Group syntax
698
670
  #
699
671
  # When the #host field is +nil+, this is a special form of address structure
700
- # that indicates the [RFC5322[https://tools.ietf.org/html/rfc5322]] group
672
+ # that indicates the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] group
701
673
  # syntax. If the #mailbox name field is also +nil+, this is an end-of-group
702
674
  # marker (semicolon in RFC-822 syntax). If the #mailbox name field is
703
675
  # non-+NIL+, this is the start of a group marker, and the mailbox #name
@@ -707,7 +679,7 @@ module Net
707
679
  # method: name
708
680
  # :call-seq: name -> string or nil
709
681
  #
710
- # Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] address
682
+ # Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] address
711
683
  # +display-name+ (or the mailbox +phrase+ in the RFC-822 grammar).
712
684
 
713
685
  ##
@@ -717,28 +689,28 @@ module Net
717
689
  # Returns the route from RFC-822 route-addr.
718
690
  #
719
691
  # Note:: Generating this obsolete route addressing syntax is not allowed
720
- # by [RFC5322[https://tools.ietf.org/html/rfc5322]]. However,
692
+ # by [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]. However,
721
693
  # addresses with this syntax must still be accepted and parsed.
722
694
 
723
695
  ##
724
696
  # method: mailbox
725
697
  # :call-seq: mailbox -> string or nil
726
698
  #
727
- # Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] address
699
+ # Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] address
728
700
  # +local-part+, if #host is not +nil+.
729
701
  #
730
702
  # When #host is +nil+, this returns
731
- # an [RFC5322[https://tools.ietf.org/html/rfc5322]] group name and a +nil+
703
+ # an [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] group name and a +nil+
732
704
  # mailbox indicates the end of a group.
733
705
 
734
706
  ##
735
707
  # method: host
736
708
  # :call-seq: host -> string or nil
737
709
  #
738
- # Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] addr-spec
710
+ # Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] addr-spec
739
711
  # +domain+ name.
740
712
  #
741
- # +nil+ indicates [RFC5322[https://tools.ietf.org/html/rfc5322]] group
713
+ # +nil+ indicates [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] group
742
714
  # syntax.
743
715
  end
744
716
 
@@ -750,14 +722,14 @@ module Net
750
722
  # :call-seq: dsp_type -> string
751
723
  #
752
724
  # Returns the content disposition type, as defined by
753
- # [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
725
+ # [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].
754
726
 
755
727
  ##
756
728
  # method: param
757
729
  # :call-seq: param -> hash
758
730
  #
759
731
  # Returns a hash representing parameters of the Content-Disposition
760
- # field, as defined by [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
732
+ # field, as defined by [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].
761
733
  end
762
734
 
763
735
  # Net::IMAP::ThreadMember represents a thread-node returned
@@ -796,12 +768,12 @@ module Net
796
768
  # FetchData#attr value. Although these classes don't share a base class,
797
769
  # this module can be used to pattern match all of them.
798
770
  #
799
- # See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2]
800
- # and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9]
771
+ # See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501#section-7.4.2]
772
+ # and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051#section-7.5.2-4.9]
801
773
  # for full description of all +BODYSTRUCTURE+ fields, and also
802
774
  # Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.
803
775
  #
804
- # === Classes that include BodyStructure
776
+ # == Classes that include BodyStructure
805
777
  # BodyTypeBasic:: Represents any message parts that are not handled by
806
778
  # BodyTypeText, BodyTypeMessage, or BodyTypeMultipart.
807
779
  # BodyTypeText:: Used by <tt>text/*</tt> parts. Contains all of the
@@ -819,8 +791,8 @@ module Net
819
791
  # message parts, unless they have a <tt>Content-Type</tt> that is handled by
820
792
  # BodyTypeText, BodyTypeMessage, or BodyTypeMultipart.
821
793
  #
822
- # See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2]
823
- # and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9]
794
+ # See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501#section-7.4.2]
795
+ # and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051#section-7.5.2-4.9]
824
796
  # for full description of all +BODYSTRUCTURE+ fields, and also
825
797
  # Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.
826
798
  #
@@ -837,45 +809,45 @@ module Net
837
809
  # :call-seq: media_type -> string
838
810
  #
839
811
  # The top-level media type as defined in
840
- # [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
812
+ # [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
841
813
 
842
814
  ##
843
815
  # method: subtype
844
816
  # :call-seq: subtype -> string
845
817
  #
846
818
  # The media subtype name as defined in
847
- # [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
819
+ # [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
848
820
 
849
821
  ##
850
822
  # method: param
851
823
  # :call-seq: param -> string
852
824
  #
853
825
  # Returns a hash that represents parameters as defined in
854
- # [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
826
+ # [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
855
827
 
856
828
  ##
857
829
  # method: content_id
858
830
  # :call-seq: content_id -> string
859
831
  #
860
832
  # Returns a string giving the content id as defined
861
- # in [MIME-IMB[https://tools.ietf.org/html/rfc2045]]
862
- # {§7}[https://tools.ietf.org/html/rfc2045#section-7].
833
+ # in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]]
834
+ # {§7}[https://www.rfc-editor.org/rfc/rfc2045#section-7].
863
835
 
864
836
  ##
865
837
  # method: description
866
838
  # :call-seq: description -> string
867
839
  #
868
840
  # Returns a string giving the content description as defined
869
- # in [MIME-IMB[https://tools.ietf.org/html/rfc2045]]
870
- # {§8}[https://tools.ietf.org/html/rfc2045#section-8].
841
+ # in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]]
842
+ # {§8}[https://www.rfc-editor.org/rfc/rfc2045#section-8].
871
843
 
872
844
  ##
873
845
  # method: encoding
874
846
  # :call-seq: encoding -> string
875
847
  #
876
848
  # Returns a string giving the content transfer encoding as defined
877
- # in [MIME-IMB[https://tools.ietf.org/html/rfc2045]]
878
- # {§6}[https://tools.ietf.org/html/rfc2045#section-6].
849
+ # in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]]
850
+ # {§6}[https://www.rfc-editor.org/rfc/rfc2045#section-6].
879
851
 
880
852
  ##
881
853
  # method: size
@@ -888,7 +860,7 @@ module Net
888
860
  # :call-seq: md5 -> string
889
861
  #
890
862
  # Returns a string giving the body MD5 value as defined in
891
- # [MD5[https://tools.ietf.org/html/rfc1864]].
863
+ # [MD5[https://www.rfc-editor.org/rfc/rfc1864]].
892
864
 
893
865
  ##
894
866
  # method: disposition
@@ -896,7 +868,7 @@ module Net
896
868
  #
897
869
  # Returns a ContentDisposition object giving the content
898
870
  # disposition, as defined by
899
- # [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
871
+ # [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].
900
872
 
901
873
  ##
902
874
  # method: language
@@ -1064,7 +1036,7 @@ module Net
1064
1036
  # call-seq: subtype -> string
1065
1037
  #
1066
1038
  # Returns the content subtype name
1067
- # as defined in [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
1039
+ # as defined in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
1068
1040
 
1069
1041
  ##
1070
1042
  # method: parts
@@ -1078,7 +1050,7 @@ module Net
1078
1050
  # call-seq: param -> hash
1079
1051
  #
1080
1052
  # Returns a hash that represents parameters
1081
- # as defined in [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
1053
+ # as defined in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].
1082
1054
 
1083
1055
  ##
1084
1056
  # method: disposition