SMTP (POP) protocol analysis experiment

1. Overview of SMTP

1. Introduction to SMTP Protocol
SMTP is a protocol that provides reliable and effective email transmission. SMTP is a mail service based on FTP file transfer service. It is mainly used to transfer mail information between systems and provide notifications about incoming letters.
2. The working process of the
SMTP protocol The working process of the SMTP protocol can be divided into the following three processes:
(1) Connection establishment: At this stage, the SMTP client requests to establish a TCP connection with port 25 of the server. Once the connection is established, the SMTP server and the client begin to advertise their domain names to each other, and at the same time confirm each other's domain names.
(2) Mail transmission: Using commands, the SMTP client transmits the source address, destination address and specific content of the mail to the SMTP server, and the SMTP server responds accordingly and receives the mail.
(3) Connection release: the SMTP client issues an exit command, the server responds after processing the command, and then closes the TCP connection.

2. Experimental configuration

1. Experimental tools
foxmail, wireshark
2. Experimental steps
1. First use foxmail to edit an email and do not send it temporarily;
2. Start wireshark for group capture;
3. Send edited emails;
3. The
Insert picture description here
first three experimental results are client-side The three-way handshake data packet connected with the server via TCP.
66 C: For security reasons, the SMTP server requires that the sender be authenticated when sending mail, and the client sends AUTH LOGIN.
72 S: The server returns a response, a string text encoded with base64, username.
4. POP message The
Insert picture description here
host sends the command code STAT to the server, and the server sends back the statistics of the mailbox to the host, including the total number of mails and total bytes, 6 mails, 911590 bytes.

The host sends a command code LIST to the server, and the server returns the number of mails and the size of each mail.

The host sends the command code QUIT to the server to terminate the session.

Guess you like

Origin blog.csdn.net/weixin_44366125/article/details/105873621