Application: Electronic Mail Linda Wu (CMPT 471 2003-3)

Slides:



Advertisements
Similar presentations
Applications:Electronic Mail (SMTP, POP, IMAP, MIME) (Chapter 27) : Presented By : Subhendu Mahanta. Purvi Shah. Jenni Bhatia. Della Nair. Nafiza Islam.
Advertisements

1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 23 Electronic Mail: SMTP,
SMTP – Simple Mail Transfer Protocol
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 23 Electronic Mail: SMTP,
Electronic Mail and SMTP
Chapter 30 Electronic Mail Representation & Transfer
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Applications:Electronic Mail (SMTP,POP,IMAP,MIME) Presented by-Tarun Lall Badrinath Sai Kumar Praveen.
Simple Mail Transfer Protocol
Architecture of SMTP, POP, IMAP, MIME.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
Electronic Mail: SMTP, POP, and IMAP
Simple Mail Transfer Protocol (SMTP) Kanika Thapar CISC 856 TCP/IP and Upper Layer Protocols 11/8/2007 (Some slides provided by Ezra Kissel, some figures.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Electronic Mail (SMTP, POP, IMAP, MIME)
Simple Mail Transfer Protocol
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Mail Services.
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
Chapter 7: Internet-Based Applications Business Data Communications, 6e.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
Application Protocols: ELECTRONIC MAIL (SMTP, POP) CSNB534 Semester 2, 2007/2008 Asma Shakil.
Electronic Mail Originally –Memo sent from one user to another Now –Memo sent to one or more mailboxes Mailbox –Destination point for messages.
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
Computer Networks26-1 Chapter 26. Remote Logging, Electronic Mail and File Transfer.
Sending and Receiving Mails
Simple Mail Transfer Protocol (SMTP)
1 Using Messages sent from machine to machine and stored for later reading. You will use a client to read –Type mail or pine in UNIX to read.
SMTP – Simple Mail Transfer Protocol
SMTP( 简单邮件传输协议 ) SIMPLE MAIL TRANSFER PROTOCOL RFC 2812.
File Transfer Protocol (FTP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 26 (Data Communication and Networking): Remote Logging, Electronic Mail, and.
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
SMTP - Simple Mail Transfer Protocol RFC 821
CITA 310 Section 6 Providing Services (Textbook Chapter 8)
CS440 Computer Networks 1 Neil Tang 12/01/2008.
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Electronic Mail: SMTP, POP IMAP, and MIME.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
1 Architecture 2 User Agent 3 Message Transfer Agent 4 Message Access Agent 5 MIME 6 Web-Based Mail 7 Electronic Mail Security.
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
© MMII JW RyderCS 428 Computer Networks1 Electronic Mail  822, SMTP, MIME, POP  Most widely used application service  Sometimes only way a person ever.
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Remote Logging, Electronic Mail, and File Transfer
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Chapter 2: Application layer
William Stallings Data and Computer Communications
Chapter 2 Application Layer
Presentation transcript:

Application: Electronic Mail Linda Wu (CMPT )

Notes-19 CMPT 471  Content  system model  SMTP protocol  MIME extensions  Mail access protocols Reference: chapter 27

Notes-19 CMPT 471  System Model  Client-server model MTA User A (sender) User B (receiver) MTA ClientServer Relay Internet Alias expander DB MTA DB Spool UA Mailboxes UA interface Alias expander

Notes-19 CMPT 471  System Model (cont.)  UA: user agent A program used by the user to send and receive s, e.g., mutt, elm, pine, Eudora, Outlook Express Sending  The user creates mail through the UA  The mail has an envelop and a message Receiving  UA checks the mailboxes periodically  Displays a message list, in which each line is a summary about a particular message in the mailbox: sender address, subject, the time the mail was sent or received

Notes-19 CMPT 471  System Model (cont.) MAIL FROM: RCPT TO: From: User A To: User B Reply-to: Date: dd/mm/yyyy Subject: …… Dear User B, …….. Yours, User A Body Header Message Envelop

Notes-19 CMPT 471  System Model (cont.)  MTA: mail transfer agent The actual mail transfer is done through MTA Unix MTA: Sendmail, postfix, …… Client MTA is needed to send Server MTA is needed to receive

Notes-19 CMPT 471  System Model (cont.)  Delayed delivery The message does not have to be delivered immediately Sender - side delay: spooling  After UA creates a message, the message is delivered to spool for storage  MTA periodically (10~30 mins) checks the mail in the spool to see if it can be sent  If the message cannot be sent, it remains in the spool to be checked in the next cycle  If a message cannot be delivered in the time-out period (3~5 days), it is returned to the sender

Notes-19 CMPT 471  System Model (cont.) Receiver-side delay  After the message is received by the MTA, it does not have to be read the receiver immediately  The mail can be stored in the mailbox of the receiver Intermediate delay  The intermediate MTAs can receive mails, keep mails in their own mailboxes and spools, and send them when appropriate

Notes-19 CMPT 471  System Model (cont.)  address address must be unique Two parts: local-part & domain-name Address of the mailbox on the destination machine Domain name of a mail destination to which the mail should be delivered

Notes-19 CMPT 471  System Model (cont.)  Mail alias expansion One-to-many alias expansion  User can create an alias that is mapped to a list of recipients (mailing list)  The recipients on a list need not to be local  For an outgoing message Check the recipient’s name against the alias expansion database If there is an expansion, replace the recipient with the mapped version, and pass the message to MTA  Alias is also used to map incoming recipient address

Notes-19 CMPT 471  System Model (cont.) Many-to-one alias expansion  A user can have several addresses, but the user agent only recognizes one mailbox name  When a system receives mail, it checks the many-to-one expansion database  If a mailbox name corresponding to the local part of the received address is found, the mail is sent to that mailbox; otherwise, it is discarded

Notes-19 CMPT 471  System Model (cont.) One-to-many alias expander DB friends (one name) site1.com site2.edu site1.com Many-to-one alias expander DB John (one recipient) site1.com site1.com site1.com (many recipients) (many addresses)

Notes-19 CMPT 471  Simple Mail Transfer Protocol  SMTP Focuses on how the underlying mail delivery system passes mails across an internet Does NOT specify:  How the mail system accepts mail from a user  How the user interface presents the user with incoming mail  How the mail is stored Sends mail in NVT 7 - bit ASCII format Cannot be used for languages not supported by 7 - bit ASCII characters Cannot send binary data

Notes-19 CMPT 471  Simple Mail Transfer Protocol (cont.)  Commands and responses SMTP uses commands and responses to transfer mail between an MTA client and an MTA server Command  Keyword: argument(s) Response  A 3-digit code that may be followed by additional textual information MTA client MTA server Commands Responses

Notes-19 CMPT 471  Simple Mail Transfer Protocol (cont.) Commands keywordArgument(s)Meaning HELOSender’s host name To identify the client itself MAIL FROM Sender of the message To identify the sender of the mail RCPT TOIntended recipient To identify mail recipient DATABody of the mailTo send the actual message QUITTo terminate the message RSETTo abort the current mail transaction VRFYName of recipient to be verified To verify the address of the recipient NOOPTo check the status of the recipient

Notes-19 CMPT 471  Simple Mail Transfer Protocol (cont.) Responses CodeMeaning Positive reply ……… 220Service ready 221Service closing transmission channel 250Requested command completed 251User not local; mail will be forwarded 354Start mail input Negative reply 421Service not available 450Mailbox not available..…… 500Syntax error; unrecognized command..……

Notes-19 CMPT 471  Simple Mail Transfer Protocol (cont.) MAIL FROM: OKRCPT TO: OKDATA354 start mail inputFrom: User ATo: User BDate: dd/mm/yyyySubject: …… (Empty line) Dear user B, … OK MTA client MTA server EnvelopHeader Body

Notes-19 CMPT 471  Simple Mail Transfer Protocol (cont.)  Mail transfer The process of transferring a mail has 3 phases  Connection establishment  Mail transfer  Connection termination

Notes-19 CMPT 471  Simple Mail Transfer Protocol (cont.) transfer connection establishment MTA server 220 service ready TCP 25 MTA client TCP XXXXX 250 OK HELO: site1.com 221 service closed QUIT … mail transfer … transfer connection termination TCP connection ready

Notes-19 CMPT 471  MIME Extensions  Multipurpose Internet Mail Extensions A supplementary protocol that allows non- ASCII data to be sent through SMTP Not a mail protocol; only an extension to SMTP Can be thought of as a set of software functions that transform non-ASCII data to ASCII data and vice versa MIME User A SMTP MIME User B SMTP Non-ASCII 7-bit NVT ASCII Non-ASCII 7-bit NVT ASCII

Notes-19 CMPT 471  MIME Extensions (cont.)  MIME headers MIME defines 5 headers to be added to the original SMTP header section The headers define the transformation parameters  MIME-Version: current version is 1.1  Content-Type: text/plain, image/jpeg, image/gif, multipart/mixed, application/postscript, ……  Content-Transfer-Encoding: 7bit, 8bit, binary, base64, quoted-printable  Content-Id: uniquely identify the message  Content-Description

Notes-19 CMPT 471  MIME Extensions (cont.) header MIME-Version: 1.1 Content-Type: type/subtype Content-Transfer-Encoding: encoding type Content-Id: message id Content-Description: textual explanation of nontextual contents MIME header body

Notes-19 CMPT 471  MIME Extensions (cont.) Base64 encoding  Divide the binary data into 24-bit blocks  Each blocks is then divided into four 6-bit sections  Interpret each 6-bit section as one character according to Base64 encoding table Non-ASCII data (51) (8) (4) (57) ASCII data Z I E 5

Notes-19 CMPT 471  MIME Extensions (cont.) Quoted-printable encoding  If a character is ASCII, it is sent as it is  If a character is not ASCII, it is sent as 3 characters: The first character is “=” The next two are the hexadecimal representation of the byte & L Non-ASCII K & L = D K Mixed ASCII & non-ASCII data ASCII data

Notes-19 CMPT 471  Mail Access Protocols  Mail delivery SMTP client Local SMTP server Remote SMTP server Mail box Mail access server Mail access client Stage 1 (SMTP) Stage 2 (SMTP) Stage 3 (Mail Access Protocol)

Notes-19 CMPT 471  Mail Access Protocols (cont.)  Mail is stored in user’s permanent mailbox for later retrieval  Mail access protocol To retrieve mails from a permanent mailbox to a local computer To manipulate the mailbox content Two popular mail access protocols  Post Office Protocol Version 3 (POP3)  Internet Mail Access Protocol Version 4 (IMAP4)

Notes-19 CMPT 471  Mail Access Protocols (cont.)  POP3 POP3 client creates a TCP connection to the POP3 server on the mailbox computer Server authenticates the session using user-name and password Client sends commands to retrieve a copy of one or more messages Two modes  Delete mode: the mail is deleted from the mailbox after each retrieval  Keep mode: the mail remains in the mailbox after retrieval

Notes-19 CMPT 471  Mail Access Protocols (cont.) POP3 server User-name TCP 110 POP3 client TCP XXXXX Password OK 1 Retrieve 1 User computerMail server OK # and sizes List …… N Retrieve N

Notes-19 CMPT 471  Mail Access Protocols (cont.)  IMAP4 Similar functions as POP3  Mailboxes are located on the same computer as IMAP4 server  User runs IMAP4 client to contact the server and retrieve mails Extended functions  A user can check the header, or, search the contents of the mails for a specific string, before downloading  A user can partially download mail  A user can create, delete, or remove mailboxes on the mail server  A user can create a hierarchy of mailboxes in a folder for storage