Google

Tuesday, February 5, 2008

Some thing about telnet

Run the command prompt.
Telnet from your computer to the mail server by using this command:
telnet hostname/IP 110

The mail server will respond with either:
-ERR for a wrong command
+OK for a correct command

Commands for entering user name and password are
* USER userid
After the connection write this command. Put the userid instead of the full e-mail address like some.guy rather than some.guy@someguy.com.
* PASS password
This is for entering the password.

The POP3 servers expects a programs input rather than a human input, so it doesn’t appreciate a typing error. So it doesn’t recognize the backspace or delete keys.

Other Commands that you can use are:

* STAT
The response to this is:
+OK #msgs #bytes
Where #msgs is the number of messages in the mail box and #bytes is the total bytes used by all messages.
* LIST
The response to this lists a line for each message with its number and size in bytes, ending with a period on a line by itself.
Sample response:
+OK 3 messages
1 1205
2 305
3 344400
.
* RETR msg#
This retrieves the specified message “msg#” (and displays it on the Telnet screen). You probably don’t want to do this in Telnet (unless you have turned on Telnet logging).
* TOP msg# #lines
This is an optional POP3 command. Not all POP3 servers support it. It lists the header for “msg#” and the first “#lines” of text in the message.
For example, TOP 1 0 would list just the headers for message 1, whereas TOP 1 5 would list the headers and first 5 lines of the message text.
* DELE msg#
This marks message number “msg#” for deletion from the server. This is the way to get rid of a problem causing message. It is not actually deleted until the QUIT command is issued. If you lose the connection to the mail server before issuing the QUIT command, the server shouldn’t delete any messages.
* RSET
This resets (unmarks) any messages previously marked for deletion in this session so that the QUIT command will not delete them.
* QUIT
This deletes any messages marked for deletion, and then logs you off of the mail server. This is the last command to use.

No comments: