• One of the most popular Internet services is electronic mail (e-mail). The designers of the Internet probably never imagined the popularity of this application program
• In the first scenario, the sender and the receiver of the e-mail are users (or application programs) on the same system; they are directly connected to a shared system.
• The administrator has created one mailbox for each user where the received messages are stored. A mailbox is part of a local hard drive, a special file with permission restrictions.
• Only the owner of the mailbox has access to it. When Alice, a user, needs to send a message to Bob, another user, Alice runs a user agent (VA) program to prepare the message and store it in Bob's mailbox.
• The message has the sender and recipient mailbox addresses (names of files). Bob can retrieve his convenience, using a user agent.
• Figure 1 shows the concept. This is similar to the traditional memo exchange between employees in an office. There is a mailroom where each employee has a mailbox with his or her name on it.
• When Alice needs to send a memo to Bob, she writes the memo and inserts it into Bob's mailbox. When Bob checks his mailbox, he finds Alice's memo and reads it.
• In the second scenario, the sender and the receiver of the e-mail are users (or application programs) on two different systems.The message needs to be sent over the Internet. Here we need user agents (VAs) and message transfer agents (MTAs), as shown in Figure 2
• Alice needs to use a user agent program to send her message to the system at her own site.
• The system (sometimes called the mail server) at her site uses a queue to store messages waiting to be sent. Bob also needs a user agent program to retrieve messages stored in the mailbox of the system at his site.
• The message, however, needs to be sent through the Internet from Alice's site to Bob's site. Here two message transfer agents are needed: one 'client and one server. Like most client/server programs on the Internet, the server needs to run all the time because it does not know when a client will ask for a connection.
• The client, on the other hand, can be alerted by the system when there is a message in the queue to be sent
• In the third scenario, Bob, as in the second scenario, is directly connected to his system. Alice, however, is separated from her system. Either Alice is connected to the system via a point-to-point WAN, such as a dial-up modem, a DSL, or a cable modem; or she is connected to a LAN in an organization that uses one mail server for handling e-mails-all sers need to send their messages to this mail server.
• Figure 3 shows the situation
• Alice still needs a user agent to prepare her message. She then needs to send the message through the LAN or WAN.
• This can be done through a pair of message transfer agents (client and server). Whenever Alice has a message to send, she calls the user agent which, in tum, calls the MTA client.
• The MTA client establishes a connection with the MTA server on the system, which is running all the time. The system at Alice's site queues all messages received.
• It then uses an MTA client to send the messages to the system at Bob's site; the system receives the message and stores it in Bob's mailbox.
• At his convenience, Bob uses his user agent to retrieve the message and reads it. Note that we need two pairs of MTA client/server programs.
• In the fourth and most common scenario, Bob is also connected to his mail server by a WAN or a LAN.
• After the message has arrived at Bob's mail server, Bob needs to retrieve it. Here, we need another set of client/server agents, which we call message access agents (MAAs).
• Bob uses an MAA client to retrieve his messages. The client sends a request to the MAA server, which is running all the time, and requests the transfer of the messages. The situation is shown in Figure 4
• There are two important points here. First, Bob cannot bypass the mail server and use the MTA server directly.
• To use MTA server directly, Bob would need to run the MTA server all the time because he does not know when a message will arrive.
• This implies that Bob must keep his computer on all the time if he is connected to his system through a LAN. If he is connected through a-WAN, he must keep the connection up all the time. Neither of these situations is feasible today.
• Second, note that Bob needs another pair of client/server programs: message access programs. This is so because an MTA client/server program is a push program: the client pushes the message to the server. Bob needs a pull program. The client needs to pull the message from the server. Figure 5 shows the difference.