0% found this document useful (0 votes)
140 views22 pages

Lecture 8 (SMTP) PDF

The document discusses the architecture of email. It presents four scenarios of increasing complexity: 1) When the sender and receiver are on the same mail server, only two user agents are needed. 2) When they are on different servers, two user agents and a client and server MTA pair are required. 3) With the sender or receiver connecting via LAN/WAN, two user agents and two client-server MTA pairs are needed. 4) Most commonly, both connect via LAN/WAN, requiring two user agents, two MTA pairs, and a client-server MAA pair.

Uploaded by

abhishek reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views22 pages

Lecture 8 (SMTP) PDF

The document discusses the architecture of email. It presents four scenarios of increasing complexity: 1) When the sender and receiver are on the same mail server, only two user agents are needed. 2) When they are on different servers, two user agents and a client and server MTA pair are required. 3) With the sender or receiver connecting via LAN/WAN, two user agents and two client-server MTA pairs are needed. 4) Most commonly, both connect via LAN/WAN, requiring two user agents, two MTA pairs, and a client-server MAA pair.

Uploaded by

abhishek reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

CS F303

(Computer Networks)
Vishal Gupta
Department of Computer Science and Information Systems
BITS Pilani Birla Institute of Technology and Science
Pilani|Dubai|Goa|Hyderabad
Pilani Campus, Pilani
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

Agenda: Email
23-1 ARCHITECTURE

To explain the architecture of e-mail, 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 e-mail.

TCP/IP Protocol Suite 3


Topics Discussed in the Section
 First Scenario
 Second Scenario
 Third Scenario
 Fourth Scenario

TCP/IP Protocol Suite 4


First scenario

2
1

Note

When the sender and the receiver of an e-


mail are on the same mail server,
we need only two user agents.
TCP/IP Protocol Suite 5
Second scenario

5
1

2 3 4

Note

When the sender and the receiver of an e-


mail are on different mail servers,
we need two UAs and a pair of MTAs (client
and server).
TCP/IP Protocol Suite 6
Third scenario

3
7

5
4 6

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
TCP/IP Protocol Suite
(client and
7
server).
Fourth scenario

1 9

2
8

5
4 6

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 8
Electronic mail outgoing
message queue
user mailbox
Three major components: user
• user agents agent

• mail servers mail user


• simple mail transfer protocol: server agent
SMTP
SMTP mail user
server agent
User Agent
SMTP
• a.k.a. “mail reader”
• composing, editing, reading SMTP user
mail messages agent
mail
• e.g., Outlook, Thunderbird, server
iPhone mail client user
agent
• outgoing, incoming messages
stored on server user
agent

Application Layer 2-9


Electronic mail: mail servers
mail servers: user
agent
• mailbox contains incoming
messages for user mail user
server agent
• message queue of outgoing
(to be sent) mail messages SMTP mail user
server agent
• SMTP protocol between
mail servers to send email SMTP
messages SMTP user
agent
– client: sending mail mail
server
server user
– “server”: receiving mail agent
server user
agent

Application Layer 2-10


Electronic Mail: SMTP [RFC 2821]
• uses TCP to reliably transfer email message from
client to server, port 25
• direct transfer: sending server to receiving server
• three phases of transfer
– handshaking (greeting)
– transfer of messages
– closure
• command/response interaction (like HTTP, FTP)
– commands: ASCII text
– response: status code and phrase
• messages must be in 7-bit ASCI

Application Layer 2-11


TCP/IP Protocol Suite 12
TCP/IP Protocol Suite 13
Figure 23.10 Connection establishment

220 service ready 1


2 HELO: deanza.edu

250 OK 3

TCP/IP Protocol Suite 14


Figure 23.11 Message transfer

TCP/IP Protocol Suite 15


Figure 23.12 Connection termination

1 QUIT

221 service closed 2

TCP/IP Protocol Suite 16


Sample SMTP interaction
S: 220 hamburger.edu
C: HELO crepes.fr
S: 250 Hello crepes.fr, pleased to meet you
C: MAIL FROM: <[email protected]>
S: 250 [email protected]... Sender ok
C: RCPT TO: <[email protected]>
S: 250 [email protected] ... Recipient ok
C: DATA
S: 354 Enter mail, end with "." on a line by itself
C: Do you like ketchup?
C: How about pickles?
C: .
S: 250 Message accepted for delivery
C: QUIT
S: 221 hamburger.edu closing connection

Application Layer 2-17


BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Mail message format

SMTP: protocol for exchanging


email msgs header
blank
RFC 822: standard for text
line
message format:
• header lines, e.g.,
– To:
body
– From:
– Subject:
different from SMTP MAIL
FROM, RCPT TO:
commands!
• Body: the “message”
– ASCII characters only

Application Layer 2-18


Mail access protocols
user
mail access user
SMTP SMTP protocol
agent agent
(e.g., POP,
IMAP)

sender’s mail receiver’s mail


server server

• SMTP: delivery/storage to receiver’s server


• mail access protocol: retrieval from server
– POP: Post Office Protocol [RFC 1939]: authorization, download
– IMAP: Internet Mail Access Protocol [RFC 1730]: more
features, including manipulation of stored msgs on server
– HTTP: gmail, Hotmail, Yahoo! Mail, etc.

Application Layer 2-19


23-5 MIME
Electronic mail has a simple structure. Its simplicity,
however, comes with a price. It can send messages
only in NVT 7-bit ASCII format. In other words, it has
some limitations. Multipurpose Internet Mail Extensions
(MIME) is a supplementary protocol that allows non-
ASCII data to be sent through e-mail. MIME transforms
non-ASCII data at the sender site to NVT ASCII data
and delivers it to the client MTA to be sent through the
Internet. The message at the receiving site is
transformed back to the original data.

TCP/IP Protocol Suite 20


Web based Email

1 9

2
8

5
4 6

VISHAL GUPTA, PhD 21 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani|Dubai|Goa|Hyderabad

You might also like