Simple Mail Transfer Protocol Ezra Kissel CISC 856 TCP/IP and Upper Layer Protocols 11/1/2005 (some/most slides provided by M. Lacroce and J. Watson)

Slides:



Advertisements
Similar presentations
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,
Advertisements

SMTP – Simple Mail Transfer Protocol
Application: Electronic Mail Linda Wu (CMPT )
(SMTP, MIME) Message transfer protocol (SMTP) vs message format protocols (RFC 822, Multipurpose Internet Mail Extensions or MIME) Message transfer.
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.
Electronic Mail and SMTP
COS 420 DAY 25. Agenda Assignment 5 posted Chap Due May 4 Final exam will be take home and handed out May 4 and Due May 10 Today we will discuss.
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.
Simple Mail Transfer Protocol (SMTP) Team: Zealous Team: Zealous Presented By: Vishal Parikh ( ) Vishal Parikh ( ) Ribhu Pathria( )
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.
Electronic Mail (SMTP, POP, IMAP, MIME)
Electronic Mail Security
10. Electronic Mail.
Simple Mail Transfer Protocol
Introduction to Unix SMTP & Sendmail.
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
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.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Electronic Mail Originally –Memo sent from one user to another Now –Memo sent to one or more mailboxes Mailbox –Destination point for messages.
Telecooperation Technische Universität Darmstadt Copyrighted material; for TUD student use only Internet Standards: Julian Schröder-Bernhardi, Dirk.
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
Prof. John A. Copeland fax Office: Klaus
Simple Mail Transfer Protocol (SMTP)
SMTP – Simple Mail Transfer Protocol
SMTP( 简单邮件传输协议 ) SIMPLE MAIL TRANSFER PROTOCOL RFC 2812.
File Transfer Protocol (FTP)
1 Electronic mail security Ola Flygt Växjö University, Sweden
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.
April 5, 2004 Prof. Paul Lin 1 CPET 355 Data Communications & Networking 7. The Application Layer: Paul I-Hai Lin, Professor Electrical and Computer.
Chapter 16: Distributed Applications Business Data Communications, 4e.
Computer Networks with Internet Technology William Stallings Chapter 03 Traditional Applications.
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.
SMTP - Simple Mail Transfer Protocol RFC 821
Chapter 16: Distributed Applications Business Data Communications, 4e.
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.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Electronic Mail.
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)
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
Simple Mail Transfer Protocol
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Networking CS 3470, Section 1 Sarah Diesburg
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
CSC 102 Lecture 9.
Social Media And Global Computing Sending
Presentation transcript:

Simple Mail Transfer Protocol Ezra Kissel CISC 856 TCP/IP and Upper Layer Protocols 11/1/2005 (some/most slides provided by M. Lacroce and J. Watson)

Overview Introduction Message Breakdown Sending Messages Extensions Retrieving mail (Mailbox Protocols) Examples

Statistics Statistics (2004): 31 billion s sent daily, expected to double by generates about one billion Gigabytes of new “information” per year Spam accounts for about 40% of all traffic

SMTP Protocol originated in 1982 (RFC821, Jon Postel) Standard message format (RFC822,2822, D. Crocker) Goal: To transfer mail reliably and efficiently

SMTP SMTP clients and servers have two main components User Agents – Prepares the message, encloses it in an envelope. (ex. Thunderbird, Eudora) Mail Transfer Agent – Transfers the mail across the internet (ex. Sendmail, Exim) Analogous to the postal system in many ways

SMTP SMTP also allows the use of Relays allowing other MTAs to relay the mail Mail Gateways are used to relay mail prepared by a protocol other than SMTP and convert it to SMTP

Format of an Mail is a text file Envelope – sender address receiver address other information Message – Mail Header – defines the sender, the receiver, the subject of the message, and other information Mail Body – Contains the actual information in the message

From Tue Oct 25 20:27: Return-Path: X-Original-To: Delivered-To: Received: by mail.eecis.udel.edu (Postfix, from userid 62) id 8EC8D18D; Tue, 25 Oct :27: (EDT) Received: from mail.acad.ece.udel.edu (devil-rays.acad.ece.udel.edu [ ]) by mail.eecis.udel.edu (Postfix) with ESMTP id 59888C9 for ; Tue, 25 Oct :27: (EDT) Received: by mail.acad.ece.udel.edu (Postfix, from userid 62) id ; Tue, 25 Oct :27: (EDT) Received: from nimbus.acad.ece.udel.edu (nimbus.acad.ece.udel.edu [ ]) by mail.acad.ece.udel.edu (Postfix) with ESMTP id 3932E1ECA for ; Tue, 25 Oct :27: (EDT) Date: Tue, 25 Oct :27: (EDT) From: Ezra Kissel X-X-Sender: To: Subject: test Message-ID: X-Sanitizer: This message has been sanitized! X-Sanitizer-URL: X-Sanitizer-Rev: UDEL-ECECIS: Sanitizer.pm,v /10/22 MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin ( ) on louie.udel.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.1 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Sanitizer: This message has been sanitized! X-Sanitizer-URL: X-Sanitizer-Rev: UDEL-ECECIS: Sanitizer.pm,v /10/22 MIME-Version: 1.0 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset="US-ASCII"; format=flowed Status: RO X-Status: X-Keywords: X-UID: 50 This is a test message. Post Office Mailbox Post office and mail route Receiver’s Mailbox

How SMTP works ( A-PDU’s ) The Basics KeywordArguments HELOSender’s Host Domain Name MAIL FROM: Address of sender RCPT TO: of Intended recipient DATABody of the message QUIT

How SMTP works (A-PDU’s) The Extras KeywordArguments RSET VRFYName to be verified NOOP TURN EXPNMailing list to expand HELPCommand Name

Status Codes The Server responds with a 3 digit code that may be followed by text info 2## - Success 3## - Command can be accepted with more information 4## - Command was rejected, but error condition is temporary 5## - Command rejected, Bad User!

Connection Establishment TCP Connection Establishment

Message Progress

Connection Termination TCP Connection Termination

Limitations in SMTP Only uses NVT 7 bit ASCII format How to represent other data types? No authentication mechanisms Messages are sent un-encrypted Susceptible to misuse (Spamming, faking sender address)

Solution: SMTP extensions MIME – Multipurpose Internet Mail Extensions Transforms non-ASCII data to NVT (Network Virtual Terminal) ASCII data Text Application Image Audio Video RFC 1425, 1426, 1521

MIME Headers Located between the Header and Body MIME-Version: 1.1 Content-Type: type/subtype Content-Transfer-Encoding: encoding type Content-Id: message id Content-Description: textual explanation of non-textual contents

MIME Headers (cont’d) Content-Type – Type of data used in the Body Text: plain, unformatted text; HTML Multipart: Body contains different data types Message: Body contains a whole, part, or pointer to a message Image: Message contains a static image (JPEG, GIF) Video: Message contains an animated image (MPEG) Audio: Message contains a basic sound sample (8kHz) Application: Message is of data type not previously defined Content-Transfer-Encoding – How to encode the message 7 bit – no encoding needed 8 bit – Non-ASCII, short lines Binary – Non-ASCII, unlimited length lines Base64 – 6 bit blocks encoded into 8-bit ASCII Quoted-printable – send non-ASCII characters as 3 ASCII characters, =##, ## is the hex representation of the byte

Base64 Encoding Divides binary data into 24 bit blocks Each block is then divided into 6 bit chunks Each 6-bit section is interpreted as one character, 25% overhead (51)(8)(4)(57) (z)(I)(E)(5)

Quoted-Printable Encoding Used when the data has a small non-ASCII portion Non-ASCII characters are sent as 3 characters First is ‘=‘, second and third are the hex representation of the byte (=)(9)(D)

From: Ezra Kissel To: Subject: attachment test MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; boundary="MIMEStream=_ _ _ " --MIMEStream=_ _ _ Content-Type: TEXT/PLAIN; charset="US-ASCII"; format=flowed There is an image attached... --MIMEStream=_ _ _ Content-Type: IMAGE/jpeg; name="test.jpg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.jpg" /9j/4AAQSkZJRgABAgEASABIAAD/4QNxRXhpZgAATU0AKgAAAAgABwESAAMA AAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAEx … osv/0I5nPvr7sVdirsVf/9GO5z76+6hxQ1il2Kv/0o5nPvr7eKtYq7FX/9k= --MIMEStream=_ _ _ Multipart, Encoded MIME Message

SMTP AUTH Allows the server to provide features only to known users and limit others. Various authentication methods may be used (PLAIN, LOGIN, CRAM-MD5, etc.) Encryption is highly recommended if not enforced by MTA. Ex. AUTH PLAIN Simple Usage: AUTH PLAIN \0 \0 Authentication string is Base64 encoded RFC 1869, 2554, 2595 MTA Client MTA Server TCP Connection Establishment 220 Service ReadyEHLO stimpy.cis.udel.edu250 Hello stimpy.cis.udel.eduAUTH PLAIN AGV6cmEAYg==235 Authentication SucceededMAIL FROM: OKRCPT TO: OK Negotiate Encryption (STARTTLS)

can be faked… HELO stimpy.eecis.udel.edu MAIL FROM: RCPT TO: DATA From: Department Chair To: Dr. Paul Amer Subject: CISC856 Dr. Amer, By department decree all students in your CISC856 TCP/IP class are hereby to be given automatic A’s. Thank you, Department Chair. QUIT Solutions signatures (PGP) Sender Policy Framework (SPF)

MTAs and Mail Access Protocols The MTA delivers to the user’s mailbox Can be complex with numerous delivery methods, routers, and ACLs Exim, Postfix, Sendmail The Mail Access Protocols are used by the users to retrieve the from the mailbox POP3 IMAP4

All Messages POP3: IMAP: Dr.Amer Friends …. headers Whole message POP vs. IMAP Internet

Post Office Protocol v3 Simple Allows the user to obtain a list of their s Users can retrieve their s Users can either delete or keep the on their system Minimizes server resources

Internet Mail Access Protocol v4 Has more features than POP3 User can check the header before downloading s can be accessed from any location Can search the for a specific string of characters before downloading User can download parts of an User can create, delete, or rename mailboxes on a server