SMTP & POP Command Detailed (Z)

zhaozj2021-02-16  109

SMTP & POP command Detailed ~ Author: I'm hungry

I used to see a friend asked the username and password of the stream scan to the POP3 server. I can use the software such as Outlook to help others collect Email. But !!! 1. Use their system resources too large. 2 Before using it! Trouble. 3. We have to learn more knowledge. So, please see it down. See how to send and receive email ~ first explain to your convenience. I put it. I put it. I put it. I put it. I put it. I put it. I put it. I put it. I put it. I put it. I put it. I Some fonts have made changes. Red word is the command of the command we need to enter. Brown words I add anything else is the content returned by the server. (I am so bitter ~~~ This forum change font color to use YBB code Not very convenient ~) Another thing to explain. The instruction is not substantial. (Except for the user password) Is it because it explains what is SMTP? Don't say it. Don't say it. Many introductions to their articles. It is better than I said. It's better to talk, let's start. How do you get it ??? We use the SMTP server to send an email first.

Telnet SMTP.21CN.com 25 // Connect the SMTP server. The port is 25 220 21cn.com SMTP Server Of AIMC 2.9.5.1; MON, 25 JUN 2001 12:41:51 0800 // The information returned by the server Helo 250 21CN. Com, unknown.host <61.138.26.124> okay. Mail from: stonegong@21cn.com// Tell the server sender's Email address 250 , sender ok. Rcpr ro: stonegong@yeah.net // Tell the server's address. 250 User not local, will forward to .// OK! Let's start writing ~~ data // Tell the server We have to start writing ~~ Subject: Hello // Subject is filled in the subject. If you do not need the topic, you can enter the content directly. Hi: how are you ?. After the wrap is entered, press Enter, indicate the writing of the letter content. 250 Requester Mail Action Okay, Completed. quit // Send a letter, end the conversation, exit the SMTP server. If you want to cancel the send you can use the RSET command. 221 21cn.com Closing connection./~ OK, finished.

Let's take the POP server to collect the email we just sent.

Telnet pop.yeah.net 110 / / should also be connected first. Port 110 OK Incore System Mail Pop3 Server Ready User StoneGong // Tell the server My username OK core mail pass ******** // The **** here represents your password. It will be clearly displayed when you entered. If someone is next to it, I will turn off the back ~ ok 1 message (s) [457 Byte (s)] // See? Have a letter ~ List // Let's take a closer look. OK 1 457 1 457 .// The first 475 is the total number of bytes of all messages, 1 of the one behind the first email Because there is only one, it is equal. RETR 1 // Returns all the contents of the first letter. OK 457 OCTS Received: from 21cn.com (unknown [61.140.60.248]) by mx1.yeah.net (postfix) WITH SMTP ID E578D1CED4CAC for ; MON, 25 JUN 2001 12:49:17 0800 (CST) received: from unknown.host ([61.138.26.124]) by 21cn.com (AIMC 2.9.5.1 ) with SMTP ID JMA3B36F1FC; MON, 25 JUN 2001 12:43:27 0800 Subject: hello hi: how are you? Message-ID: <20010625044917.E578D1CED4CAC@mx1.yeah.net> Date: Mon, 25 Jun 2001 12 : 49: 17 0800 (CST) from: stonegong@21cn.com .// Look ?? Just send the sea ~ dele 1 // No, delete it. Ok Core Mail List OK 0 0. / 没 没 ~~ But this time does not completely delete, wait until you exit it is completely deleted, if you want to recover you can use the rest n command, n represents the number of email. Quit // Nothing Dry. Let's go ~. OK Core Mail is the full content of my telnet's log file. I added a note, I will definitely understand it ~~ Write more in a hurry. Write I have a wrong word. I will understand it slowly ~ There are still some commands that have not been mentioned. Don't say these should be enough. If you want to know

Take a look here, then try it yourself.

If you have any of the commands you have not understood, you can see the following command. Let's talk about the SMTP server. Helo:

You can tell the SMTP server your address,
General for your E- Mail address @ behind the part. If your electricity

The submit address is: someone@21cn.com, the

is 21cn.com (I have not yet entered anything.) Mail from: Use the mail from command to enter the recipient reply The email address available when you are usually used, but you can also be any character that meets the email address format. RCPT TO: RCPT TO command requires you to enter the email address of the recipient, you can use multiple RCPT to commands to send the email to multiple receipts.

people. VRFY: The vrfy command will verify the correctness of the subsequent email address. Generally, the email address can be verified by using the vrfy command, and then send the message to the address using the RCPT TO command. This order I didn't try to success. Maybe my command is wrong. DATA Type the DATA and then enter the mail content. If you enter the Subject: , the closer will see the in the topic or Subject column. Otherwise, the input section will serve as the content of the Mail Subject (Body). End the letter content input, you can press <. (Journal)> . The RSET RSET command will abort the sender operation, and delete the input content. Quit Quit Send a letter, end the dialog, exit the SMTP server. In the case of POP. User Enter the user's mailbox name with the user command, Generally, the user's email address @, such as the address is someone@21cn.com,, To Someone Some information will be displayed after the command is executed, and prompts the user to enter the password. PASS Enter the user mailbox password with the pass command. STAT Enter the stat command, the server will tell the user how many letters are in the mailbox. List Displays the number of letters, serial numbers, and the size of each letter. Top N m Displays the contents of the M row before the Nth letter. The Retr n retri command can display all the contents of the nth letter. Use the Dele n dele command to delete the specified Nth letter. The REST n REST command can restore N letters deleted. The Last Last command can display the number of the next letter. The NOOP NOOP command does not perform anything, which is only used to test whether the response of the server is normal. Quit Quit Exit the POP3 server and end the letter review process. *********************************************************** *********************************** Finally, I'm finished. I am so happy. I don't know if you are using it. I hope there is ~~ If there is Please eat ~~ Haha ~~ The article in the color color is really not easy !!

There is a write pen in the above. Below is an example: telnet xxxx.xxxx.xxx 25 mail from: test@263.net (Who's mailbox? I am not only;) rcpt to: test@263.net data xxx. Quit

If you want to see the commands supported by the server, you can use the help command to see if you use: telnet xxx.xxx.xxx 25 Help 214-this is sendmail version 8.9.3 214-Topics: 214- Helo Ehlo Mail Rcpt Data 214- RSET NOOP Quit Help VRFY 214- EXPN VERB ETRN DSN 214-for More Info Use "Help ". 214-To Report Bugs in The Implementation Send Email To 214- Sendmail-Bugs@sendmail.org. 214-for local information Send email to postmaster at your site. 214 end of help info huh, That'a all enjoy it:) The command set of POP3 is in RFC1939, I explain that I extracted: 9. Pop3 Command Summary

Minimal Pop3 Commands:

User name Valid in the Authorization State Pass String Quit

Stat Valid in The Transaction State List [MSG] Retr MSG Dele MSG NOOP RSET Quit

Optional POP3 Commands:

Apop name Digest Valid in The Authorization State

Top Msg N Valid in The Transaction State Uidl [MSG]

POP3 Replies:

OK -ERR

转载请注明原文地址:https://www.9cbs.com/read-10366.html

New Post(0)