My 2 paisas

Posts Tagged ‘POP3

  • Coutsey to Bob Peers
  • The basics.

    About POP.

    POP is simply a protocol for retrieving emails from a remote server. The vast majority of mail
    providers use this protocol and it has been around for many years now. The protocol, in it’s
    simplest form, is just a few text commands sent from your computer over the internet which when received by the mail server prompt it to respond with the
    requested information. There’s only 4 or 5 basic commands we need to know to get started so it’s very simple.

    Before starting it’s important to know a few things:

    Mail server address.

    The address of your mail server, this will usually be of the form You should look at the settings in your email client or documentation about your
    email account to get this information.


    In this demonstration we will be sending our account username and password unencrypted over the internet, if this is a major concern to you then you should not follow
    this exercise.

    Using telnet.

    If you make a mistake in a telnet session you cannot use backspace to delete the entry, you may have to press enter to get an error and then re-type the command or quit and start again.

    Connecting to the host.

    First open up a terminal and type the following, of course replacing with the address of your POP server:

    telnet 110

    This should return something like:

    telnet 110
    Connected to (
    Escape character is '^]'.
    +OK Hello there.

    Logging in.

    Next we need to log in using the user command.

    user myusername
    +OK Password required.

    Now give our password using the pass command.

    pass ***********
    +OK logged in.

    The list command.

    To see a list of all the messages on the server and their sizes in bytes use the list command. If you specify a message number then only that message will be shown,
    i.e list 7.

    +OK POP3 clients that break here, they violate STD53.
    1 22683
    2 19870
    3 785
    4 4475
    5 3221
    6 2972
    7 2412

    This just shows that I have 7 emails on the server, they are listed in order from oldest first to newest last.

    Reading the messages using retr.

    To read one of the messages use the retr command followed
    by the message number returned from the list command. It will return the whole message including all headers.

    retr 7
    +OK 2412 octets follow.
    Return-Path: <>
    Received: from ( [])
    by (Postfix) with ESMTP id 554DA180D71
    for <>; Wed, 1 Feb 2006 10:09:54 +0100 (CET)
    Received: from ( [])
    by (Postfix) with ESMTP id 2984C7049
    for <>; Tue, 31 Jan 2006 18:37:01 +0100 (CET)
    Received: from frontend1.internal (mysql-sessions.internal [])
    by (Postfix) with ESMTP id 2069DD335A7
    for <>; Tue, 31 Jan 2006 12:36:18 -0500 (EST)
    Received: from ([])
    by frontend1.internal (MEProxy); Tue, 31 Jan 2006 12:36:18 -0500
    Received: by (Postfix, from userid 99)
    id 1148513964; Tue, 31 Jan 2006 12:36:12 -0500 (EST)
    Content-Disposition: inline
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain
    MIME-Version: 1.0
    X-Mailer: MIME::Lite 5022 (F2.73; T1.15; A1.64; B3.05; Q3.03)
    Date: Tue, 31 Jan 2006 17:36:12 UT
    From: "Email Administrator" <>
    Reply-To: "Email Administrator" <>
    Subject: Your account activation
    Message-Id: <>


    Reading the top n lines with top.

    The top command is used to read the top n lines of a message, the syntax is ‘top message n’ where n is the number of lines you wish to read. Note
    that the full headers will be returned along with a new line and then the n lines of the message body.

    top 3 5
    Headers appear here.....

    This is a multi-part message in MIME format.

    Content-Type: text/plain;

    The stat command.

    To see the total number and size of all messages issue the stat command.

    +OK 7 56418

    Deleting messages using dele.

    To delete a message use dele followed by the message number, note that messages are not immediately deleted, they will only be deleted after quitting the session.

    dele 7
    +OK Deleted.

    The stat command again shows the message is gone.

    +OK 6 54006

    Resetting the account using rset.

    Since the message is only marked for deletion we can undelete the message (and any other marked for deletion) by using rset (for reset).

    +OK Resurrected.

    Again, stat shows the message is now back.

    +OK 7 56418

    To end the session use quit, this will now permanently delete the messages you deleted during this session.

    +OK Bye-bye.


    It’s very simple to read your emails from a POP account using telnet by just remembering a few simple commands, what we have done here is basically exactly
    the same as an email client, like Thunderbird or Outlook Express, does when it retrieves your mail. Of course on a daily basis it’s much nicer to use a web interface
    or email client but in those situations where all you have is an internet connection then this is a great fall-back especially since nearly every computer will
    have telnet already installed.

    Tags: , ,


    POP3 advantages

    – messages load very quickly once they’re downloaded
    – messages are stored on your hard drive so they’re not subject to server storage limits and quotas
    – widely supported by ISPs and email providers
    – all email programs support it

    POP3 disadvantages

    – messages are stored on your hard drive so they’re not accessible from other computers
    – sent mail and drafts are not accessible from other computers either
    – messages are eventually removed from the server
    – messages are stored in files that are not compatible between different programs
    – it’s usually difficult to migrate from one program to another, sometimes impossible
    – it’s cumbersome to copy your email to another computer (office, home, school, laptop, etc.)
    – users normally don’t have backups of their email

    IMAP advantages

    – messages are stored on the server are accessible from any computer and webmail anywhere in the world
    – IMAP mail folders remain synchronized with IMP (webmail)
    – sent messages and drafts are also stored on the server
    – server-side spam filtering is easily implemented with IMAP
    – IMAP mail is backed up nightly on the server and can be restored
    – ease of migration from a program to a program and from a computer to another computer/location
    – ease of setting up additional computers to check your email, no need to copy anything fro one computer to another

    IMAP disadvantages

    – messages load slower, in particular the first time they’re read
    – sensitive to size and requires periodic archival of email messages
    – subject to storage quotas (not the case with Saturn, however)
    – very few ISPs and email providers offer IMAP as it is considered a high end option and it’s complex for them to support
    – not all email programs support it properly

    Tags: ,

    Links that I liked to save

    Blog Stats

    • 45,193 hits