POP3 Protocol Command Source code and working principle

Source: Internet
Author: User
Tags command line mail md5 string client

A Brief introduction:

1. Pop applicable to C/s structure of the offline model of the e-mail protocol, has been developed to the third edition, said POP3. Offline models do not operate online, unlike IMAP4 (Netscape support IMAP4)

2. When a client connects to the server and queries for a new e-mail message, all messages that are downloaded by the client are downloaded to the client, and after downloading, the e-mail client can delete or modify any message without further interaction with the e-mail server.

3. POP3 customers send commands to the POP3 server and wait for a response, and the POP3 command is in the form of a command line, expressed in ASCII code. The server response is composed of a single command line, or multiple command lines, that respond to the first line with ASCII text + OK or-err to indicate whether the corresponding operation status is successful or failed

4. In the POP3 protocol, there are three states, approval status, processing status, and update status. When the client establishes a connection with the server, once the client provides its identity and succeeds in confirming, that is, the state of approval is transferred to the processing state, the client issues the QUIT command after the corresponding operation is completed, then enters the update status, and finally returns to the approval state after the update. The following figure

Waiting for connection identity confirmation quit command

--| Recognition | ————— | processing | —————— | update |

|__________________________________|

Return to approval Status

5. Approved State of command statement

In general, most existing POP3 clients and servers perform ASCII plaintext to send username and password, clients issue a connection when the acknowledgment status waits for a client to connect, and the command User/pass sends a plaintext username and password to the server on the network

For identity confirmation. Once successful, it is transferred to the processing state. To avoid the problem of sending plaintext passwords, there is a new authentication method, the command is APOP, the apop is used, and the password is encrypted before transmission. When the first connection is made to the server, the POP3 server sends an ASCII greeting to the client that consists of a string of characters that is unique to each client and is related to the time, and then the client attaches its plain text password to the string received from the server, Then the MD5 function Message Digest of the result string is computed, and the client sends the user name and the MD5 message digest as the parameters of the APOP command. Currently, most mail client software on Windows does not support the APOP command, Qpopper support.



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.