@@ -492,7 +492,7 @@ module Net
492492 # - #xlist: replaced by +SPECIAL-USE+ attributes in #list responses.
493493 #
494494 # *NOTE:* The +OBJECTID+ extension should replace +X-GM-MSGID+ and
495- # +X-GM-THRID+, although neither Gmail nor Net::IMAP support it yet .
495+ # +X-GM-THRID+, but Gmail does not support it (as of 2023-11-10) .
496496 #
497497 # ==== RFC6851: +MOVE+
498498 # Folded into IMAP4rev2[https://tools.ietf.org/html/rfc9051] and also included
@@ -504,6 +504,13 @@ module Net
504504 #
505505 # - See #enable for information about support for UTF-8 string encoding.
506506 #
507+ # ==== RFC8474: +OBJECTID+
508+ # - Adds +MAILBOXID+ ResponseCode to #create tagged response.
509+ # - Adds +MAILBOXID+ ResponseCode to #select and #examine untagged response.
510+ # - Updates #fetch and #uid_fetch with the +EMAILID+ and +THREADID+ items.
511+ # See FetchData#emailid and FetchData#emailid.
512+ # - Updates #status with support for the +MAILBOXID+ status attribute.
513+ #
507514 # == References
508515 #
509516 # [{IMAP4rev1}[https://www.rfc-editor.org/rfc/rfc3501.html]]::
@@ -1683,21 +1690,52 @@ def lsub(refname, mailbox)
16831690
16841691 # Sends a {STATUS commands [IMAP4rev1 Β§6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10]
16851692 # and returns the status of the indicated +mailbox+. +attr+ is a list of one
1686- # or more attributes whose statuses are to be requested. Supported
1687- # 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.
16881710 #
1689- # MESSAGES:: the number of messages in the mailbox.
1690- # RECENT:: the number of recent messages in the mailbox.
1691- # UNSEEN:: the number of unseen messages in the mailbox.
1711+ # +DELETED+:: The number of messages with the <tt>\Deleted</tt> flag.
16921712 #
1693- # 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:
16941727 #
16951728 # p imap.status("inbox", ["MESSAGES", "RECENT"])
16961729 # #=> {"RECENT"=>0, "MESSAGES"=>44}
16971730 #
1698- # A Net::IMAP::NoResponseError is raised if status values
1699- # for +mailbox+ cannot be returned; for instance, because it
1700- # 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].
17011739 def status ( mailbox , attr )
17021740 synchronize do
17031741 send_command ( "STATUS" , mailbox , attr )
0 commit comments