Wednesday, December 7, 2011

Telnet - POP3 - Minimal Introduction

To fetch messages with POP3 using Telnet client, seems to be a series of pretty simple steps, and its good to know these basic set of commands.

I have tried to list out some commands and their basic description, including the most basic status commands.


Scenario
  1. Open Connection
  2. Authenticate
  3. Check Mail
  4. Fetch Mail
  5. Exit


  1. Open connection
    telnet mail.mailserverhost.com 110
  2. Authenticate
    > USER username
    > PASS password  
  3. Check Mail
    > LIST 
  4. Fetch Mail
    > RETR msgId 
  5. Exit
    > QUIT
Response Messages
Its pretty simple to understand the response messages from POP3. The messages are declarative in nature.
  1. Success Response
    +OK
  2. Error Response
    -ERR error description message
More Commands
Some more commands which might be required.
  1. Delete Message> DELE msgID
  2. Reset any Delete Operation
    > RSET
    Delete operation takes place after the QUIT command. If any message has been queued for deletion, RSET command resets any such queue and hence clears all the delete operations.
  3. No Operation
    > NOOP
    During transaction state, might require to check the system response.
  4. STAT
    The POP3 server issues a positive response with a line containing information for the maildrop. This line is called a "drop listing" for that maildrop.
  5. APOP user digest
    Authenticate using Password Digest (instead of Plain text password)
  6. TOP msgID n
    Fetch n number of lines for a message identified by msgID
  7. UIDL msgId
    get unique-id listing for particular message
RFC 1939 gives the specification for POP3 protocol. To know more on the POP3 Protocol, detail description with examples and different types of error messages, visit the rfc specification
http://www.apps.ietf.org/rfc/rfc1939.html


No comments:

Post a Comment