@@ -509,8 +509,7 @@ module Net
509
509
# - Adds +MAILBOXID+ ResponseCode to #select and #examine untagged response.
510
510
# - Updates #fetch and #uid_fetch with the +EMAILID+ and +THREADID+ items.
511
511
# See FetchData#emailid and FetchData#emailid.
512
- # >>>
513
- # *NOTE: The +MAILBOXID+ attribute for #status is not supported yet.
512
+ # - Updates #status with support for the +MAILBOXID+ status attribute.
514
513
#
515
514
# == References
516
515
#
@@ -1691,21 +1690,52 @@ def lsub(refname, mailbox)
1691
1690
1692
1691
# Sends a {STATUS commands [IMAP4rev1 §6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10]
1693
1692
# and returns the status of the indicated +mailbox+. +attr+ is a list of one
1694
- # or more attributes whose statuses are to be requested. Supported
1695
- # attributes include:
1693
+ # or more attributes whose statuses are to be requested.
1694
+ #
1695
+ # The return value is a hash of attributes.
1696
+ #
1697
+ # A Net::IMAP::NoResponseError is raised if status values
1698
+ # for +mailbox+ cannot be returned; for instance, because it
1699
+ # does not exist.
1700
+ #
1701
+ # ===== Supported attributes:
1702
+ #
1703
+ # +MESSAGES+:: The number of messages in the mailbox.
1704
+ #
1705
+ # +UIDNEXT+:: The next unique identifier value of the mailbox.
1706
+ #
1707
+ # +UIDVALIDITY+:: The unique identifier validity value of the mailbox.
1708
+ #
1709
+ # +UNSEEN+:: The number of messages without the <tt>\Seen</tt> flag.
1696
1710
#
1697
- # MESSAGES:: the number of messages in the mailbox.
1698
- # RECENT:: the number of recent messages in the mailbox.
1699
- # UNSEEN:: the number of unseen messages in the mailbox.
1711
+ # +DELETED+:: The number of messages with the <tt>\Deleted</tt> flag.
1700
1712
#
1701
- # The return value is a hash of attributes. For example:
1713
+ # +SIZE+::
1714
+ # The approximate size of the mailbox---must be greater than or equal to
1715
+ # the sum of all messages' +RFC822.SIZE+ fetch item values.
1716
+ #
1717
+ # +MAILBOXID+::
1718
+ # A server-allocated unique identifier for the mailbox.
1719
+ # See +OBJECTID+
1720
+ # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html#section-4].
1721
+ #
1722
+ # +RECENT+::
1723
+ # The number of messages with the <tt>\Recent</tt> flag.
1724
+ # _NOTE:_ +RECENT+ was removed from IMAP4rev2.
1725
+ #
1726
+ # ===== For example:
1702
1727
#
1703
1728
# p imap.status("inbox", ["MESSAGES", "RECENT"])
1704
1729
# #=> {"RECENT"=>0, "MESSAGES"=>44}
1705
1730
#
1706
- # A Net::IMAP::NoResponseError is raised if status values
1707
- # for +mailbox+ cannot be returned; for instance, because it
1708
- # does not exist.
1731
+ # ===== Capabilities
1732
+ #
1733
+ # +SIZE+ requires the server's capabilities to include either +IMAP4rev2+ or
1734
+ # <tt>STATUS=SIZE</tt>
1735
+ # {[RFC8483]}[https://www.rfc-editor.org/rfc/rfc8483.html].
1736
+ #
1737
+ # +MAILBOXID+ requires the server's capabilities to include +OBJECTID+
1738
+ # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html].
1709
1739
def status ( mailbox , attr )
1710
1740
synchronize do
1711
1741
send_command ( "STATUS" , mailbox , attr )
0 commit comments