1 / 25

E-mail

E-mail Your textbook covers this material in greater generality than we will cover in class. We’ll focus on the most common paradigms. Main Elements of Email system A message that one mail users wants to send to another mail user – somewhere

Jeffrey
Download Presentation

E-mail

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. E-mail Your textbook covers this material in greater generality than we will cover in class. We’ll focus on the most common paradigms. Evans

  2. Main Elements of Email system • A message that one mail users wants to send to another mail user – somewhere • Concept of a mailbox – physical storage location for one identity’s email messages • Concept of an email address; two parts: handle@computername • Email protocol – rules for sending and responding to messages sent to convey email – SMTP (RFC 821, or newer RFC 2821) • Email format – rules for layout of a message conveying email – RFC 822 or newer RFC 2822 • Email Architecture – what software programs are needed and where do they run? Where do you put mailboxes? • Client side and server side Evans

  3. Mailboxes • Given an entity that needs to receive email, that entity needs some place to store the email messages that come to it. • A mailbox is an actual storage location dedicated to holding the received email messages of the given entity – usally a text file • The entity could be a person, a group of persons, a computer program, a company, etc. – anything that wants to receive email specifically to it. • There is one unique mailbox for the entity and it includes storage space for all mail messages sent to the entity • The mailbox for an entity exists only in one place, on one computer. This could be a person’s PC, or a big server machine for a company, or a big server machine for a person, etc. • Each mailbox is given a unique identifier, the mailbox address • When you send email, you actually send it to a mailbox. How can you get the message from your computer to the computer where the mailbox sits? How can the person (who you sent it to) get it from the mailbox to them – so they can read it? Evans

  4. Email Addresses • Two parts • Mailbox name (usually same as user name) • Machine name (computer on which mailbox resides) • evansell@mscd.edu - tells us • there is some mailbox named evansell (dedicated to the user evansell – me!) and that mscd.edu is the gateway to send to in order to get to the mailbox for evansell. Actually when looking up the MX type naming record for mscd.edu, we will find that this is an alias for mail.mscd.edu, which is actually a mail server where my mailbox sits • boulderjug@yahoo.groups - tells us • Somewhere in the yahoo mail server there is a mailbox named boulderjug. This a actually represents a list of people who are members of the Boulder Java Users Group. Sending email to this mailbox will get one copy of the mail in the mailbox but will cause the server (on the machine where the mailbox sits) to send a copy of that email to each person on the list (“exploding the email”) Evans

  5. Email Protocols • A communications protocol is a design that specifies how two computers can talk to each other: what messages can they send? In what order do they send them? Who talks first? How do they initialize the communication? How do they handle errors? Etc. • For email, there are two problems to solve: • how to get email from sender’s computer to the computer where target mailbox resides? • If the email is destined for some person, how do you get the email from the person’s mailbox (wherever that is!) to the computer where the person is? • Simple Mail Transport Protocol (SMTP – RFC 2821) is the protocol that answers the first question – getting to mailbox • Post Office Protocol (POP3 – RFC 1081) is the protocol that answers the second question. Internet Message Access Protocol (IMAP) extends POP. • Both based on TCP and require a TCP connection to be set up before any mail messages can be sent. • Usually your local mail server that server as a POP server requires authentication from receiving user before it will pass along to user messages in his mailbox. Evans

  6. Me – the receiver You – the sender Simplified Email Overview My PC POP Client software Your PC Note: If my mailbox is here – My PC needs to run mail server code – MTA, MDA. SMTP relay host talks directly to My PC. Your email domain SMTP Client software POP (or IMAP) SMTP SMTP Relay Host – (has mail transfer and delivery agent) Server serving the sending needs in your local mail Domain Destination SMTP Server- Machine where my Mailbox resides evansell mailbox My email domain Software: SMTP Server MTA, MDA Software: SMTP Server MTA, MDA Software: POP Server Note: If my mailbox is here – no need to go over internet; MDA puts it in my mailbox locally STMP Protocol • Three mutually separated TCP connections: • From your SMTP client to your local SMTP relay server • From my POP client to my POP server (destination SMTP server) • From local relay server to destination SMTP server • Can exist at different times The Internet Evans

  7. Email Message Format • First note that all messages are transmitted in ASCII (text) – see ASCII table in your book – • SMTP is a text-based protocol • everything has to be sent in ASCII text characters – including the new-line character to separate lines • Message has two parts, separated with single blank line • A set of headers (RFC 822) – some of which are mandatory and some optional - headers are of form keyword:value • A body - which may contain any plain ASCII text. The body part follows the headers, separated from them by a blank line. Note that more recent standards than RFC822 (MIME) extend the range of possible messages which can be sent by email as enclosures or attachments – but these must be converted to text before transmission Evans

  8. Return-Path: <evansell@mscd.edu> Received: from mtiwgwc12.worldnet.att.net ([127.0.0.1]) by mtiwgwc12.worldnet.att.net (InterMail vM.5.01.05.12 201-253-122-126-112-20020820) with ESMTP id <20030423192504.HRKD9698.mtiwgwc12.worldnet.att.net@mtiwgwc12.worldnet.att.net> for <elliottl@worldnet.att.net>; Wed, 23 Apr 2003 19:25:04 +0000 Received: from clem.mscd.edu ([147.153.1.3]) by mtiwgwc12.worldnet.att.net (mtiwgwc12) with ESMTP id <2003042319250201200b6o52e>; Wed, 23 Apr 2003 19:25:03 +0000 Received: from CONVERSION-DAEMON.clem.mscd.edu by clem.mscd.edu (PMDF V6.2 #30655) id <0HDT01M019XREJ@clem.mscd.edu> for elliottl@worldnet.att.net; Wed, 23 Apr 2003 13:25:03 -0600 (MDT) Received: from webmail ([147.153.1.20]) by clem.mscd.edu (PMDF V6.2 #30655) with ESMTP id <0HDT01M1A9XQC0@clem.mscd.edu> for elliottl@worldnet.att.net; Wed, 23 Apr 2003 13:25:03 -0600 (MDT) Date: Wed, 23 Apr 2003 13:20:04 -0600 From: evansell <evansell@mscd.edu> Subject: Test Message Sender: evansell <evansell@mscd.edu> To: elliottl@worldnet.att.net Message-id: <3EA6A1D6@webmail> MIME-version: 1.0 X-Mailer: WebMail (Hydra) SMTP v3.61 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-WebMail-UserID: evansell X-EXP32-SerialNo: 00002971 Elliott: How are you. I'm doin' fine myself. Your pal, Elliott Return-Path: <evansell@mscd.edu> Received: from sltrmail.sltr.com ([127.0.0.1]) by sltrmail.sltr.com (InterMail vM.5.01.05.12 201-253-122-126-112-20020820) with ESMTP id <20030423192504.HRKD9698.sltrmail.sltr.com@sltrmail.sltr.com> for <evans@sltr.com>; Wed, 23 Apr 2003 19:25:04 +0000 Received: from clem.mscd.edu ([147.153.1.3]) by sltrmail.sltr.com (sltrmail) with ESMTP id <2003042319250201200b6o52e>; Wed, 23 Apr 2003 19:25:03 +0000 Received: from CONVERSION-DAEMON.clem.mscd.edu by clem.mscd.edu (PMDF V6.2 #30655) id <0HDT01M019XREJ@clem.mscd.edu> for evans@sltr.com; Wed, 23 Apr 2003 13:25:03 -0600 (MDT) Received: from webmail ([147.153.1.20]) by clem.mscd.edu (PMDF V6.2 #30655) with ESMTP id <0HDT01M1A9XQC0@clem.mscd.edu> for evans@sltr.com; Wed, 23 Apr 2003 13:25:03 -0600 (MDT) Date: Wed, 23 Apr 2003 13:20:04 -0600 From: evansell <evansell@mscd.edu> Subject: Test Message Sender: evansell <evansell@mscd.edu> To: evans@sltr.com Message-id: <3EA6A1D6@webmail> MIME-version: 1.0 X-Mailer: WebMail (Hydra) SMTP v3.61 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-WebMail-UserID: evansell X-EXP32-SerialNo: 00002971 Elliott: How are you. I'm doin' fine myself. Your pal, Elliott Layout of a Simple Email Message All in plain text (7 bit ASCII) Evans

  9. Messages: RFC 822 Evans

  10. RFC 822 Cont. Evans

  11. MIME • IETF Multipurpose Internet Mail Extensions • For non-ASCII email – to send components of mail like pictures, Microsoft word documents, Excel Spreadsheets, etc. • Binary data encoded • Encoding scheme must convert raw binary data into ASCII Text characters – there’s lots of different ways to do this. • Then the converted ASCII characters are sent in an SMTP message • The receiving end needs to decode the received ASCII characters back into the original binary form • MIME doesn’t specify encoding method, only how it was done – so it can be undone • Sender and receiver must agree on encoding scheme Evans

  12. MIME Continued • Messages may have multiple parts • Each encoded differently • Very flexible • Does not specify all methods, only how to specify method • Works over existing e-mail systems Evans

  13. Return-Path: <evansell@mscd.edu> Received: from clem.mscd.edu ([147.153.1.3]) Date: Tue, 04 Mar 2003 18:31:36 -0700 From: evansell <evansell@mscd.edu> Subject: Take home Sender: evansell <evansell@mscd.edu> To: evans@sltr.com Message-id: <3E630847@webmail> MIME-version: 1.0 X-Mailer: WebMail (Hydra) SMTP v3.61 Content-type: multipart/mixed; boundary="Boundary_(ID_Stn9kTQXQXcEbmWzcUPCcA)" X-WebMail-UserID: evansell X-EXP32-SerialNo: 00002971 This is the preamble of a multipart MIME formatted message. If you are reading this text your mail system is most likely not capable of properly decoding MIME messages. To extract the contents of this message, save it to a file and then use an external MIME decoding utility. --Boundary_(ID_Stn9kTQXQXcEbmWzcUPCcA) Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 7bit --Boundary_(ID_Stn9kTQXQXcEbmWzcUPCcA) Content-type: application/octet-stream; name="Extra Point Take Home Exercise.doc" Content-transfer-encoding: BASE64 Content-disposition: attachment; filename="Extra Point Take Home Exercise.doc" 0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAA (ETC - many more lines of gobbledygook - but these characters represent the encoding of the binary file "Extra Point Take Home Exercise.doc" into ASCII text characters) YW5kIEMgPSA4LiAgQXNzdW1lIEkgYW5kIEogYXJlIGludCBhbmQgdGhhdCBJID0g AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAA== --Boundary_(ID_Stn9kTQXQXcEbmWzcUPCcA)-- MIME ExampleWhat’s Actually Sent Evans

  14. MIME Cont. Evans

  15. MIME Types – for Content-Type Header Evans

  16. Architecture • Mail User Agent, used to read mail • Eudora, Outlook, Pine, Elm • Mail Transfer Agent, used to move mail • Sendmail, IIS • Mail Delivery Agent - Relay, used to deliver mail to mailbox • Sendmail, POP, IMAP Evans

  17. Mail Transfer Agent • New messages are placed in a queue • Local delivery easy • Remote delivery requires server to become client of remote Mail Transfer Agent Evans

  18. Remote Delivery Evans

  19. Gateways (or Relays) • Often, a single Mail Transfer/Delivery Agent serves an entire organization • Given a piece of email to send out, a relay will use SMTP to try to send that email to the machine where the target mailbox resides • Might have to go to some host PC, or perhaps some other server • Supports mailing lists – exploder function • keeps a database of lists, their email addresses and all the members of the list • Database can be more general to keep track of diverse types of mail entities and their mailbox addresses • Reformats return addresses • Simplifies them to make easier to remember • Hides internal machine names Evans

  20. Gateways Continued Evans

  21. Programs • E-mail can be directed to software programs instead of mailboxes (for humans) • Useful for accessing local information, for mailing lists, etc. • Mailing lists are automated for rapid service • Usually a program running on some server where the email list is kept. You send mail to the program to get it to add you to the list. Evans

  22. E-mail Access – where’s the mailbox and how do I get to it? • Most people don’t want to run MTA, or have the mailbox, on their own machine • Complex • Run continuously – mailbox may not be available sometimes • Put all the mailboxes for a given domain inside one big mail server. This runs an MTA to get sent SMTP messages and move them into the appropriate mailboxes • To get email from mailbox to real client: Download e-mail from remote machine • Post Office Protocol (POP) (RFC 1081) or IMAP (extends POP – online mode and other states) Evans

  23. POP Picture Evans

  24. Sending E-mail • POP not used • Simple Mail Transmission Protocol (SMTP) used (RFC 821) • Used from client and between organizations Evans

  25. An Example SMTP Session via Telnet $ telnet webmail.mscd.edu 25 Trying 147.153.1.20... Connected to webmail.mscd.edu. Escape character is '^]'. 220 webmail WebMail ESMTP v3.61 Ready HELO webmail.mscd.edu 250 Ok, hello webmail.mscd.edu. MAIL FROM: evansell@mscd.edu 250 evansell@mscd.edu ... Sender Ok RCPT TO: evansell@mscd.edu 250 <evansell@mscd.edu> ... Recipient Ok (will forward) DATA 354 Ok, end with "." on a new line... From: elliott (evansell@mscd.edu) Reply-To: evansell@mscd.edu To: evansell@mscd.edu Subject: Let's See If this works This is a test mail from a Telnet SMTP connection to webmail.mscd.edu. Please reply. Elliott . 250 Message delivered to 1 recipients quit 221 webmail WebMail ESMTP v3.61 closing connection. Connection closed by foreign host. $ Actual RFC822 message layout that will be sent Evans

More Related