Published on

a ppt on EMAIL

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. 1
  2. 2. 2 ContentsContents OutlineOutline 1 Intro. & Architecture1 Intro. & Architecture 2 UserAgent2 UserAgent 3 MessageTransferAgent3 MessageTransferAgent 4 MessageAccess Agent4 MessageAccess Agent 5 Messageformat5 Messageformat 6 Web-BasedMail6 Web-BasedMail 7 Electronic MailSecurity7 Electronic MailSecurity
  3. 3. Email i.e. electronic mail , it is a method of exchanging digital messages from an author to 1 or more recipents . modern email operates across the internet or other computer networks. emails appeared before 1990 but flourished among the public at large in the 1990's. 3 What is an E-mail ?
  4. 4. EARLY EMAIL SYSTEMS: # require the author and the recipient both be online at the same time. PRESENT EMAIL SYSTEMS: # based on a store and forward model i.e. neither the users nor their computers are required to be online simultaneously. 4 Earlier & present day Email systems:
  5. 5. Previous Systems:- The first email systems simply consisted of file transfer protocols, with the convection that the first line of each message contained the recipient's address. File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over a TCP- based network, such as the Internet. 5 File Transfer Protocol :-
  6. 6. FTP is built on a client-server architecture. FTP users may authenticate themselves using a clear-text sign-in protocol, normally in the form of a username and password, but can connect anonymously if the server is configured to allow it. 6
  7. 7. Complaints on using FTP systems : 1.Sending a message to a group of people was inconvenient. Managers often need this facility to send memos to all their subordinates. 2.Messages had no internal structure, making computer processing difficult.For example, in a forwarded message extracting the forwarded part from the received message was difficult. 3.The originator (sender) never knew if a message arrived or not. 4.It was not possible to create and send messages containing a mixture of text, drawings , facsimile, and voice. 7
  8. 8. Present Systems :- While electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client mail applications typically only use SMTP for sending messages to a mail server for relaying. For receiving messages, client applications usually use either the Post Office Protocol (POP) or the Internet Message Access Protocol (IMAP) or a proprietary system (such as Microsoft Exchange or Lotus Notes/Domino) to access their mail box accounts on a mail server. As time passed ,more elaborate email systems were proposed.rfc 821 and rfc 822 technology came to use which were based on SIMPLE MAIL TRANSFER PROTOCOL i.e. SMTP.8
  9. 9. Architecture And Services : E-mail systems normally consist of two subsystems: #The user agents, which allow people to read and send e-mail #The message transfer agents, which move the messages from the source to the destination. The user agents are local programs that provide a command based , menu-based, or graphical method for interacting with the e-mail system. The message transfer agents are processes that run in the background. Their job is to move e-mail through the system. 9
  10. 10. Typically, e-mail systems support five basic functions.they are: Composition refers to the process of creating messages and answers. For example, when answering a message, the e-mail system can extract the originator's address from the incoming e-mail and automatically insert it into the proper place in the reply. Transfer refers to moving messages from the originator to the recipient. In large part, this requires establishing a connection to the destination or some intermediate machine, outputting the message, and releasing the connection. The e-mail system should do this automatically, without bothering the user. 10
  11. 11. Reporting has to do with telling the originator what happened to the message. Was it delivered? Was it rejected? Was it lost? Displaying incoming messages is needed so people can read their e-mail. Disposition is the final step and concerns what the recipient does with the message after receiving it. Possibilities include throwing it away before reading, throwing it away after reading, saving it, and so on. It should also be possible to retrieve and reread saved messages, forward them, or process them in other ways. 11
  12. 12. 12 ARCHITECTURE To explain the architecture of e-mail, we give four scenarios. We begin with the simplest situation and add complexity as we proceed. The fourth scenario is the most common in the exchange of e-mail.
  13. 13. 13 Topics Discussed HereTopics Discussed Here  First Scenario  Second Scenario  Third Scenario  Fourth Scenario
  14. 14. 14 Figure 1 First scenario 1 2
  15. 15. 15 When the sender and the receiver of an e-mail are on the same mail server, we need only two user agents. Note
  16. 16. 16 Figure 2 Second scenario 1 2 3 4 5
  17. 17. 17 When the sender and the receiver of an e-mail are on different mail servers, we need two UAs and a pair of MTAs (client and server). Note
  18. 18. 18 Figure 3 Third scenario 1 2 3 4 5 6 7
  19. 19. 19 When the sender is connected to the mail server via a LAN or a WAN, we need two UAs and two pairs of MTAs (client and server). Note
  20. 20. 20 Figure 4 Fourth scenario 1 2 3 4 5 6 8 9
  21. 21. 21 When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most common situation today. Note
  22. 22. 22 Figure 5 Push versus pull
  23. 23. 23 USER AGENT The first component of an electronic mail system is the user agent (UA). It provides service to the user to make the process of sending and receiving a message easier.
  24. 24. 24 E-mail systems have two basic parts, as we have seen: the user agents and the message transfer agents. In this section we will look at the user agents. A user agent is normally a program (sometimes called a mail reader) that accepts a variety of commands for composing, receiving, and replying to messages, as well as for manipulating mailboxes. Some user agents have a fancy menu- or icon-driven interface that requires a mouse, whereas others expect 1- character commands from the keyboard. Functionally, these are the same. Some systems are menu- or icon-driven but also have keyboard shortcuts.
  25. 25. 25 Sending E-mail To send an e-mail message, a user must provide the message, the destination address, and possibly some other parameters. The message can be produced with a free- standing text editor, a word processing program, or possibly with a specialized text editor built into the user agent. The destination address must be in a format that the user agent can deal with. Many user agents expect addresses of the form user@dns-address.
  26. 26. 26 This address specifies a country, state, locality, personal address and a common name . Many other attributes are possible, so you can send e-mail to someone whose exact email address you do not know, provided you know enough other attributes (e.g., company and job title). Although X.400 names are considerably less convenient than DNS names, most email systems have aliases (sometimes called nicknames) that allow users to enter or select a person's name and get the correct e-mail address.
  27. 27. 27 Reading E-mail Typically, when a user agent is started up, it looks at the user's mailbox for incoming e-mail before displaying anything on the screen. Then it may announce the number of messages in the mailbox or display a one-line summary of each one and wait for a command. As an example of how a user agent works, let us take a look at a typical mail scenario. After starting up the user agent, the user asks for a summary of his e-mail.
  28. 28. 28
  29. 29. 29 Different fields tells different things such as how long the message is, and one tells who sent the message. Since this field is simply extracted from the message, this field may contain first names, full names, initials, login names, or whatever else the sender chooses to put there. Subject field gives a brief summary of what the message is about. People who fail to include a Subject field often discover that responses to their e-mail tend not to get the highest priority.
  30. 30. 30 After the headers have been displayed, the user can perform any of several actions, such as displaying a message, deleting a message, and so on. The older systems were text based and typically used one-character commands for performing these tasks, such as T (type message), A (answer message), D (delete message), and F (forward message). An argument specified the message in question. More recent systems use graphical interfaces. Usually, the user selects a message with the mouse and then clicks on an icon to type, answer, delete, or foward it. 455
  31. 31. 31 Each header field (logically) consists of a single line of ASCII text containing the field name, a colon, and, for most fields, a value. RFC 822 was designed decades ago and does not clearly distinguish the envelope fields from the header fields. The principal header fields related to message transportt To: field gives the DNS address of the primary recipient. Having multiple recipients is also allowed. The RFC 822 :
  32. 32. 32 Cc: field gives the addresses of any secondary recipients. In terms of delivery, there is no distinction between the primary and secondary recipients. It is entirely a psychological difference that may be important to the people involved but is not important to the mail system. Bcc: (Blind carbon copy) field is like the Cc: except that this line is deleted from all the copies sent to the primary and secondary recipients. This feature allows people to send copies to third parties without the primary and secondary recipients knowing this.
  33. 33. 33 RFC 822 header fields related to message transport :
  34. 34. 34 From and Sender: tell who wrote and sent the message, respectively. These need not be the same. Sender: field may be omitted if it is the same as the From: field. These fields are needed in case the message is undeliverable and must be returned returned to the sender. Received: is added by each message transfer agent along the way. The line contains the agent's identity, the date and time the message was received, and other information that can be used for finding bugs in the routing system.
  35. 35. 35 MIME Electronic mail has a simple structure. Its simplicity, however, comes with a price. It can send messages only in NVT 7-bit ASCII format. In other words, it has some limitations. Multipurpose Internet Mail Extensions (MIME) is a supplementary protocol that allows non- ASCII data to be sent through e-mail. MIME transforms non-ASCII data at the sender site to NVT ASCII data and delivers it to the client MTA to be sent through the Internet. The message at the receiving site is transformed back to the original data.
  36. 36. 36 Topics Discussed HereTopics Discussed Here  MIME Headers
  37. 37. 37 Figure 15 MIME
  38. 38. 38 Figure 16 MIME header
  39. 39. 39
  40. 40. 40
  41. 41. 41 Figure 17 Base64
  42. 42. 42
  43. 43. 43 Figure 18 Quoted printable
  44. 44. 44 Figure 6 Format of an email
  45. 45. 45 Figure 7 E-mail address
  46. 46. 46 MESSAGE TRANSFER AGENT The actual mail transfer is done through message transfer agents (MTAs). To send mail, a system must have the client MTA, and to receive mail, a system must have a server MTA. The formal protocol that defines the MTA client and server in the Internet is called Simple Mail Transfer Protocol (SMTP). As we said before, two pairs of MTA client-server programs are used in the most common situation (fourth scenario). Figure 8 shows the range of the SMTP protocol in this scenario.
  47. 47. 47 Topics Discussed HereTopics Discussed Here  Commands and Responses  Mail Transfer Phases
  48. 48. 48 Figure 8 SMTP range
  49. 49. 49 Figure 9 Commands and responses
  50. 50. 50
  51. 51. 51
  52. 52. 52 Figure 10 Connection establishment 220 service ready 1 HELO: deanza.edu2 250 OK 3
  53. 53. 53 Figure 11 Message transfer
  54. 54. 54 Figure 12 Connection termination 1 QUIT 2221 service closed
  55. 55. 55 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, is sending an e- mail to himself. The first few lines show TELNET trying to connect to the adelphia mail server. ExampleExample 1 After connection, we can type the SMTP commands and then receive the responses as shown below. We have shown the commands in black and the responses in color. Note that we have added for clarification some comment lines, designated by the “=” sign. These lines are not part of the e-mail procedure.
  56. 56. 56 ExampleExample 1
  57. 57. 57 MESSAGE ACCESS AGENT The first and the second stages of mail delivery use SMTP. However, SMTP is not involved in the third stage because SMTP is a push protocol; it pushes the message from the client to the server. In other words, the direction of the bulk data (messages) is from the client to the server. On the other hand, the third stage needs a pull protocol; the client must pull messages from the server. The direction of the bulk data are from the server to the client. The third stage uses a message access agent.
  58. 58. 58 Topics Discussed HereTopics Discussed Here  POP3  IMAP
  59. 59. 59 Final delivery  Up until now, we have assumed that all users work on machines that are capable of sending and receiving e-mail. As we saw, e-mail is delivered by having the sender establish a TCP connection to the receiver and then ship the e-mail over it.  However, with the advent of people who access the Internet by calling their ISP over a modem, it breaks down. The problem is this: what happens when Elinor wants to send Carolyn e-mail and Carolyn is not currently on-line? FINAL DELIVERY
  60. 60. 60 Elinor cannot establish a TCP connection to Carolyn and thus cannot run the SMTP protocol. One solution is to have a message transfer agent on an ISP machine accept e-mail for its customers and store it in their mailboxes on an ISP machine. Since this agent can be on-line all the time, e-mail can be sent to it 24 hours a day.
  61. 61. 61 POP3  Unfortunately, this solution creates another problem: how does the user get the e-mail from the ISP's message transfer agent? The solution to this problem is to create another 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. One such protocol is POP3 (Post Office Protocol Version 3), which is described in RFC 1939. POP 3
  62. 62. 62 Figure 13. (a) Sending and reading mail when the receiver has a permanent Internet connection and the user agent runs on the same machine as the message transfer agent. (b) Reading e-mail when the receiver has a dial-up connection to an ISP.
  63. 63. 63 POP3 begins when the user starts the mail reader.The mail reader calls up the ISP (unless there is already a connection) and establishes a TCP connection with the message transfer agent at port 110. Once the connection has been established, the POP3 protocol goes through three states in sequence: 1. Authorization. 2. Transactions. 3. Update.
  64. 64. 64 This behavior can be observed by typing something like: telnet 110 where represents the DNS name of your ISP's mail server. Telnet establishes a TCP connection to port 110, on which the POP3 server listens. Upon accepting the TCP connection, the server sends an ASCII message announcing that it is present. Usually, it begins with +OK followed by a comment.
  65. 65. 65 Figure 14. Using POP3 to fetch three messages
  66. 66. 66 Advantages and disadvantages of pop3 Advantages of POP3:-  Email is available when you are offline  Email is not stored on the server, so your disk usage on the server is less  Just about any email client (software) supports POP3
  67. 67. 67 Disadvantages of POP3:-  Can be much slower to check mail  Much harder to do server-side filtering  Mail is inaccessible from other machines
  68. 68. 68 IMAP While POP3 allows to access single e-mail account from work, from their home PC, from their laptop when on business trips, and from cybercafes when on so-called vacation, since it normally downloads all stored messages at each contact, the result is that the user's e-mail quickly gets spread over multiple machines, more or less at random, some of them not even the user's. This disadvantage gave rise to an alternative final delivery protocol, IMAP (Internet Message Access Protocol), which is defined in RFC 2060. IMA P
  69. 69. 69 Figure 13 Pop3 and IMAP
  70. 70. 70 Figure 14 Pop3
  71. 71. 71 Figure 15. A comparison of POP3 and IMAP.
  72. 72. 72 Advantages of IMAP  Email is available from any machine you happen to use  Email is stored on the server, so your email cannot be deleted/destroyed if your computer should happen to crash, be stolen, or destroyed  You can access IMAP mail via the web, without even needing a mail client installed. This means you can check your mail from someone else's machine or even a public terminal and not have to worry about the security of your passwords. Advantages and disadvantages of IMAP
  73. 73. 73  Some IMAP clients can set up rules for "server side" filtering. This means that you could put all the emails from current customers into one mailbox, and filter other mail (potential new customers) to another mailbox. This can be done automatically by the server instead of setting up manual filters in whatever software you happen to have. This also means that in most IMAP clients you can subscribe to only certain mailboxes. For example, at work you could subscribe to only client mail, at home only to personal mail, and on your laptop to all your mail. All with a single account.
  74. 74. 74  If you read a message on one computer, it is read on any other computer you use to access your mail. If you reply to an email on one computer, that reply is available on any computer you use. Disadvantages of IMAP:-  Mail is not usually available if you are offline.
  75. 75. 75 Delivery Features An especially valuable feature for many e-mail users is the ability to set up filters. These are rules that are checked when e-mail comes in or when the user agent is started. Each rule specifies a condition and an action. Some ISPs provide a filter that automatically categorizes incoming e-mail as either important or spam (junk e-mail) and stores each message in the corresponding mailbox. DELIVERY FEATURES
  76. 76. 76 Another delivery feature often provided is the ability to (temporarily) forward incoming e-mail to a different address. This address can even be a computer operated by a commercial paging Service. Still another common feature of final delivery is the ability to install a vacation daemon. This is a program that examines each incoming message and sends the sender an insipid reply such as Hi. I'm on vacation. I'll be back on the 24th of August. Have a nice summer.
  77. 77. 77 WEB-BASED MAIL E-mail is such a common application that some websites today provide this service to anyone who accesses the site. Three common sites are Hotmail, Yahoo, and Google. The idea is very simple. Let us go through two cases:
  78. 78. 78 Topics Discussed HereTopics Discussed Here  Case I  Case II
  79. 79. 79 Figure 19 Web-based e-mail, case 1 1 2 3 4 HTTP transactions
  80. 80. 80 Figure 20 Web-based e-mail, case 2 HTTP transactions HTTP transactions 1 2 3
  81. 81. 81 E-MAIL SECURITY The protocol discussed here does not provide any security provisions per se. However, e-mail exchanges can be secured using two application-layer securities designed in particular for e-mail systems. Two of these protocols are Pretty Good Privacy (PGP) and Secure MIME (SMIME).