Understanding Email Essentials: Exploring Scenarios, User Agents, and Protocols

Electronic mail (e-mail) serves as a versatile communication tool, allowing messages to encompass text, audio, and video, and facilitating the transmission of a single message to one or more recipients.


The e-mail system comprises three primary components:

  1. User Agent (UA): The interface through which users interact with the e-mail system.
  2. Message Transfer Agent (MTA): Responsible for transporting messages between sender and receiver.
  3. Message Access Agent (MAA): Facilitates access to messages, particularly in scenarios involving mail servers.

Email Architecture Scenarios:

1. First Scenario - Local System:

In the scenario where both the sender and the receiver of an email operate on the same system, the system requires the presence of only two user agents to facilitate communication.

2. Second Scenario - Different Systems:

In the second scenario of electronic mail, when the sender and the receiver operate on different systems, the communication setup requires two user agents (UAs) along with a pair of Message Transfer Agents (MTAs), consisting of a client and a server.

3. Third Scenario - LAN/WAN Connection:

In the third scenario of electronic mail, where the sender or receiver is connected to the mail server through a Local Area Network (LAN) or a Wide Area Network (WAN), the communication setup necessitates two User Agents (UAs) and two pairs of Message Transfer Agents (MTAs) comprising both client and server components.

4. Fourth Scenario - Both Connected to Mail Server:

In the fourth scenario of electronic mail, where both the sender and receiver are connected to the mail server through a Local Area Network (LAN) or a Wide Area Network (WAN), the communication architecture requires two User Agents (UAs), two pairs of Message Transfer Agents (MTAs) involving both client and server components, and a pair of Message Access Agents (MAAs).

 

User Agent in Electronic Mail

The foundational element of an electronic mail system, the user agent (UA), plays a crucial role in streamlining the process of sending and receiving messages for users. The user agent offers a range of services aimed at enhancing the overall user experience:

Services Provided by a User Agent:

  • A user agent serves as a software package with capabilities for composing, reading, replying to, and forwarding messages.
  • Beyond message handling, it also efficiently manages mailboxes to organize and store messages effectively.
Refer to the accompanying figure for a visual representation of the services offered by a typical user agent.

 


Composing Messages:

  • The user agent facilitates the composition of email messages, providing users with templates for ease of input.

Reading Messages:

  • As the second responsibility, the user agent reads incoming messages by checking the contents of the incoming mailbox.
  • User agents often display concise one-line summaries for each received email.
  • Essential fields within each email include a number, a status flag indicating read or unread, message size, sender information, and an optional subject field.

Replying to Messages:

  • Users can employ the user agent to craft replies to messages, with the option to include the original message along with their response.

Forwarding Messages:

  • Forwarding, the act of sending a message to a third party, is made simple by the user agent.
  • Users can forward messages with or without additional comments to other recipients.

Handling Mailboxes:

  • Typically, a user agent establishes two mailboxes – an inbox for received emails and an outbox for sent emails.
  • The inbox retains all received emails until the user decides to delete them.
  • The outbox stores sent emails until the user chooses to remove them, offering organized mailbox management.

 

User Agent Types

User agents fall into two main types, each designed to accommodate different user preferences and interactions:

1. Command-Driven User Agents:

  • These user agents operate with simple command inputs, typically accepting one-character commands from the keyboard to perform various tasks.
  • For example, typing 'r' at the command prompt triggers a reply to the sender, while 'R' might initiate a reply to both the sender and all recipients.

 

2. GUI-Based User Agents:

  • Distinguished by a graphical user interface (GUI), these user agents offer a visually intuitive interaction, utilizing both keyboard and mouse inputs.
  • Featuring elements such as icons, menu bars, and windows, GUI-based user agents provide user-friendly access to services.
  • Notable examples of GUI-based user agents include Eudora, Microsoft Outlook, and Netscape.

 

Mail Operations

Mail operations encompass the activities related to the management and handling of electronic mail (email), including tasks like creating, sending, receiving, and organizing messages within an email system. Users perform these operations through a user agent (UA), which is a software package facilitating functions such as composing, reading, replying to, forwarding, and managing mailboxes. The term "mail operations" encompasses the dynamic processes and interactions that occur throughout the entire lifecycle of emails, starting from their creation by the sender to their retrieval and organization by the recipient.


Sending Mail:

Crafting an email involves the user utilizing the User Agent (UA) to create a mail structure resembling traditional postal mail, comprising an envelope and a message.

Envelope:

  • Typically, the envelope carries essential details like sender and receiver addresses.

Message:

  • The message itself consists of a header and a body.
  • The header encompasses sender, receiver, and subject information.
  • The body holds the actual content intended for the recipient.

Receiving Mail:

When ready to peruse incoming mail, the user encounters a list displaying summarized information about each message within the mailbox. Selection of any message from the list enables the user to view its contents on the screen.

Addresses:

  • Effective mail delivery relies on a well-defined addressing system.
  • In the realm of the Internet, an address comprises two segments: a local part and a domain name, linked by an @ sign.

Local Part:

This part specifies the user's mailbox name, serving as the repository for received mail, managed by the Message Access Agent.

Domain Name:

Organizations designate hosts, often referred to as mail servers or exchangers, to handle email sending and receiving operations.

 

MIME (Multipurpose Internet Mail Extensions)

MIME (Multipurpose Internet Mail Extensions) extends the capabilities of electronic mail, addressing limitations in the simple structure that restricts messages to NVT 7-bit ASCII format. This basic structure is insufficient for languages beyond 7-bit ASCII characters, such as French, German, Hebrew, Russian, Chinese, and Japanese, and it cannot accommodate binary files or multimedia data.

MIME acts as a supplementary protocol, enabling the transmission of non-ASCII data through email. At the sender's end, MIME converts non-ASCII data into NVT ASCII format, which is then delivered to the client MTA for transmission over the Internet. Upon reaching the recipient, the message is transformed back to its original non-ASCII data.

To define the parameters for these transformations, MIME introduces five headers that can be added to the original email header section:

  1. MIME-Version
  2. Content-Type
  3. Content-Transfer-Encoding
  4. Content-Id
  5. Content-Description

 

The figure shows the MIME headers

MIME-Version: This header specifies the version of MIME being used, with the current version identified as 1.1.

Content-Type: This header delineates the type of data present in the message body. The content type and subtype are separated by a slash, and additional parameters may be included depending on the subtype. The general format is:

Content-Type: <type>/<subtype>; parameters

MIME supports seven different types of data.

Type

Subtype

Description

Text

Plain

Unformatted

HTML

HTML format

Multipart

Mixed

The body contains ordered parts of different data types

Parallel

Same as above, but no order

Digest

Similar to mixed subtypes, but the default is message/RFC822

Alternative

Parts are different versions of the same message

Message

RFC822

The body is an encapsulated message

Partial

The body is a fragment of a bigger message

External-Body

The body is a reference to another message

Image

JPEG

The image is in JPEG format

GIF

The image is in GIF format

Video

MPEG

The video is in MPEG format

Audio

Basic

Single-channel encoding of voice at 8kHz

Application

PostScript

Adobe PostScript

Octet-stream

General Binary data (8-bit bytes)

 

Content-Transfer-Encoding: This header outlines the method employed to encode messages into a format suitable for transport. The format is:

Content-Transfer-Encoding: <type>

There are five types of encoding methods.

Type

Description

 

7-bit

NVT ASCII characters and short lines

8-bit

Non-ASCII characters and short lines

Binary

Non-ASCII characters with unlimited-length lines

Base-64

6-bit blocks of data encoded into 8-bit ASCII characters

Quoted-printable

Non-ASCII characters are encoded as an equals sign followed by an ASCII code.

Content-Id: This header provides a unique identifier for the entire message in a multiple-message environment. The format is:

Content-Id: id=<content-id>

Content-Description: This header specifies whether the body contains an image, audio, or video. The format is:

Content-Description: <description>


Simple Mail Transfer Protocol (SMTP)

The process of transferring emails is facilitated by Message Transfer Agents (MTAs). For sending mail, a system requires a client MTA, while a server MTA is necessary for receiving mail. The standardized protocol governing the interactions between MTA clients and servers on the Internet is known as the Simple Mail Transfer Protocol (SMTP). The diagram illustrates the scope of the SMTP protocol within this context.

SMTP Architecture


SMTP Communication:

Between the MTA client and the MTA server, the communication is achieved through a series of commands and responses. The MTA client initiates requests, and the MTA server responds accordingly. SMTP utilizes these commands and responses to facilitate the transfer of messages between the MTA client and the MTA server. Each command or reply is concluded with a two-character end-of-line token. 


Let's examine each of these components:

Commands

Commands in SMTP are the instructions transmitted from the client to the server, comprising a keyword followed by zero or more arguments. Here are some key aspects:

  • SMTP defines a total of 14 commands.
  • The first five are mandatory, and every implementation must support them.
  • The following three commands are commonly used and highly recommended.

Let's take a closer look at the essential SMTP commands:

Keyword

Argument(s)

HELO

Sender’s hostname

MAIL FROM

The sender of the message

RCPT TO

The intended recipient of the message

DATA

Body of the mail

QUIT

 

RSET

 

VRFY

Name of recipient to be verified

NOOP

 

TURN

 

EXPN

Mailing list to be expanded

HELP

Command name

Command Format:

            Keyword: Argument(s)

 

Responses

Responses in SMTP are messages transmitted from the server to the client, consisting of a three-digit code that may be followed by additional textual information. Here are some key responses indicating permanent negative completion:

Permanent Negative Completion Replay

500

Syntax error; unrecognized command

501

Syntax error in parameters or arguments

502

Command not implemented

503

Bad sequence of commands

504

Command temporarily not implemented

550

The command is not executed; the mailbox is unavailable

551

User not local

552

Requested action aborted; exceeded storage location

553

Requested action not taken; mailbox name not allowed

554

Transaction Failed

Mail Retrieval Protocols: POP3 and IMAP4

In the third stage of mail delivery, where messages are retrieved from the server, SMTP is not involved since it operates as a push protocol. This stage requires a pull protocol, where the client pulls messages from the server. Two prevalent message access protocols cater to this need: Post Office Protocol, version 3 (POP3), and Internet Mail Access Protocol, version 4 (IMAP4).

  • POP3 (Post Office Protocol), the older of the two, is used for retrieving email and, in certain cases, leaving a copy of it on the server.
  • IMAP (Internet Message Access Protocol), which is used for coordinating the status of emails (read, deleted, moved) across multiple email clients. With IMAP, a copy of every message is saved on the server, so this synchronization task can be completed.

The figure illustrates the roles of these protocols in the typical mail retrieval process.

For this reason, incoming mail servers are called POP servers or IMAP servers, depending on which protocol is used.

To use a real-world analogy, MTAs act as the post office (the sorting area and mail carrier, which handles message transportation). MDAs act as mailboxes, which store messages (as much as their volume will allow) until the recipients check the box. This means that recipients don't need to be connected for them to be sent email.

To keep everyone from checking other users' emails, MDA is protected by a username called login and by a password. Retrieving mail is done using a software program called an MUA ( Mail User Agent ). When the MUA is a program installed on the user's system, it is called an email client (such as Mozilla Thunderbird, Microsoft Outlook, Eudora Mail, or Lotus Notes).

When it is a web interface used for interacting with the incoming mail server, it is called webmail.

 

POP3 (Post Office Protocol, version 3)

POP3, or Post Office Protocol, version 3, is a straightforward yet functionally limited mail retrieval protocol. The recipient's computer hosts the client POP3 software, while the mail server contains the server POP3 software. When a user wishes to download an email from the server's mailbox, the client initiates the process by establishing a connection with the server on TCP port 110. Subsequently, the client transmits its username and password for mailbox access. Following successful authentication, the user can list and retrieve mail messages individually.

POP3 Command-Response Exchange and Modes

POP3 operates through two distinct modes: delete mode and keep mode.

- Delete Mode:

  • In this mode, the retrieved mail is promptly deleted from the mailbox after each download.
  • Typically employed when the user operates from a fixed, permanent computer setup, allowing for subsequent saving and organization of received mail.

 

- Keep Mode:

  • In keep mode, the mail persists in the mailbox even after retrieval.
  • This mode proves useful when the user accesses their mail from a location other than their primary computer (e.g., a laptop). The mail is read on the go but retained in the system for future retrieval and organization.

 

Limitations of POP3:

  • POP3 lacks features for organizing mail on the server, meaning users cannot create distinct folders on the server.
  • The protocol does not permit users to preview the content of emails partially before initiating the download process.

 

IMAP4: Enhanced Mail Access Protocol

Internet Mail Access Protocol, version 4 (IMAP4), stands as an advanced alternative to POP3, offering additional features that contribute to its increased power and complexity.

IMAP4 Command-Response Exchange and Modes

IMAP4 introduces the following enhancements over POP3:

Preview and Search Functions:

  • Users can inspect email headers before initiating the download process.
  • The ability to search email content for specific character strings before downloading.

Partial Email Download:

  • Users can opt to download only a portion of an email. This proves advantageous in scenarios with limited bandwidth or emails containing multimedia with high bandwidth requirements.

Mailbox Management:

  • Users gain the ability to create, delete, or rename mailboxes directly on the mail server.

Mailbox Hierarchy:

  • IMAP4 allows users to establish a structured hierarchy of mailboxes within a folder, facilitating organized storage of emails.

 

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Ok, Go it!