1 the application layer mail 李嘉銘 分散系統實驗室 成功大學電機系

36
1 The Application Layer Mail 李李李 李李李李李李李 李李李李李李李

Upload: corey-mcdaniel

Post on 13-Jan-2016

248 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

1

The Application LayerMail

李嘉銘分散系統實驗室成功大學電機系

Page 2: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

2

The Application Layer

The layers below the application layer are there to provide reliable transport, but they do not do real work for users.

Page 3: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

3

Electronic Mail

Architecture and ServicesThe User AgentMessage FormatsMessage TransferFinal Delivery

Page 4: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

4

E-Mail

E-mail, like most other forms of communication, has its own conventions and styles. Jargon

BTW (By The Way), ROTFL (Rolling On The Floor Laughing)…

Smiles

Page 5: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

5

Smileys/Emoticons

Some smileys. They will not be on the final exam :-).

Page 6: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

6

The limitations of sending email using FTP (1)

Sending a message to a group of people was inconvenient.Messages had no internal structure, making computer processing difficult.The originator (sender) never knew if a message arrived or not.

Page 7: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

7

The limitations of sending email using FTP (2)

This was not easy to forwarding all incoming e-mail to be handled by his secretary.The user interface was poorly integrated.It was not possible to create and send messages containing a mixture of text, drawings, facsimile, and voice.

Page 8: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

8

E-mail Standards

In 1982, the ARPANET e-mail proposals were published as RFC 821 (transmission protocol) RFC 822 (message format) Minor revisions, RFC 2821 and RFC

2822

Page 9: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

9

ArchitectureHow e-mail systems are organized the user agents (UA), which allow

people to read and send e-mail the message transfer agents

(TA), which move the messages from the source to the destination

the message deliver agents (DA), which deliver (or forward) the mail to user’s mail box

Page 10: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

10Mail System Architecture (1)

Page 11: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

11Mail System Architecture (2)

Page 12: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

12

Services

E-mail systems support five basic functions Composition Transfer Reporting Displaying Disposition

Page 13: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

13Envelopes and messages (1)

The envelope contains all the information needed for transporting the message.The header contains control information for the user agents.The body is entirely for the human recipient.

Page 14: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

14Envelopes and messages (2)

(a) Paper mail.

(b) Electronic mail.

Page 15: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

15

Sending E-mail

To send an e-mail message, a user must provide the message, the destination address, and possibly some other parameters. user@dns-address

Most e-mail systems support mailing lists (send the same message to a list of people).

Page 16: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

16

Reading E-mail

An example display of the contents of a mailbox.

Page 17: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

17

Message Formats – RFC 822 (1)

RFC 822 header fields related to message transport.

Page 18: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

18

Message Formats – RFC 822 (2)

Some fields used in the RFC 822 message header.

Page 19: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

19

MIME – Multipurpose Internet Mail Extensions

The problems include sending and receiving Message: Languages

with accents (French, German). in non-Latin alphabets (Hebrew, Russian). without alphabets (Chinese, Japanese).

Not containing text at all (audio or images).

Page 20: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

20

RFC 822 headers added by MIME

base64 encoding Groups of 24 bits are broken up into four 6-bit units. The coding is ''A'' for 0, ''B'' for 1, and so on, followed by

the 26 lower-case letters, the ten digits, and finally + and / for 62 and 63, respectively.

Page 21: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

21

The MIME types and subtypes defined in RFC 2045

Page 22: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

22A multipart message containing enriched and audio alternatives

Page 23: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

23

Message Transfer

• SMTP (Simple Mail Transfer Protocol).• Transferring a mes

sage from [email protected] to [email protected].

Page 24: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

24

Mail aliases

Page 25: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

25

Mail forward

Page 26: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

26

MX in DNS ServerhostC IN MX 50 hostB.ee.ncku.edu.tw hostC IN MX 100 hostD.ee.ncku.edu.tw

RelayReceiver is not on this site

Page 27: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

27

Final Delivery (1)

Internet connection is not always on. To have a message transfer agent on

an ISP machine accept e-mail for its customers.

Page 28: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

28

Final Delivery (2)

Page 29: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

29

POP3 (Post Office Protocol Version 3)

How does the user get the e-mail from the ISP's message transfer agent? To create a protocol that allows user

transfer agents (on client PCs) to contact the message transfer agent (on the ISP's machine) and allow e-mail to be copied from the ISP to the user.

RFC 1939

Page 30: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

30

POP3 protocol states

Authorization.Transactions.Update.

Page 31: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

31

IMAP (Internet Message Access Protocol)

A protocol for people to operate their mail box and directory Many people have a single e-mail account

at work or school and want to access it from multiple computer.

IMAP assumes that all the e-mail will remain on the server indefinitely in multiple mailboxes.RFC 2060

Page 32: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

32

A comparison of POP3 and IMAP

Page 33: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

33

WebMailWebMail 就是使用者透過 browser 連到 web server, 而由 web server 上的程式負責作收信 / 送信的動作 .使用者直接透過 browser 作讀信 / 寫信等操作 , 信件其實並不存在使用者的電腦上 . 因此無論使用者用的是哪一部電腦 , 只要可以連上網路 , 都可以使用讀到之前與新收到的信件 .另外一個好處是 WebMail 不容易因為讀取含有病毒的檔案而導致中毒 , 更不會發生個人郵件系統中毒後 , 寄送大量病毒信件給其他親朋好友的這種慘劇 .

Page 34: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

34

WebMail -- Through Imap/POP3

Page 35: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

35

WebMail -- Direct Access

Page 36: 1 The Application Layer Mail 李嘉銘 分散系統實驗室 成功大學電機系

36

OpenWebMail