Lecture 9 electronic_mail_representation_and_transfer
-
Upload
serioussamsoul -
Category
Education
-
view
1.898 -
download
0
description
Transcript of Lecture 9 electronic_mail_representation_and_transfer
![Page 1: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/1.jpg)
Lecture 9: Electronic Mail Representation and Transfer
Electronic Mail Paradigm, SMTP, POP/ IMAP
![Page 2: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/2.jpg)
Outline
Introduction Architecture User Agent Message Transfer Agent: SMTP Message Access Agent: POP and IMAP Web-Based Mail
![Page 3: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/3.jpg)
Electronic Mail
At beginning email were short and text only, today email much more complex.
It allows a message to include text, audio, and video.
It also allows one message to be sent to one or more recipients
![Page 4: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/4.jpg)
Architecture
To explain the architecture of e-mail we will use four scenarios
![Page 5: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/5.jpg)
First scenario in electronic mail
Alice (user) send a message to Bob (another user) using User Agent program in order to prepare the message and store it in Bob’s Mailbox.The message has sender’s and recipient mailbox address (names of files)Bob can retrieve and read the contents on his mailbox at any time using User Agent
![Page 6: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/6.jpg)
First scenario Sender and receiver of email are users on the
same system (mail server). They directly connected to a shared system Administrator created one mailbox for each user
where the received messages are stored A Mailbox is part of local hard drive – a special
file with permission restriction. Only owner of mailbox has access to the mailbox
![Page 7: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/7.jpg)
Second scenario in electronic mail
Alice needs to use UA program to send her message to the system (mail server) at her own site. Mail server at her site uses queue to store messages waiting to be sent.Bob also needs a UA to retrieve messages stored in the mailbox of the mail server at his siteMessage needs to be sent through the internet from Alice’s site to Bob’s site.So two MTAs are needed. MTA Client and MTA server
![Page 8: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/8.jpg)
Second scenario
Sender and receiver of the email are users on two different system
Message needs to be sent over the Internet Here we need to have User Agents (UA)
and Message Transfer Agents (MTA)
![Page 9: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/9.jpg)
Third scenario in electronic mailBob as in 2nd scenario. Alice is separated from her mail server, connected to server through LAN or WANAlice still need to use UA to prepare the message. Then she can send it through LAN/WAN to MTA
![Page 10: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/10.jpg)
Fourth scenario in electronic mailThis is most common scenario.Bob and Alice are connected to Mail server through LAN/WAN.Here we need a set of client/server agent, Message Access Agent (MAA)
![Page 11: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/11.jpg)
User Agent
![Page 12: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/12.jpg)
User Agent Compose Message
To write message in proper format Provide template, built-in editor that can spell checking,
grammar checking etc.
Read Message Read incoming message Each received message contain;
Number field Flag – status of email. E.g. new, read Size of message Sender Optional subject field
![Page 13: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/13.jpg)
User Agent
Reply Message Reply to the sender
Forward Message Send the message to third party
Handle Mailbox UA usually has Inbox and Outbox Inbox – keeps all received emails Outbox – keeps all sent email
![Page 14: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/14.jpg)
User Agent
Command Driven Accepts one character command from keyboard
to perform its task. E.g. r to reply Examples: mail, pine, and elm
GUI- based Microsoft Outlook, Netscape, Eudora,
Thunderbird
![Page 15: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/15.jpg)
User Agent
![Page 16: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/16.jpg)
Sending email
Format of an e-mail
![Page 17: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/17.jpg)
Message
Consist of Header and Body Header Define sender, subject of message and any
other information
Body Contain the actual information to be read by
receiver
![Page 18: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/18.jpg)
Receiving Mail
UA is triggered by user (or timer) If user has mail, UA inform user with notice. If user ready to read the mail a list is
displayed in which each line contain summary of information
User can select any message and displays its contents on the screen.
![Page 19: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/19.jpg)
E-mail address
Local part: define name of special file (user mailbox) where all mail received for user is stored for retrieval by MAADomain name: host to receive and send e-mail. Mail server of exchanger
![Page 20: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/20.jpg)
Mailing List
Allow one name (alias) to represent different e-mail addresses.
Every time message to be sent system checks the recipient name against alias database
![Page 21: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/21.jpg)
MIME – Multipurpose Internet Mail Extensions E-mail can only send message in NVT 7-bit
ASCII. MIME – supplementary protocol to allow
non ASCII data sent through e-mail. Allows transmission of Binary data Multimedia files (video/audio clips) Multiple types in single message Mixed formats
![Page 22: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/22.jpg)
MIME
![Page 23: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/23.jpg)
MIME header
![Page 24: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/24.jpg)
Data types and subtypes in MIME
![Page 25: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/25.jpg)
Message Transfer Agent: SMTP
SMTP – define how commands and responses must be sent back and forth
![Page 26: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/26.jpg)
SMTP - Simple Mail Transfer Protocol
Runs over TCP Used between Mail transfer program on sender’s computer Mail server on recipient’s computer
Specifies how Client interacts with server Recipients specified Message is transferred
![Page 27: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/27.jpg)
SMTP
SMTP is simple ASCII protocol where sender makes TCP connection to port 25 and
waits receiver identifies itself and says if it will receive
e-mail if rejected, sender tries again later
![Page 28: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/28.jpg)
SMTP: Commands and responses
SMTP uses commands and responses to transfer messages between MTA client and MTA server
Command Format
![Page 29: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/29.jpg)
SMTP: Commands
![Page 30: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/30.jpg)
SMTP: Responses
![Page 31: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/31.jpg)
SMTP: Responses (cont.)
![Page 32: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/32.jpg)
SMTP - example Let us see how we can directly use SMTP to send an
e-mail and simulate the commands and responses we described in this section.
We use TELNET to log into port 25 (the well-known port for SMTP). We then use the commands directly to send an e-mail. In this example, [email protected] is sending an e-mail to himself.
The first few lines show TELNET trying to connect to the Adelphia mail server.
After connection, we can type the SMTP commands and then receive the responses, as shown on the next slide.
Note that we have added, for clarification, some comment lines, designated by the “=” signs. These lines are not part of the e-mail procedure.
![Page 33: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/33.jpg)
SMTP session
$ telnet mail.adelphia.net 25Trying 68.168.78.100 . . .Connected to mail.adelphia.net (68.168.78.100).
![Page 34: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/34.jpg)
SMTP session
![Page 35: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/35.jpg)
Message Access Agent: POP3 and IMAP4
![Page 36: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/36.jpg)
POP3 and IMAP4
First and second stages of mail delivery use SMTP. STMP not involve in the third stage because it is a push protocol; client push message to server
The third stage needs a pull protocol; client pull the message from server
POP3 – Post Office Protocol ver. 3 IMAP4 – Internet Mail Access Protocol ver. 4
![Page 37: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/37.jpg)
Push versus pull in electronic email
![Page 38: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/38.jpg)
POP3 POP3 client is installed in recipient computer. POP3 server is installed in mail server Mail access start when a client downloads its e-
mail messages from a server. Two modes
Delete: mail is deleted from mailbox after retrieval Keep: mail remains in mailbox after retrieval
![Page 39: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/39.jpg)
The exchange of commands and responses in POP3
Client opens a connection to server on TCP port 110.Then it send user name and password to access mailbox.After that, user can list and retrieve mail message.
![Page 40: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/40.jpg)
IMAP4
IMAP4 is more sophisticated protocol that offers Check email header prior to downloading Search the content of email for specific string Partially download the email Create, delete or rename mailbox on mail server Create hierarchy of mailboxes in a folder for
email storage
![Page 41: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/41.jpg)
Web-based Mail
Yahoo Mail, Gmail, Hotmail and etc.. Mail transfer from sender’s browser to mail
server through HTTP. Transfer of message from sending mail
server to receiving server still through SMTP Message from receiving server (web server)
to receiver’ browser is done through HTTP Instead of POP3 and IMAP4, HTTP is used
as MAA
![Page 42: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/42.jpg)
Web-based Mail
![Page 43: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/43.jpg)
Summary Several program (protocol) including SMTP, POP3 and IMAP4, are used
in the Internet to provide e-mail service The UA prepares the message, creates the envelope, and puts the
message in the envelope. The email address consists of two parts: a local address (user mailbox)
and a domain name. The form is localname@domainname. The MTA transfers the email across the Internet, LAN or WAN. SMTP uses commands and responses to transfer messages between an
MTA client and an MTA server. The steps in transferring a mail message are connection establishment,
message transfer, and connection termination. POP3 and IMAP4 used for pulling messages from mail server Multipurpose Internet Mail Extension (MIME) is an extension of SMTP
that allows the transfer of multimedia and other non-ASCII messages.
![Page 44: Lecture 9 electronic_mail_representation_and_transfer](https://reader035.fdocuments.net/reader035/viewer/2022081403/555ae459d8b42a4c7d8b46a3/html5/thumbnails/44.jpg)
Review Questions
Describe the addressing system used by SMTP
In e-mail, what are the tasks of User agent? What is MIME? Why do we need POP3 or IMAP4 for e-mail?