The Transaction State
The STAT command requests that the server send a “drop listing” of the mailbox containing a positive response, the number of messages in the mailbox, and the size of the mailbox in octets. A drop listing for a mailbox with 23 messages in it, totaling 4351 octets, would look like this:
Client: STAT Server: +OK 23 4351
The format for a drop listing is rigid. Implementations should not extend drop listing to contain other information.
Messages that have been marked for deletion with a DELE command are not counted in the STAT response.
The LIST command requests a “scan listing” from the server, either for a message or for all messages in the chosen mailbox. A scan listing shows size information for messages.
A scan listing for a given message number (generated by a
LIST command with a message number as an
argument, e.g., LIST 3
) would return a single-line
response consisting of a positive status indicator followed by the
message number and the size of the message in octets. An example
response for message number 3 in a mailbox that is 356 octets long
would look like this:
Client: LIST 3 Server: +OK 3 356
A scan listing for all messages in a mailbox (generated by a LIST command without an argument, e.g., LIST) would return a multiline response. The first line would consist of a positive status indicator and a comment. The data lines would consist of a message number and a size for each message in the box, followed by a closing line consisting of a period (.) on a line ...
Get Programming Internet Email now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.