@@ -509,8 +509,7 @@ module Net
509509 # - Adds +MAILBOXID+ ResponseCode to #select and #examine untagged response.
510510 # - Updates #fetch and #uid_fetch with the +EMAILID+ and +THREADID+ items.
511511 # 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.
514513 #
515514 # == References
516515 #
@@ -1691,21 +1690,52 @@ def lsub(refname, mailbox)
16911690
16921691 # Sends a {STATUS commands [IMAP4rev1 §6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10]
16931692 # 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.
16961710 #
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.
17001712 #
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:
17021727 #
17031728 # p imap.status("inbox", ["MESSAGES", "RECENT"])
17041729 # #=> {"RECENT"=>0, "MESSAGES"=>44}
17051730 #
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].
17091739 def status ( mailbox , attr )
17101740 synchronize do
17111741 send_command ( "STATUS" , mailbox , attr )
0 commit comments