

An IMAP client thus cannot rearrange message orders. UIDs are required to be assigned in ascending (but not necessarily sequential) order within a mailbox this means that if a non-IMAP client rearranges the order of mailitems within a mailbox, the UIDs have to be reassigned. UIDs, on the other hand, are permanently guaranteed not to identify another message within the same mailbox, even if the existing message is deleted. If messages are expunged from the mailbox, remaining messages have their sequence numbers “shuffled down” to fill the gaps. If a new message arrives during a session, it receives a sequence number equal to the new size of the mailbox. Message sequence numbers number messages within a mailbox from 1 up to the number of items in the mailbox.


Messages have two sorts of identifiers: message sequence numbers and UIDs. Once the client has successfully selected a mailbox, they enter selected state, and that mailbox becomes the current mailbox, on which mail-item related commands implicitly operate. To work on the messages within a mailbox, the client must first select that mailbox, using either select or (for read-only access) examine. How this is implemented on the server is implementation-dependent on a UNIX server, it will frequently be implemented as files in mailbox format within a hierarchy of directories. Most work with mailboxes, which may be arranged in an hierarchical namespace, and each of which contains zero or more messages. Having authenticated itself, there is a range of commands available to it. IMAP Overview ¶ ↑Īn IMAP client connects to a server, and then authenticates itself using either authenticate or login. Net::IMAP implements Internet Message Access Protocol ( IMAP) client functionality. CLASS Net::IMAP::DigestMD5Authenticator.
