Electronic Mail: SMTP, POP, and IMAP Content •Email •Four configurations of email architecture • agent • Format of email •SMTP • POP3 and IMAP4 T/IP Protocol Suite
1
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.
T/IP Protocol Suite
2
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
T/IP Protocol Suite
3
Figure 20.1
T/IP Protocol Suite
First scenario
4
Note: When the sender and the receiver of an email are on the same system, we need only two agents.
T/IP Protocol Suite
5
Figure 20.2
T/IP Protocol Suite
Second scenario
6
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).
T/IP Protocol Suite
7
Figure 20.3
T/IP Protocol Suite
Third scenario
8
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).
T/IP Protocol Suite
9
Figure 20.4
T/IP Protocol Suite
Fourth scenario
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. T/IP Protocol Suite
11
Figure 20.5
T/IP Protocol Suite
Push vs. pull
12
20.2 AGENT The agent (UA) provides service to the to make the process of sending and receiving a message easier.
The topics discussed in this section include: Services Provided by a Agent Agent Types Format of Email Email-addresses
T/IP Protocol Suite
13
Figure 20.6
T/IP Protocol Suite
agent Services
14
Note: Some examples of command-driven agents are mail, pine, and elm
T/IP Protocol Suite
15
Pine Agent
T/IP Protocol Suite
16
Note: Some examples of GUI-based agents are Eudora, Outlook, and Netscape.
T/IP Protocol Suite
17
Ms Outlook
T/IP Protocol Suite
18
Figure 20.7
T/IP Protocol Suite
Format of an email
19
Figure 20.8
T/IP Protocol Suite
Email address
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).
T/IP Protocol Suite
21
Figure 20.13
T/IP Protocol Suite
SMTP range
22
Figure 20.14
T/IP Protocol Suite
Commands and responses
23
Table 20.4 Commands
T/IP Protocol Suite
24
Table 20.5 Responses
T/IP Protocol Suite
25
Figure 20.17
T/IP Protocol Suite
Message transfer
26
Figure 20.18
T/IP Protocol Suite
Connection termination
27
Advantages SMTP •
Very Popular
•
ed on many platforms
•
•
Low istration 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
T/IP Protocol Suite
30
Figure 20.19
T/IP Protocol Suite
POP3 and IMAP4
31
Post Office Protocol v3
Simple Allows the to obtain a list of their Emails s can retrieve their emails s can either delete or keep the email on their system Minimizes server resources
POP illustration Mary’s computer
John’s computer
Local inbox
Internet
SMTP
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
T/IP Protocol Suite
POP3
34
POP3
Advantages
Don’t have to know the name of your machine POP mail server is installed on a computer always ON Use Windows interface to read email
Disadvantages
The email at the mail server is popped to your local machine
CSC1720 – Introduction to Internet
35
All copyrights reserved by C.C. Cheung 2003.
Internet Mail Access Protocol v4
Has more features than POP3 can check the email header before ing Emails can be accessed from any location Can search the email for a specific string of characters before ing can parts of an email can create, delete, or rename mailboxes on a server
IMAP illustration John’s home computer
John’s office computer
IMAP link
IMAP link
Incoming/ Outgoing emails John inbox 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
T/IP Protocol Suite
38
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
•Very few ISPs and email providers offer IMAP as it is considered a high end option and it’s complex for them to •Not all email programs it properly
T/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.
T/IP Protocol Suite
40
Figure 23.19
Web-based e-mail, case 1
1
HTTP transactions
2
T/IP Protocol Suite
3
4
41
Figure 23.20
Web-based e-mail, case 2
HTTP transactions
HTTP transactions
1
T/IP Protocol Suite
2
3
42
T/IP Protocol Suite
43