You are on page 1of 43

Electronic Mail: SMTP, POP, and IMAP

Content
Email Four configurations of email architecture User agent Format of email SMTP POP3 and IMAP4
TCP/IP Protocol Suite

What is E-mail?
Email, also known as electronic mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet . Some early email systems required that the author and the recipient both should be online at the same time ,but today email systems are based on a store-and-forward model.

TCP/IP Protocol Suite

20.1 ARCHITECTURE
To explain the architecture of email, we give four scenarios. We begin with the simplest situation and add complexity as we proceed. The fourth scenario is the most common in the exchange of email.

The topics discussed in this section include: First Scenario Second Scenario Third Scenario Fourth Scenario

TCP/IP Protocol Suite

Figure 20.1

First scenario

TCP/IP Protocol Suite

Note: When the sender and the receiver of an email are on the same system, we need only two user agents.

TCP/IP Protocol Suite

Figure 20.2

Second scenario

TCP/IP Protocol Suite

Note: When the sender and the receiver of an email are on different systems, we need two UAs and a pair of MTAs (client and server).

TCP/IP Protocol Suite

Figure 20.3

Third scenario

TCP/IP Protocol Suite

Note: When the sender is connected to the mail server via a LAN or a WAN, we need two UAs and two pairs of MTAs (client and server).

TCP/IP Protocol Suite

Figure 20.4

Fourth scenario

TCP/IP Protocol Suite

10

Note: When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most common situation today.
TCP/IP Protocol Suite

11

Figure 20.5

Push vs. pull

TCP/IP Protocol Suite

12

20.2 USER AGENT


The user agent (UA) provides service to the user to make the process of sending and receiving a message easier.

The topics discussed in this section include: Services Provided by a User Agent User Agent Types Format of Email Email-addresses

TCP/IP Protocol Suite

13

Figure 20.6

User agent Services

TCP/IP Protocol Suite

14

Note: Some examples of command-driven user agents are mail, pine, and elm

TCP/IP Protocol Suite

15

Pine User Agent

TCP/IP Protocol Suite

16

Note: Some examples of GUI-based user agents are Eudora, Outlook, and Netscape.

TCP/IP Protocol Suite

17

Ms Outlook

TCP/IP Protocol Suite

18

Figure 20.7

Format of an email

TCP/IP Protocol Suite

19

Figure 20.8

Email address

TCP/IP Protocol Suite

20

20.3 MESSAGE TRANSFER AGENT: SMTP

The actual mail transfer requires message transfer agents (MTAs). The protocol that defines the MTA client and server in the Internet is called Simple Mail Transfer Protocol (SMTP).

TCP/IP Protocol Suite

21

Figure 20.13

SMTP range

TCP/IP Protocol Suite

22

Figure 20.14

Commands and responses

TCP/IP Protocol Suite

23

Table 20.4 Commands

TCP/IP Protocol Suite

24

Table 20.5 Responses

TCP/IP Protocol Suite

25

Figure 20.17

Message transfer

TCP/IP Protocol Suite

26

Figure 20.18

Connection termination

TCP/IP Protocol Suite

27

Advantages SMTP

Very Popular
Supported on many platforms Low administration and implementation costs

Simple addressing scheme

Limitations in SMTP
Only uses NVT 7 bit ASCII format

How to represent other data types? (Answer :- MIME)

No authentication mechanisms Messages are sent un-encrypted Susceptible to misuse (Spamming, faking sender address)

20.4 MESSAGE ACCESS AGENT: POP AND IMAP


The third stage of mail delivery uses a message access agent; the client must pull messages from the server. Currently two message access protocols are available: Post Office Protocol, version 3 (POP3) and Internet Mail Access Protocol, version 4.
The topics discussed in this section include: POP3 IMAP4

TCP/IP Protocol Suite

30

Figure 20.19

POP3 and IMAP4

TCP/IP Protocol Suite

31

Post Office Protocol v3

Simple Allows the user to obtain a list of their Emails Users can retrieve their emails Users can either delete or keep the email on their system Minimizes server resources

POP illustration
Johns computer
Marys computer Local inbox

SMTP

Internet

POP

SMTP

SMTP Mail spool

Mail server
CSC1720 Introduction to Internet

Mail server
33

All copyrights reserved by C.C. Cheung 2003.

Figure 20.20

POP3

TCP/IP Protocol Suite

34

POP3

Advantages

Dont have to know the name of your machine POP mail server is installed on a computer always ON Use Windows interface to read email
The email at the mail server is popped to your local machine

Disadvantages

CSC1720 Introduction to Internet

35

All copyrights reserved by C.C. Cheung 2003.

Internet Mail Access Protocol v4

Has more features than POP3 User can check the email header before downloading Emails can be accessed from any location Can search the email for a specific string of characters before downloading User can download parts of an email User can create, delete, or rename mailboxes on a server

IMAP illustration
Johns home computer
Johns office computer

IMAP link Incoming/ Outgoing emails John inbox

IMAP link

Mail server (SMTP/IMAP)


CSC1720 Introduction to Internet

37

All copyrights reserved by C.C. Cheung 2003.

IMAP advantages Messages are accessible from any computer and webmail anywhere in the world sent messages and drafts are also stored on the server server-side spam filtering IMAP mail is backed up and can be restored ease of setting up additional computers to check your email, no need to copy anything from one computer to another

TCP/IP Protocol Suite

38

IMAP disadvantages

Messages load slower, in particular the first time theyre read

Sensitive to size and requires periodic archival of email messages


Subject to storage quotas

Very few ISPs and email providers offer IMAP as it is considered a high end option and its complex for them to support
Not all email programs support it properly

TCP/IP Protocol Suite

39

20.5 WEB-BASED MAIL


Some websites such as Hotmail , gmail and Yahoo provide email service to anyone who accesses the site. Mail transfer and retrieval requires the use of HTTP.

TCP/IP Protocol Suite

40

Figure 23.19

Web-based e-mail, case 1

HTTP transactions

TCP/IP Protocol Suite

41

Figure 23.20

Web-based e-mail, case 2

HTTP transactions

HTTP transactions

TCP/IP Protocol Suite

42

TCP/IP Protocol Suite

43