360 likes | 511 Views
The Application Layer Mail. 李嘉銘 分散系統實驗室 成功大學電機系. The Application Layer. The layers below the application layer are there to provide reliable transport , but they do not do real work for users. Electronic Mail. Architecture and Services The User Agent Message Formats Message Transfer
E N D
The Application LayerMail 李嘉銘 分散系統實驗室 成功大學電機系
The Application Layer • The layers below the application layer are there to provide reliable transport, but they do not do real work for users.
Electronic Mail • Architecture and Services • The User Agent • Message Formats • Message Transfer • Final Delivery
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
Smileys/Emoticons • Some smileys. They will not be on the final exam :-).
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.
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.
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
Architecture • How 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
Services • E-mail systems support five basic functions • Composition • Transfer • Reporting • Displaying • Disposition
Envelopes 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.
Envelopes and messages (2) • Paper mail. • Electronic mail.
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).
Reading E-mail • An example display of the contents of a mailbox.
Message Formats – RFC 822 (1) • RFC 822 header fields related to message transport.
Message Formats – RFC 822 (2) • Some fields used in the RFC 822 message header.
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).
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.
A multipart message containing enriched and audio alternatives
Message Transfer • SMTP (Simple Mail Transfer Protocol). • Transferring a message from elinore@abc.com to carolyn@xyz.com.
MX in DNS Server hostC IN MX 50 hostB.ee.ncku.edu.tw hostC IN MX 100 hostD.ee.ncku.edu.tw RelayReceiver is not on this site
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.
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
POP3 protocol states • Authorization. • Transactions. • Update.
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
WebMail • WebMail 就是使用者透過 browser 連到 web server, 而由 web server 上的程式負責作收信/送信的動作. • 使用者直接透過 browser 作讀信/寫信等操作, 信件其實並不存在使用者的電腦上. 因此無論使用者用的是哪一部電腦, 只要可以連上網路, 都可以使用讀到之前與新收到的信件. • 另外一個好處是 WebMail 不容易因為讀取含有病毒的檔案而導致中毒, 更不會發生個人郵件系統中毒後, 寄送大量病毒信件給其他親朋好友的這種慘劇.