Upload
myrajendra
View
803
Download
11
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
11
Sub Topic : E-Mail Transfer (part 2).
22
Recap
In the previous class, you have learnt about
• E-mail transfer mechanism
33
Objectives
On the completion of this topic, you would be able to understand
• E-mail Protocols• SMTP• POP
44
Electronic mail
Protocols• Simple Mail Transfer Protocol (SMTP) delivers mail to
servers• From clients to local mail server• Inter-mail server delivery
• Post Office Protocol (POP) for user access to delivered email
55
Understanding SMTP
• Simple Mail Transfer Protocol (SMTP) is the most widely used protocol for sending electronic mail (e-mail) on the Internet
1
66
Basic Email Architecture
Sender client
Recipientclient
Mail Server
Mail Server (relay)
Mail server
SMTP
SMTP SMTP
POP3 or IMAP
SMTP messages are delivered by TCP/IP.
The underlying IP routing generally takes
multiple hops
Mail Server
Mail Server
Fig .2
77
Sending Mail with Simple Mail Transport Protocol
• Message gets an SMTP header– Includes host name and timestamp
• TCP Connection on Port 25– Mail client transmits message to its default SMTP
server– Header updated by each mail server handling it– Sender-SMTP server transmits to recipient-SMTP
server– Recipient-SMTP server can forward message to
another mail server
88
Electronic Mail: SMTP
• Client’s SMTP mail server establishes a TCP
connection to the recipients SMTP server using
Port 25
• three phases in message transfer
– handshaking (greeting)
– transfer of messages
– closure
99
Internet
User Agent User Agent
TCP ephemeral port
Port25
Mail Transfer AgentClient
Mail Transfer AgentServer
SMTP
Fig .3
1010
Sequence of Events in SMTP
1. TCP connection is established to port 252. The sending machine (client) waits for the receiving
machine (server) to talk first3. The server sends its identity and preparedness to
receive mail4. The client announces whom the e-mail is coming from
and whom it is going to send5. The server gives the client the go-ahead to send the
message6. The client sends the message and the server
acknowledges it7. When all the e-mail has been exchanged in both
directions, the connection is released
1111
1) Alice uses Mail User Agent (MUA) to compose message and “to” [email protected]
2) Alice’s MUA sends message to her mail server; message placed in message queue
3) Client side of SMTP opens TCP connection with Bob’s mail server
4) SMTP client sends Alice’s message over the TCP connection
5) Bob’s mail server places the message in his mailbox
6) Bob invokes his user agent to read message
useragent
mailserver
mailserver user
agent
1
2 3 4 56
Scenario: Vidya sends message to Rajesh
Alice BobFig .5
1212
SMTP Elements
• The Sender-SMTP and Receiver-SMTP processes are client or server applications that support SMTP functionality
• Typically the Sender-SMTP transmits a request to initialize an SMTP connection on the Receiver-SMTP server port 25
Sender-SMTP and Receiver-SMTP
• The Sender-SMTP and Receiver-SMTP are processes that support the SMTP commands listed in RFC 821 (SMTP) and RFC 1869
1313
POP (Post Office Protocol)
• POP stands for Post Office Protocol
• The POP server holds the message until the recipient retrieves it with his/her email software
• POP protocol is used to transfer the mail from POP server to user’s machine
1414
POP illustration
John’s computerMary’s computer
Mail server
Internet
Mail server
Mailspool
Localinbox
SMTP
SMTPSMTP
POP
Fig .2
1515
Sequence of Events in POP
1. Alice creates a message for Bob using some e-mail program (i.e., user agent) and clicks “send”
2. The e-mail program hands over the message to the message transfer agent (SMTP Server) on Alice's host
3. The message transfer agent (SMTP Server) sees that it is directed to [email protected] so it uses DNS to look up the MX record for xyz.com. This query returns the DNS name of xyz.com's mail server
1616
4. The message transfer agent now looks up for the IP address of this machine using DNS again
5. It then establishes a TCP connection to the SMTP server on port 25 of this machine. Using an SMTP command sequence analogous, it transfers the message to Bob mailbox and breaks the TCP connection
Sequence of Events in POP contd…
1717
Sequence of Events – Contd.
6. Bob boots up his PC, connects to his ISP, and starts his e-mail program
7. The e-mail program establishes a TCP connection to the POP3 server at port 110 of the ISP's mail server machine
8. Bob's e-mail program runs the POP3 protocol to fetch the contents of the mailbox to his hard disk
9. Once all the e-mail has been transferred, the TCP connection is released
1818
Quiz
1) E-mails are transferred across the internet using___A) Simple Mail Transfer Protocol
2) Messages in SMTP must be in __textA) ASCII
3) SMTP is a ____ protocolA) Push
4) The exchange of mails using TCP/IP is performed by____A) Message Transfer Agent (MTA)
1919
Quiz
1) The initial stage of POP3 protocol is___
A) Authentication Stage
2) POP uses TCP connector to port ___
A) Number 110
2020
Frequently Asked Questions
1. List the protocols used for e-mail transfer
2. List the sequence of steps to transfer the email from sender’s SMTP server to receiver’s SMTP server
3. Briefly explain POP protocol