CS43: Computer Networks Email. Kevin Webb Swarthmore College September 24, 2015



Similar documents
Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

CSCI-1680 SMTP Chen Avin

FTP and . Computer Networks. FTP: the file transfer protocol

FTP: the file transfer protocol

DATA COMMUNICATOIN NETWORKING

Protocolo FTP. FTP: Active Mode. FTP: Active Mode. FTP: Active Mode. FTP: the file transfer protocol. Separate control, data connections

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

CPSC Network Programming. , FTP, and NAT.

Internet Technology 2/13/2013

Networking Applications

Electronic Mail

FTP: the file transfer protocol

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

internet technologies and standards

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

. MIME is the protocol that was devised to allow non-ascii encoded content in an and attached files to an .

Management CSCU9B2 CSCU9B2 1

The Application Layer. CS158a Chris Pollett May 9, 2007.

1 Introduction: Network Applications

, SNMP, Securing the Web: SSL

. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Remote login (Telnet):

The Application Layer: DNS

Network Services. SMTP, Internet Message Format. Johann Oberleitner SS 2006

Introduction to Computer Networks

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

Configuring Outlook to send mail via your Exchange mailbox using an alternative address

Application Example: WWW. Communication in the WWW. WWW, HTML, URL and HTTP. Loading of Web Pages. The Client/Server model is used in the WWW

Simple Mail Transfer Protocol

Telematics. 13th Tutorial - Application Layer Protocols

Chapter 26 Remote Logging, Electronic Mail, 26.1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Introduction to LAN/WAN. Application Layer (Part II)

FTP Protocol Secure Shell (SSH) and Secure FTP (SFTP) Components of an System Simple Mail Transfer Protocol Mail Access Protocols

The basic groups of components are described below. Fig X- 1 shows the relationship between components on a network.

Outlook Express POP Instructions - Bloomsburg University Students

CS 164 Winter 2009 Term Project Writing an SMTP server and an SMTP client (Receiver-SMTP and Sender-SMTP) Due & Demo Date (Friday, March 13th)

Before starting to use the new system you will need to know the password to your e-wire account.

Internet Technologies Internet Protocols and Services

Domain Name System (DNS)

Configuring your client to connect to your Exchange mailbox


Configuring Your Client: Outlook Express. Quick Reference

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Using over FleetBroadband

Remote Logging. Tanveer Brohi(14cs28)

Nokia for Business. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation

Getting started with IMAP for Aggi What is IMAP?

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Windows Mail POP Instructions - Bloomsburg University Students

Electronic mail security. MHS (Message Handling System)

Sending an Encrypted/Unencrypted Message. Let's Begin: Log In and Set Up Security Questions. Create Additional ProMailSource Accounts:

Outlook Express IMAP Instructions - Bloomsburg University Students

StarterPlus Mailbox Software Setup Guide

Mail Programs. Manual

Emacs SMTP Library. An Emacs package for sending mail via SMTP. Simon Josefsson, Alex Schroeder

Setting up Outgoing Mail (SMTP) Server of CS LoxInfo

What really is a Service?

Applications and Services. DNS (Domain Name System)

Table of Contents. Electronic mail. History of (2) History of (1) history. Basic concepts. Aka (or according to Knuth)

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Simple Scan to Setup Guide

How to configure your client

How to setup your iphone client

This information is provided for informational purposes only.

Using Avaya Aura Messaging

1. Open Thunderbird. If the Import Wizard window opens, select Don t import anything and click Next and go to step 3.

Configuring Your Client: Outlook Express

SETUP INSTRUCTIONS

Mail system components. Electronic Mail MRA MUA MSA MAA. David Byers

Migration User Guides: The Console Application Setup Guide

SMTP Servers. Determine if an message should be sent to another machine and automatically send it to that machine using SMTP.

Webmail. Setting up your account

WineWeb Account Services

How To Create A Mailbox In Windows Mail On A Pc Or Mac Or Ipad (For A Mac)

Linux Network Administration

FILE TRANSFER PROTOCOL INTRODUCTION TO FTP, THE INTERNET'S STANDARD FILE TRANSFER PROTOCOL

Internet Security [1] VU Engin Kirda

Class Outline. Part 1 - Introduction Explaining Parts of an address Types of services Acquiring an account

Introduction. -- some basic concepts and terminology -- examples for attacks on protocols -- main network security services

Standard Mailbox Software Setup Guide

DNS and electronic mail. DNS purposes

Setup Local Mail Server Using Postfix, Dovecot And Squirrelmail On CentOS 6.5/6.4

Issue 2EN. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation

How To Write An On A Linux Computer (No Mail) (No ) (For Ahem) (Or Ahem, For Ahem). (For An ) Or Ahem.Org) (Ahem) Or An

TELSTRA BUSINESS MAIL QUICK REFERENCE GUIDE

Configuring Your Client: Eudora 5.x. Quick Reference

Departmental (Service) Account Set Up

Transcription:

CS43: Computer Networks Email Kevin Webb Swarthmore College September 24, 2015

Three major components: mail (MUA) mail transfer (MTA) simple mail transfer protocol: SMTP User Agent a.k.a. mail reader composing, editing, reading mail messages e.g., Outlook, Thunderbird, iphone mail client outgoing, incoming messages stored on server Electronic mail mail server SMTP mail server SMTP SMTP outgoing message queue mail server mailbox

MTAs: Mail Servers mail servers: mailbox contains incoming messages for message queue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send email messages (one-way) client: sending mail server server : receiving mail server mail server mail server SMTP SMTP outgoing message queue mail server mailbox

When Alice Sends An Email To Bob A. Her mail client sends a message to his mail server B. Her mail server sends a message to his mail server C. Her mail server sends a message to his mail client D. Her mail client sends a message to his mail client

Scenario: Alice sends message to Bob 1) Alice uses a MUA to compose message to bob@swarthmore.edu 2) Alice s MUA sends message to her mail server; message placed in message queue 3) client side of SMTP opens TCP connection with Bob s mail server 4) SMTP client sends Alice s message over the TCP connection 5) Bob s mail server places the message in Bob s mailbox 6) Bob invokes his MUA to read message 1 mail server 2 3 4 mail server 6 Alice s mail server 5 Bob s mail server

Mail Servers: Ever Vigilant Always on, because they always need to be ready to accept mail. Usually owned by ISP You use the email server for either Swarthmore College, or the CS department.

Simple Mail Transfer: SMTP [RFC 2821] Uses TCP to reliably transfer email message 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 (like HTTP, FTP) commands: ASCII text response: status code and phrase Messages must be in 7-bit ASCII

Mail message format SMTP: protocol for exchanging email messages RFC 822: standard for text message format: header lines, e.g., To: From: Subject: different from SMTP MAIL FROM, RCPT TO: commands! Body: the message ASCII characters only Signal EOM with \r\n.\r\n SMTP Protocol header body blank line

Try SMTP interaction for yourself: telnet allspice.cs.swarthmore.edu 25 You should see a 220 reply from the server. enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands (lets you send email without using email client (MUA))

Demo

Sample SMTP interaction $ telnet allspice.cs.swarthmore.edu 25 Trying 130.58.68.9 Connected to allspice.cs.swarthmore.edu 220 allspice.cs.swarthmore.edu ESMTP Postfix HELO cs.swarthmore.edu 250 allspice.cs.swarthmore.edu MAIL FROM:<kwebb@cs.swarthmore.edu> 250 2.1.0 OK RCPT TO:<kwebb@cs.swarthmore.edu> 250 2.1.5 OK DATA 354 End data with <CR><LF>.<CR><LF> To: Kevin Webb <kwebb@cs.swarthmore.edu> From: Kevin Webb <kwebb@cs.swarthmore.edu> Subject: Telnet test message This is a test message, via telnet, to myself..

Sample SMTP interaction $ telnet allspice.cs.swarthmore.edu 25 Trying 130.58.68.9 Connected to allspice.cs.swarthmore.edu 220 allspice.cs.swarthmore.edu ESMTP Postfix HELO cs.swarthmore.edu 250 allspice.cs.swarthmore.edu MAIL FROM:<kwebb@cs.swarthmore.edu> 250 2.1.0 OK RCPT TO:<kwebb@cs.swarthmore.edu> 250 2.1.5 OK DATA 354 End data with <CR><LF>.<CR><LF> To: Kevin Webb <kwebb@cs.swarthmore.edu> From: Kevin Webb <kwebb@cs.swarthmore.edu> Subject: Telnet test message This is a test message, via telnet, to myself.. End of message.

What keeps us from entering a fake information (e.g., FROM address)? A. Nothing. B. The MTA checks that the FROM is valid. C. We enter a name/password logging into the MTA.

Fun Demo

Wait, this seems too horrible to be true. We can prevent header forging by requiring s to log in. (How or why not?) A. True B. False

Message Signing 1. Sender creates cryptographic public/private key pair, publishes public key to the world 2. Sender uses private key to sign messages 3. Receiver can verify*, using published public key, that only the holder of the corresponding private key could have sent the message * With very high probability.

Message Signing: Challenges Disseminating public keys How do you trust that the published public key isn t also a lie? It s more work, can t be bothered Adoption is very low

SMTP versus HTTP HTTP: pull SMTP: push Both have ASCII command/response interaction, status codes HTTP: each object encapsulated in its own response message SMTP: multiple objects sent in multipart message

SMTP: final words SMTP uses persistent connections Can send multiple emails in one session SMTP requires message (header & body) to be in 7- bit ASCII SMTP server uses CRLF.CRLF to determine end of message

If SMTP only allows 7-bit ASCII, how do we send pictures/videos/files via email? A. We encode these objects as 7-bit ASCII B. We use a different protocol instead of SMTP C. We re really sending links to the objects, rather than the objects themselves

Base 64 Designed to be an efficient way to send binary data as a string Uses A-Z, a-z,0-9, + and / as digits A number with digits d n d n-1..d 1 d 0 = 64 n *d n +64 n-1 *d n-1 +... + 64 * d 1 + d 0 Recall from Computer Organization: Other non-base-10 number systems (binary, octal, hex).

Multipurpose Internet Mail Extensions (MIME) Special formatting instructions Indicated in the header portion of message (not SMTP) SMTP does not care, just looks like message data Supports Text in character sets other than ASCII Non-text attachments Message bodies with multiple parts Header information in non-ascii character sets

MIME Adds optional headers Designed to be compatible with non-mime email clients Both clients must understand it to make sense of it Specifies content type, other necessary information Designates a boundary between email text and attachments

Mail access protocols SMTP SMTP mail access protocol (e.g., POP, IMAP) sender s mail server receiver s mail server SMTP: delivery/storage to receiver s server mail access protocol: retrieval from server POP: Post Office Protocol: authorization, download IMAP: Internet Mail Access Protocol: more features, including manipulation of stored messages on server HTTP: gmail, Hotmail, Yahoo! Mail, etc.

authorization phase client commands: : declare name pass: password server responses +OK -ERR transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete quit POP3 protocol S: +OK POP3 server ready C: bob S: +OK C: pass hungry S: +OK successfully logged on C: 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 off

More about POP3 Previous example uses download and delete mode Bob cannot re-read e-mail if he changes client POP3 download-and-keep : copies of messages on different clients POP3 is stateless across sessions Limitations: Can t retrieve just the headers Can t impose structure on messages

IMAP Keeps all messages in one place: at server Allows to organize messages in folders Keeps state across sessions: names of folders and mappings between message IDs and folder name Can request pieces of a message (e.g., text parts without large attachments)

Webmail Uses a web browser Sends emails using HTTP rather than POP3 or IMAP Mail is stored on the 3 rd party webmail company s servers

Reading Next topic: Peer to peer, DHTs Reading: 2.6