Beruflich Dokumente
Kultur Dokumente
Session Content
||| Introduction to Electronic-mail system
||| Simple Mail Transport Protocol (SMTP)
- overview
- message formats and representation
||| Mail Access protocols
- overview of POP3 and IMAP
||| Domain Name server
Lesson objectives
At the completion of this lesson you should be able to
- understand the Internet-mail system
- understand what DNS is
- describe different method of finding
addresses from the Internet directory server
Email: an introduction
||| Electronic mail (or e-mail) was one of the earliest applications on the
Internet and is still among the most heavily used today
||| From a general perspective, e-mail refers to the concept of creating,
sending, and storing messages or documents electronically.
||| Why is e-mail more popular then your regular snail mail?
Internetmail system
||| Three major components: user
agent, mail servers, and the
SMTP
user
agent
mail
server
Mail Servers
||| mailbox contains incoming
messages (yet to be read) for user
SMTP
SMTP
user
agent
SMTP
mail
server
mail
server
user
agent
user
agent
user
agent
user
agent
user agents
mail servers
simple mail transfer protocol:
SMTP
user
agent
user mailbox
mail
server
user
agent
SMTP
outgoing
message queue
SMTP
SMTP
mail
server
mail
server
user
agent
user
agent
user
agent
user
agent
8
Mail Servers
user
agent
mail
server
user
agent
SMTP
SMTP
SMTP
mail
server
mail
server
user
agent
user
agent
user
agent
user
agent
9
|||
|||
25
Direct transfer: sending server to receiving server
(i.e. does not normally use intermediate mail servers)
Three phases of transfer
SMTP
- handshaking (greeting)
- transfer of messages
Closure
mail
mail
server
server
Internet
Command/response interaction
- commands: ASCII text
- response: status code (HTTP response)
and phrase (a three-digit number)
Messages must be in TEXT, TEXT DOS or 7-bit ASCII
(American Standard Code for Information Interchange) - meaning it uses
patterns of seven binary digits (a range of 0 to 127 decimal) to represent
each character - 1 extra bit for parity digit or check bit
10
Internet
Barts mail
server
server
Alice
invokes her user agent for e-mail, provides e-mail address (e.g. bart@
mdx.ac.uk) compose and then sends the message via user agent
Alices
user agent sends message to her email server - placed in a message queue
After
some initial SMTP handshaking, the SMTP client sends Alices message into
the TCP connection
At
Barts mail server host, the server side of SMTP receives the message - places
the message in Barts mailbox
Bart invokes his user agent to read the message at his convenience
11
12
SMTP: Recap
header
blank
line
body
14
MIME version
method used
to encode data
multimedia data
type, subtype,
parameter declaration
encoded data
From: alice@clubs.ly
To: bob@mdx.ac.uk
Subject: Picture of yummy crepe.
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Type: image/jpeg
base64 encoded data .....
.........................
......base64 encoded data
15
||| Image
- image data
||| Audio
- audio data
||| Video
- video data
||| Multipart
- an encoding that allows
multiple items, potentially of
different types, to be
concatenated together (this is
how mail messages with
attachments are sent)
||| Message
- an e-mail message, mostly
used with the RFC822 subtype
16
||| Text
- example subtypes: plain,
html
||| Image
- example subtypes: jpeg,
gif
||| Audio
- requires an audio output
device to render the contents
- example subtypes: basic (8bit mu-law encoded), 32kadpcm
(32 kbps coding)
||| Video
- example subtypes: mpeg,
quicktime
||| Application
- other data that must be
processed by reader before
viewable
- example subtypes:
msword. mspowerpoint, etc
17
Multipart Type
||| Just as a web page, an e-mail message can contain many objects too
||| Internet e-mail, places all the objects (or parts) in the same message
||| When multimedia message contains more than one object (e.g.
images, ASCII text and some images), the message typically has
Content-type: multipart/mixed
||| This content type header line indicates to the receiving agent that the
message contains multiple objects
||| Receiving agent needs a means to determine
- where each object begins
- how each non ASCII was transfer-encoded
- the content type of each message
||| This is done by placing boundary characters between each object and
preceding each object in the message with Content-type and ContentTransfer-Encoding: header lines
18
19
SMTP
user
agent
senders mail
server
access
protocol
user
agent
receivers mail
server
20
POP3 protocol
authorisation phase
client commands:
user: declare
username
pass: password
server responses
+OK
-ERR
transaction phase, client:
S:
C:
S:
C:
S:
C:
S:
S:
S:
C:
S:
S:
C:
C:
S:
S:
C:
C:
S:
on
IMAP
Keep all messages in one
place: the server
Allows user to organise
messages in folders
IMAP keeps user state
across sessions:
names of folders and
mappings between
message IDs and folder
name
22
Secure e-mail
Alice wants to send secret e-mail message, m, to Bob.
KS
m
KS( )
+
KS
+( )
KB
K+B
KS(m )
KS(m )
+(K )
KB
S
Internet
KB+(KS )
KS( )
KS
K- ( )
B
K-B
integrity.
+
KA
H(.)
KA( )
KA(H(m))
KA(H(m))
KA
Internet
KA( )
compare
H(m )
H( )
H(m )
message integrity.
-
KA
H( )
KA( )
KA(H(m))
KS
KS( )
m
KS
K B( )
Internet
KB(KS )
KB
Note: Alice uses both her private key, Bobs public key.
25
distributed database
implemented in hierarchy of
many name servers
application-layer protocol
host, routers, name servers
to communicate to resolve
names (address/name
translation)
note: core Internet
function, implemented
as application-layer
protocol
complexity at networks
edge
26
DNS
DNS services
Hostname to IP address
translation
Host aliasing
Canonical and alias
names
Mail server aliasing
Load distribution
Replicated Web
servers: set of IP
addresses for one
canonical name
doesnt scale!
27
e NASA Mt View, CA
f Internet Software C. Palo Alto,
CA (and 17 other locations)
13 root name
servers worldwide
b USC-ISI Marina del Rey, CA
l ICANN Los Angeles, CA
29
31
Types of queries
recursive query:
iterative query:
3
7
6
TLD DNS server
8
authoritative DNS server
dns.cs.ucl.ac.uk
requesting host
cs.mdx.ac.uk
gaia.cs.umass.edu
32
Example
Host at cs.mdx.ac.uk
wants IP address for
bob.cs.ucl.ac.uk
2
3
requesting host
cs.mdx.ac.uk
bob.cs.ucl.ac.uk
33
http://www.ietf.org/html.charters/dnsind-charter.html
34
DNS records
DNS: distributed db storing Resource Records (RR)
RR format: (name,
Type=A
Type=CNAME
name is hostname
name is alias name for some
cannonical (the real) name
value is IP address
Type=NS
www.ibm.com is really
servereast.backup2.ibm.com
name is domain (e.g.
foo.com)
value is cannonical name
Type=MX
value is IP address of
authoritative name server
value is name of
for this domain
mailserver associated
with name
35
query or reply
recursion desired
recursion available
reply is authoritative
36
37
(networconsultancyfirm.co.uk,
dns1.networconsultancyfirm.co.uk, NS)
(dns1. networconsultancyfirm.co.uk, 212.212.212.1, A)
Put in authoritative server Type A record for www.
networkconsultancyfirm.co.uk.com and Type MX record for
networkconsultancyfirm.co.uk
How do people get the IP address of your Web site?
38
Summary
||| Introduction to Electronic-mail system
||| Simple Mail Transport Protocol (SMTP)
- overview
- message formats and representation
||| Mail Access protocols
- overview of POP3 and IMAP
||| Domain Name server
41