Imap protocol-State Migration

Source: Internet
Author: User
Tags imap

For imap protocol specifications, refer to rfc3501. IMAP is a mail receiving protocol corresponding to POP3. The difference is that imap can use commands to operate emails stored on the server, you can decide whether to download the email to the local device as needed. For example, if you follow the mail header, you can only get the content of the mail header. POP3 only downloads the entire mail to the local device, the user can browse the email only after the entire email is downloaded to the local device.

Once the connection between the client and the server is established, an imap4rev1 connection will be in one of the four States. The initial status is marked in the welcome page of the server. Most commands are correct only in a specific status. When the connection is in a certain state, it is a protocol error for the client to try an inappropriate command. The server will respond to the result with a bad or no (depending on the implementation of the server) command.

(1) unauthenticated Status: In the unauthenticated status, the client must provide an authentication certificate before most commands are permitted. Unless the connection has been pre-authenticated, an unauthenticated connection starts.

(2) authentication Status: In the authentication status, the client is authenticated. It must first select a mailbox for access to permit commands that affect emails. When a pre-Authentication connection starts, an authorized authentication certificate is provided, an error occurs when you select a mailbox, or a successful close command, the authentication status is displayed.

(3) selected Status: in a selected status, an email address is selected for access. When a mailbox is selected successfully, it enters this state.

(4) logout status: the connection is being canceled. A client request (by using the logout command) or a unilateral action by the client or server will lead to this status.

(1) unauthenticated connections (OK Welcome)

(2) pre-authenticated connections (preauth welcome)

(3) rejected connections (bye welcome)

(4) the login or authenticate command is successfully executed.

(5) Successful select or examine commands

(6) Close command or failed select or EXAMINE command

(7) logout command, server closed, or connection closed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.