class Net::IMAP

def status(mailbox, attr)

{[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html].
+MAILBOXID+ requires the server's capabilities to include +OBJECTID+

+DELETED+ requires the server's capabilities to include +IMAP4rev2+.

{[RFC8483]}[https://www.rfc-editor.org/rfc/rfc8483.html].
STATUS=SIZE
+SIZE+ requires the server's capabilities to include either +IMAP4rev2+ or

===== Capabilities

#=> {"RECENT"=>0, "MESSAGES"=>44}
p imap.status("inbox", ["MESSAGES", "RECENT"])

===== For example:

either an Integer or an ExtensionData object.
Unsupported attributes may be requested. The attribute value will be

_NOTE:_ +RECENT+ was removed from IMAP4rev2.
The number of messages with the \Recent flag.
+RECENT+::

{[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html#section-4].
See +OBJECTID+
A server-allocated unique _string_ identifier for the mailbox.
+MAILBOXID+::

the sum of all messages' +RFC822.SIZE+ fetch item values.
The approximate size of the mailbox---must be greater than or equal to
+SIZE+::

+DELETED+:: The number of messages with the \Deleted flag.

+UNSEEN+:: The number of messages without the \Seen flag.

+UIDVALIDITY+:: The unique identifier validity value of the mailbox.

+UIDNEXT+:: The next unique identifier value of the mailbox.

+MESSAGES+:: The number of messages in the mailbox.

===== Supported attributes

does not exist.
for +mailbox+ cannot be returned; for instance, because it
A Net::IMAP::NoResponseError is raised if status values

integer values, but some return other value types (documented below).
The return value is a hash of attributes. Most status attributes return

or more attributes whose statuses are to be requested.
and returns the status of the indicated +mailbox+. +attr+ is a list of one
Sends a {STATUS commands [IMAP4rev1 ยง6.3.10]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.10]
def status(mailbox, attr)
  synchronize do
    send_command("STATUS", mailbox, attr)
    clear_responses("STATUS").last&.attr
  end
end