NST - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

NST

Description:

The first email system simply consisted of File Transfer Protocols ... Problems include languages with accents, non-Latin alphabet and not containing ... – PowerPoint PPT presentation

Number of Views:570
Avg rating:3.0/5.0
Slides: 45
Provided by: abc91
Category:
Tags: nst | accents

less

Transcript and Presenter's Notes

Title: NST


1
NST
  • Electronic Mail and MIME

2
Email
  • Has been around for over two decades
  • The first email system simply consisted of File
    Transfer Protocols
  • The first line of each message consisted of
    recipient's address

3
limitations of the earlier design
  • Sending a message to a group was inconvenient
  • Messages had no internal structure
  • The sender couldnt tell if the message arrived

4
limitations of the earlier design
  • The message interface was poorly integrated
  • The user had to first edit a file,
  • then leave the editor and invoke the FTP program

5
limitations of the earlier design
  • It was not possible to create and send messages
    containing a mixture of
  • Text
  • Voice
  • Images, etc.

6
ARPANET email Proposal
  • ARPANET published the following email proposals
  • RFC 821 Transmission Protocol
  • RFC 822 Message Format
  • These then became Internet de facto standards.

7
X.400
  • Was also drafted by CCITT aimed to be the the
    flagship application for OSI.
  • This system was so poorly designed and so complex
    to implement.
  • So RFC 821 and RFC 822 are actually the working
    de facto standards

8
Email architecture and services
  • Email systems consist of two subsystems
  • User Agents
  • Message Transfer Agents

9
User Agents
  • Allows people to read and send email
  • Are local programs that provide a command line
    based, menu based or a GUI-based method to
    interact with the email system.

10
Message Transfer Agents
  • Move messages from source to the destination
  • Implemented as system daemons that
  • run in the background and
  • move email through the system.

11
Email Model
12
E-mail transfer
  • Store and forward
  • each MTA stores the message before forward it on
    to its destination
  • when forwarding the message a new TCP connection
    is setup for each MTA to MTA hop
  • E-mail addressing
  • for most users follows the Internet standard e.g.
    myEmail_at_hotmail.com but others exist (e.g. X.400)

13
Email basic functions
  • Composition
  • Creates messages and replies
  • Transfer
  • Moving messages from sender to recipient and
    requires
  • establishing a connection
  • Outputting the message and,
  • Releasing the connection

14
Email basic functions
  • Reporting function
  • tells the originator
  • What happened to the message?
  • Was it delivered?
  • Was it rejected?
  • Was it lost?
  • displays incoming message

15
Email basic functions
  • Disposition function implements
  • What the recipient does with the message
  • Delete before reading the message
  • Delete after reading the message
  • Save the message
  • Retrieve and reread saved messages
  • Forward the message

16
Other features
  • Mail boxes
  • Storing the incoming email
  • Commands to create or destroy mail box, inspect
    its contents
  • Insert/ delete messages from the mail box,.
  • Registered email - acknowledge receipt of email
  • Carbon copies
  • High priority email
  • Secret (encrypted) email
  • ..

17
Modern email
  • The key idea is to distinguish between the
    envelope and its contents
  • Envelop encapsulates the message. It contains the
    information for transporting the message
  • Destination address
  • Priority
  • Security level, etc

18
Modern email
  • The message transport agents use the envelope
    for routing, just as the post office does.
  • The message content inside the envelope has two
    parts
  • The header contains control information for user
    agents
  • The body is entirely used for human recipient

19
Email user agent
  • User agent is a program that accepts a variety of
    commands for composing, receiving , and replying
    to messages as well as manipulating mail boxes.
  • It can use a fancy mouse driven, GUI-menu or
    simply a command-line based menu

20
User Agents- Sending email
  • User provides the message using
  • a text editor(can be built in to the user agent),
  • The destination address in a format that the
    user agent can deal with
  • e.g myMailbox_at_staffs.ac.uk
  • Mailing lists

21
User Agents- Reading email
  • When a user agent is started up it looks at the
    users mail box for incoming mail
  • Then it may announce the number of messages and
  • waits for a command

22
User Agents Message Formats
  • Now we have some idea about the user interface,
    lets consider two message formats
  • The ASCII email using RFC 822,
  • The multimedia extensions to RFC 822

23
RFC 822 Message format
  • A message consists of
  • A primitive envelope
  • A number of header fields
  • A blank line
  • A message body

24
RFC 822 Header Fields
  • Header fields related to message transport
  • Header Meaning
  • To Email address of recipient
  • Cc Email address of secondary recipient
  • Bcc Email address for blind carbon copies
  • From Person who created the message
  • Sender Email address of the actual sender
  • Received Line added by each transfer agent along
    the route
  • Return-Path can be used to identify a path back
    to the sender

25
RFC 822 Message Body
  • Provides users a mechanism to include their
    messages
  • These messages may terminate with signatures,
    disclaimer, etc.

26
MIME Multipurpose Internet Mail Extensions
  • Early implementations of email, using RFC 822
    only specified the headers.
  • The content was left entirely up to the users.
  • This is not an adequate method for the current
    use of the Internet.
  • Problems include languages with accents,
    non-Latin alphabet and not containing text at all
    (audio and video..)

27
Solution MIME (RFC 1341 RFC 1521)
  • MIME continues to use RFC 822 format.
  • But adds structure to the message body and
  • defines encoding rules for non-ASCII messages

28
MIME (new) Message Headers
  • RFC 822 headers added by MIME
  • Header Meaning
  • MIME-Version Identifies the MIME version
  • Content-Description Human-readable string
    telling what is in the message
  • Content-Id Unique identifier
  • Content-Transfer-Encoding How the body is
    wrapped for transmission
  • Content-Type Nature of the message

29
Content-Transfer-Encoding header
  • Uses a number of schemes including
  • ASCII Text using 7-bit or 8-bit encoding but
    lines should not exceed 1000 characters.
  • Arbitrary binary files using all 8 bits and may
    exceed 1000 characters line limit.
  • E.g. executable programs. But there is no
    guarantee for the correct arrival of binary
    messages.

30
Encoding binary messages correctly with base64 -
MIME body
  • Each block of 24 bits (3 bytes) broken up into 4
    6 bit units.
  • A -gt0 B -gt 1 Z -gt 25
  • a -gt 26 b -gt 27 z-gt 51
  • 0 -gt 52 1-gt53 9 -gt 61
  • -gt 62 / -gt 63

31
MIME Example
  • BAMCAQ
  • The files contains the following bytes in hex 04
    03 02 01
  • Code Decimal value Binary value
  • B 1 000001
  • A 0 000000
  • M 12 001100
  • C 2 000010
  • A 0 000000
  • Q 16 010000

32
MIME Example
  • File contents 0000010000000011000000110000000100
    00
  • Split into bytes 00000100 00000011 00000010
    00000001
  • Note You lose the last group of 4 zeroes.

33
Base64 encoding
  • If the last group of bits only contains a byte
    then the message is finished with , if it only
    contains 2 bytes then the message is finished
    with .
  • Carriage return and line feeds are ignored.
  • ..So binary data should be sent encoded in
    base64!

34
Content-Type Header
  • Seven original types are defined in RFC 1521,
    each of which has one or more subtypes
  • E.g. Content-Type video/mpeg

35
RFC 1521 MIME Types
  • Text(Plain/Richtext)
  • Image(Gif/Jpeg)
  • Audio (Basic)
  • Video(Mpeg)
  • Application(Octet-stream/Postscript)
  • Message(RFC822/Partial/External-body)
  • Multipart(Mixed/Alternative/Parallel/Digest)

36
Simple Mail Transfer ProtocolSMTP (port 25)
  • The standard protocol for electronic mail
    transfer over the Internet. SMTP header contains
    forward and reverse paths.
  • To route the packet to the destination the
    forward path is defined (SMTP command TO
    ltforward_pathgt

37
SMTP in practise
  • SMTP commands always initiate sending mail (there
    is not a specific command for receive)
  • SMTP can be UA to MTA or MTA to MTA

38
SMTP by telnet
  • Telnet stmail.staffs.ac.uk 25
  • 220 cr10m.staffs.ac.uk ESMTP Sendmail 8.9.1/8.9.1
  • HELO staffs.ac.uk
  • 250 cr10m.staffs.ac.uk Hello 192.168.9.7,
    pleased to meet you
  • MAIL FROMltastudent_at_stmail.staffs.ac.ukgt
  • 250 ltastudent_at_stmail.staffs.ac.ukgt... Sender ok
  • RCPT TOltPs1_at_staffs.ac.ukgt
  • 250 ltPS1_at_staffs.ac.ukgt... Recipient ok

39
SMTP by telnet
  • DATA
  • 354 Enter mail, end with "." on a line by itself
  • HELLO HOW ARE YOU ?
  • .
  • 250 PAA01415 Message accepted for delivery
  • QUIT
  • 220 cr10m.staffs.ac.uk closing connection

40
SMTP summary
  • Mail sending protocol defined by RFC821
  • Maximum message size 64K
  • ESMTP allows longer messages (10M on student
    server) is defined by RFC 1870
  • A server which supports ESMTP responds to the
    command EHLO

41
Post Office Protocol (POP3)port110
  • SMTP has commands to transmit e-mail but not to
    receive
  • There is an assumption that all machines that are
    due to receive e-mail will be connected to the
    Internet all the time
  • POP allows users to connect to a mail server and
    download messages
  • POP version 3 is the latest version

42
POP3 example via Telnet
  • telnet mail.staffs.ac.uk 110
  • Trying 193.60.4.62...
  • Connected to mail.staffs.ac.uk.
  • Escape character is ''.
  • OK mail.staffs.ac.uk Cyrus POP3 v1.5.14 server
    ready
  • user ps1
  • OK Name is a valid mailbox
  • pass givePassword
  • OK Maildrop locked and ready
  • list
  • OK scan listing follows
  • 1 592
  • .

43
POP3 via telnet
  • RETR 1
  • OK Message follows
  • Return-Path ltps1_at_staffs.ac.ukgt
  • Received from staffs.ac.uk (bspps.soc.staffs.ac.u
    k 193.61.121.226)
  • by mail.staffs.ac.uk (8.9.1/8.9.1) with
    ESMTP id RAA23481
  • for ltp.saeidi_at_staffs.ac.ukgt Thu, 28 Nov
    2002 172704 GMT
  • Message-ID lt3DE651EE.4C9C7E55_at_staffs.ac.ukgt
  • Date Thu, 28 Nov 2002 172710 0000
  • From pirooz saeidi ltps1_at_staffs.ac.ukgt
  • X-Mailer Mozilla 4.73 en (WinNT U)
  • X-Accept-Language en
  • MIME-Version 1.0
  • To p.saeidi_at_staffs.ac.uk
  • Subject Test Pop3
  • Content-Type text/plain charsetus-ascii
  • Content-Transfer-Encoding 7bit
  • Hello
  • Testing Pop3

44
IMAP(Internet Message Access Protocol)
  • Provides the same service as POP3 but with a
    number of important improvements
  • Allows proper secure authentication mechanisms,
    this is very important POP3 is very insecure
  • Allows multiple mailboxes to be managed at the
    same time
  • Allows multiple mail commands to be executed
    concurrently
Write a Comment
User Comments (0)
About PowerShow.com