DOC PREVIEW
UW-Madison CS 640 - CS640 Lecture 4

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CS 640CS 640 Introduction to Computer NetworksLecture 4CS 640Today’s lecture•E-mail– Overview– Message format–SMTP– IMAP/POPCS 640Internet apps: application, transport protocolsApplicatione-mailremote terminal accessWeb file transferstreaming multimediaremote file serverInternet telephonyApplicationlayer protocolsmtp [RFC 821]telnet [RFC 854]http [RFC 2068]ftp [RFC 959]proprietary(e.g. RealNetworks)NFSproprietary(e.g., Vocaltec)Underlyingtransport protocolTCPTCPTCPTCPTCP or UDPTCP or UDPtypically UDP2CS 640Electronic MailThree major components:• user agents • mail servers • simple mail transfer prot.: SMTPUser Agent• a.k.a. “mail reader”• composing, editing, reading mail messages• e.g., Eudora, Outlook, pine, Netscape Messenger• outgoing, incoming messages stored on serveruser mailboxoutgoing message queuemailserveruseragentuseragentuseragentmailserveruseragentuseragentmailserveruseragentSMTPSMTPSMTPCS 640Electronic Mail: mail serversMail Servers• mailbox contains incoming messages (yet to be read) for user• message queue of outgoing (to be sent) mail messages• SMTP protocol between mail servers to send email messages– client: sending mail server– “server”: receiving mail servermailserveruseragentuseragentuseragentmailserveruseragentuseragentmailserveruseragentSMTPSMTPSMTPCS 640Today’s lecture•E-mail– Overview– Message format–SMTP– IMAP/POP3CS 640Mail message formatSMTP: protocol for exchanging email messagesRFC 822: standard for text message format:• header lines, e.g.,–To:–From:–Subject:different from SMTP commands!• body– the “message”, ASCII characters onlyheaderbodyblanklineCS 640Message format: multimedia extensions• MIME: email format extension, RFC 2045, 2056• additional lines in msg header declare MIME content typeFrom: [email protected]: [email protected]: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data multimedia datatype, subtype, parameter declarationmethod usedto encode dataMIME versionencoded dataCS 640MIME typesContent-Type: type/subtype; parametersText• example subtypes: plain, htmlImage• example subtypes: jpeg, gifAudio• exampe subtypes: basic (8-bit mu-law encoded), 32kadpcm (32 kbps coding)Video• example subtypes: mpeg, quicktimeApplication• other data that must be processed by reader before “viewable”• example subtypes: msword, octet-stream4CS 640Multipart TypeFrom: [email protected]: [email protected]: Picture of yummy crepe. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=98766789--98766789Content-Transfer-Encoding: quoted-printableContent-Type: text/plainDear Bob, Please find a picture of a crepe.--98766789Content-Transfer-Encoding: base64Content-Type: image/jpegbase64 encoded data ..... ......................... ......base64 encoded data --98766789--CS 640Today’s lecture•E-mail– Overview– Message format–SMTP– IMAP/POPCS 640Electronic Mail: SMTP [RFC 821]• uses TCP to reliably transfer email messages from client to server, port 25• direct transfer: sending server to receiving server• three phases of transfer– handshaking (greeting)– transfer of messages–closure• command/response interaction– commands: ASCII text– response: status code and phrase• messages must be in 7-bit ASCII5CS 640Sample SMTP interactionS: 220 hamburger.eduC: HELO crepes.frS: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <[email protected]> S: 250 [email protected]... Sender ok C: RCPT TO: <[email protected]> S: 250 [email protected] ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connectionCS 640Try SMTP interaction for yourself:• telnet servername 25• see 220 reply from server• enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commandsabove lets you send email without using email client (reader)CS 640SMTP: final words• SMTP uses persistent connections• SMTP requires message (header & body) to be in 7-bit ASCII• certain character strings not permitted in msg (e.g., CRLF.CRLF). Thus msg has to be encoded (usually into either base-64 or quoted printable)• SMTP server uses CRLF.CRLFto determine end of messageComparison with http:• http: pull• email: push• both have ASCII command/response interaction, status codes• http: each object encapsulated in its own response msg• smtp: multiple objects sent in multipart msg6CS 640Mail access protocols• SMTP: delivery/storage to receiver’s server• Mail access protocol: retrieval from server– POP: Post Office Protocol [RFC 1939]• authorization (agent <-->server) and download – IMAP: Internet Mail Access Protocol [RFC 1730]• more features (more complex)• manipulation of stored msgs on server– HTTP: Hotmail , Yahoo! Mail, etc.useragentsender’s mail serveruseragentSMTP SMTPPOP3 orIMAPreceiver’s mail serverCS 640POP3 protocolauthorization phase• client commands: – user: declare username– pass: password• server responses– +OK– -ERRtransaction phase, client:• list: list message numbers• retr: retrieve message by #• dele: delete• quitC: list S: 1 498 S: 2 912 S: . C: retr 1 S: <message 1 contents>S: . C: dele 1 C: retr 2 S: <message 1 contents>S: . C: dele 2 C: quit S: +OK POP3 server signing offS: +OK POP3 server ready C: user aliceS: +OK C: pass hungry S: +OK user successfully logged onCS 640Spam (a.k.a. unsolicited bulk email)• Spam filters (e.g. spamassassin)– Build statistical model of good & bad messages from user feedback– Filter out the bad ones– Avoid false positives at all costs (whitelists of senders)• Blacklisting mail servers sending spam (spamhaus.org)– Often distributed through DNS– If your server relays any message, the spammers will exploit it• SMTP servers can authenticate senders of messages• Spammers rent networks of zombies from malicious hackers– Prefixes with DSL, dialup, cable generally blacklisted• Spam from hijacked prefixes advertised from hacked


View Full Document

UW-Madison CS 640 - CS640 Lecture 4

Documents in this Course
Security

Security

21 pages

Mobile IP

Mobile IP

16 pages

Lecture 7

Lecture 7

36 pages

Multicast

Multicast

38 pages

Load more
Download CS640 Lecture 4
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS640 Lecture 4 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS640 Lecture 4 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?