Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Computer Networks E-Mail Bob Bradley The University of Tennessee at Martin.

Similar presentations


Presentation on theme: "Intro to Computer Networks E-Mail Bob Bradley The University of Tennessee at Martin."— Presentation transcript:

1 Intro to Computer Networks E-Mail Bob Bradley The University of Tennessee at Martin

2 Intro to Computer Networks E-Mail Info Created by Bob Bradley at The University of Tennessee at Martin If you are viewing this slide from BlackBoard, right click the slide and choose “Full Screen” mode. Then use your left mouse button to advance thru the slide show.

3 Intro to Computer Networks Typical Email Flow Sender’s Computer Sender’s Mail Server Recipient’s Mail Server Recipient’s Computer 1) Sender composes email using a mail client such as Outlook 2) The mail client opens a connection to the user’s mail server sends the message to it using SMTP SMTP 3) The user’s mail server sends the message (over the internet) to the recipient’s mail server using SMTP. SMTP 4) The recipient’s mail client checks for new mail by opening up a POP or IMAP connection to it’s mail server, it finds a new message and downloads it using the POP protocol POP

4 Intro to Computer Networks SMTP (Simple Mail Transfer Protocol) The Simple Mail Transfer Protocol (SMTP) provides a method to exchange electronic mail messages. It is currently the standard by which email is exchanged on the Internet. RFC 821 and updates An SMTP client wishing to exchange mail with an SMTP server contacts the server on the well-known service port (25).

5 Intro to Computer Networks SMTP Commands The protocol is a simple ASCII, line-oriented command/response protocol. Responses consist of a three-digit numeric code followed by a string explaining the response. After contacting the server, the client waits for a simple greeting message and then sends a HELO command identifying itself.

6 Intro to Computer Networks Table of SMTP Commands HELO domainUsed to inform the server of the client’s identity. MAIL FROM: Used to initiate a message transfer and gives the sender email address. RCPT TO: Follows MAIL command and specifies one of the message addresses. Multiple RCPT commands can be given to send to multiple addresses. DATAThe client sends DATA before sending the message line by line. When all the message data has been sent, the client sends a single line consisting of a single period. HELPUsed by humans to get a list of commands. QUITTells the server that the client is ending the session.

7 Intro to Computer Networks SMTP Using the commands A client uses the MAIL, RCPT and DATA commands to send an email message A client can send multiple messages to a server, once it has established a connection. After it has sent the last message, it uses the QUIT command.

8 Intro to Computer Networks SMTP Establishing a connection SMTP Client connects to port 25 of the Server 220 utm.edu ESMTP Sendmail 8.9.3+Sun/8.9.3; Wed, 19 Jun 2002 11:42:59 -0500 (CDT) SMTP Server accepts the connection and sends greeting Client sends HELO Server says it’s OK HELO mail.north.pole 250 utm.edu Hello sun1 [208.47.4.212], pleased to meet you

9 Intro to Computer Networks The client has a message to send from santa@north.pole to bbradley MAIL FROM: 250... Sender ok RCPT TO: 250... Recipient ok DATA 354 Enter mail, end with "." on a line by itself From: Santa Claws To: Mr. Bob Subject: Christmas Hi Bob, Have you been a good boy this year? Santa. 250 LAA05830 Message accepted for delivery QUIT 221 utm.edu closing connection SMTP Sending A Message Message sent by client Client sends this period to tell the server that it is the end of the message Message Header Message Body Client uses the MAIL, RCPT and DATA cmds Server responds to each. If this is the last message to send, the client logs off

10 Intro to Computer Networks POP3 (Post Office Protocol, Version 3) RFC 1725 The Post Office Protocol (POP3) allows a client to retrieve mail from a remote server mailbox. This protocol is commonly used by personal computers to retrieve mail from a permanent SMTP host. POP3 is used for downloading only. The POP3 server listens on well-known TCP port 110

11 Intro to Computer Networks POP3 Commands POP3 commands consist of short keywords, followed by optional parameters sent as a single line of text, followed by. The basic POP3 success and failure codes are “+OK” and “-ERR”. Multi-line POP3 responses consist of a single-line response followed by additional lines, terminated with a line containing a single period.

12 Intro to Computer Networks Table of POP3 Commands USER nameIndicates the mail box name PASS stringIndicates the user password RETR msgRequests the server to send the client the full message msg. QUITQuits the session. Server deletes marked messages. STATRequests the server to return the number of messages in the mail box and the size of the mail box in octets. LIST [msg]Requests the server to return info about the size of a given message or all messages DELE msgRequests the server to delete the message msg. RSETRequest the server to reset all deletion indicators APOP name digOptional secure login command. TOP msg nRequests the server to return the first n lines of message msg.

13 Intro to Computer Networks Pop Login POP Client connects to port 110 of the Server S: +OK QPOP (version 3.0.2) at mars starting. POP Server accepts the connection and sends greeting Client sends username Server says it’s OK Client sends password Server says it’s OK and list number of messages and size of mailbox C: pass ABC123 S:+OK bobb has 24 visible messages (0 hidden) in 551904 octets. C: user bobb S:+OK Password required for bobb.

14 Intro to Computer Networks retr 24 The client asks for message 24 to be returned to it The server responds that the command was received ok, then it sends the text of the message. This period marks the end of the message. This blank line separates the message header from the body. +OK 689 octets Received: from utm.edu (sun1 [208.47.4.212]) by mars.utm.edu (8.9.3+Sun/8.9.3) with ESMTP id NAA21532 for ; Mon, 17 Jun 2002 13:22:57 -0500 (CDT) Received: from localhost (bbradley@localhost) by utm.edu (8.9.3+Sun/8.9.3) with ESMTP id NAA01829 for ; Mon, 17 Jun 2002 13:22:56 -0500 (CDT) Date: Mon, 17 Jun 2002 13:22:56 -0500 (CDT) From: Bob Bradley X-Sender: bbradley@sun1 To: bobb@mars.utm.edu Subject: test message Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: 4Y1"!%_O"!G3\"!A<?!! Hi, This is a test message. Bye. Pop Downloading Header Body

15 Intro to Computer Networks IMAP4 (Internet Message Access Protocol) RFC 1730, RFC 1731 IMAP allows a client to access and manipulate email messages stored on a remote server. Using IMAP, a client can move mail to and from the server, create remote message folders, and move messages between folders. The IMAP4 server listens for connections on well- known TCP port 143.

16 Intro to Computer Networks IMAP4 Continued IMAP includes the basic functionality of POP3, allowing users to retrieve mail, and adds further sophisticated filing, searching, and parsing functionality. The IMAP4 protocol is much more complicated than the simple POP3 protocol.

17 Intro to Computer Networks Summary of Mail Protocols Used to Send Mail Used to Receive Mail Requires Login & Password Simple Protocol Port SMTPYYNY25 POP3NYYY110 IMAP4NYYN143

18 Intro to Computer Networks RFCs for Mail Protocols SMTP (RFC 821) POP (RFC 1725) IMAP (RFC 1730)

19 Intro to Computer Networks Links You can use the links below to connect to and “talk” to a mail server by simply clicking on them. Note that depending on your system, you may not be able to see the commands you type, but you will be able to see the server’s responses. Connect to an SMTP Server telnet://mail.utm.edu:25 telnet://mail.utm.edu:25 Connect to a POP server telnet://mail.utm.edu:110 telnet://mail.utm.edu:110 For better results, log into your mars account and type the following commands: telnet mars.utm.edu 25 telnet mars.utm.edu 110


Download ppt "Intro to Computer Networks E-Mail Bob Bradley The University of Tennessee at Martin."

Similar presentations


Ads by Google