Using POP

POP3 provides a standard mechanism for retrieving electronic mail from a remote server. The messages stored on the server may be deleted (as is usually the case) or retained. This allows many millions of home Internet users to have electronic mail sent to a mail server at their Internet service provider, then retrieve it when they are online. Small offices can use POP in the same manner to pull mail for many users from a mail server at a home office or an Internet service provider. These remote mail servers are known as maildrops. In short, any user that wishes to receive email on his own machine or LAN, but does not have a permanent Internet connection, may use POP.

A maildrop host must provide several services. It must include an SMTP MTA, providing mail services for all local users (if any) as well as for users for which it acts as a maildrop. The MTA must have access to at least one MDA for local message delivery. Chapter 1 described the relationship of MTAs and MDAs. In order for this machine to provide services as a POP maildrop, it must also include an MRA for POP services. This MRA would consist of a POP server capable of answering POP requests from authorized remote clients.

A POP server is a TCP application daemon that listens for POP requests on TCP port 110.[15]This is called a well-known port. Any POP client wishing to request service from a known host connects to this port. A server typically responds by spawning a new thread or a copy of itself (a fork) to handle each new connection. These threads or copies are either destroyed or returned to a pool when a session completes. In this way, a server can handle many requests from a single application.

Networks services under Unix can either be run standalone or arbitrated by the inetdaemon. If a program is run continuously and listens for any incoming connections itself, it is a standalone service. The act of listening for incoming connections may be left to to the inet “super-daemon,” which will either start the necessary service or pass the request to a running service, thereby optimizing the server resources.

Like other network services, POP3 daemons may be run either standalone or via the inet service.

MUAs that provide support for the POP3 protocol implement a POP3 client. A POP3 client may retrieve mail by initializing a connection to a POP server on the maildrop host. Figure 10-1 shows this behavior.

The situation for a LAN that is intermittently connected to the Internet is slightly more complex. Instead of servicing a single user and thereby a single MUA, the machine that retrieves remote mail must serve many users on many machines.

An internal mailhost can use the POP3 protocol to retrieve mail from a maildrop on the Internet, as shown in Figure 10-2. The Unix utility fetchmail is often used for this purpose, although there are other solutions. fetchmail acts as a POP client, then remails each message to a local MTA, which delivers it to each user’s mailbox. Of course, it is equally possible to write a utility that acts as a POP client and directly appends each message to each user’s local mailbox.

POP usage for a dial-in bost
Figure 10-1. POP usage for a dial-in bost

Internal LAN users would then retrieve their mail in one of three ways: via an MUA on the local mailhost, via IMAP from an MUA on their own machine, or again via POP from an MUA on their own machine.



[15] The older POP2 protocol, now superceded, listened on TCP port 109. There are very few POP2 servers now in service, and those that are should probably be upgraded to POP3. New mail services that create MRAs should implement POP3.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.30.232