Introduction to Internet Mail Noah Sematimba Based on Materials by Philip Hazel.

Slides:



Advertisements
Similar presentations
SMTP – Simple Mail Transfer Protocol
Advertisements

Application: Electronic Mail Linda Wu (CMPT )
Chapter 29 Structure of Computer Names Domain Names Within an Organization The DNS Client-Server Model The DNS Server Hierarchy Resolving a Name Optimization.
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.
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( )
SMTP Simple Mail Transfer Protocol. Content I.What is SMTP? II.History of SMTP III.General Features IV.SMTP Commands V.SMTP Replies VI.A typical SMTP.
Simple Mail Transfer Protocol
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
Electronic Mail Three major components: SMTP user agents mail servers
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)
1 Introduction AfNOG CHIX 2011 Blantyre, Malawi By Evelyn NAMARA.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
1 Chapter Internet Applications (DNS, )
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.
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.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Network Applications Outline Simple Mail Transfer Protocol
Electronic Mail Originally –Memo sent from one user to another Now –Memo sent to one or more mailboxes Mailbox –Destination point for messages.
IST346 – Servies Agenda  What is ?  Policies  The technical side of  Components  Protocols  architecture  Security.
1 Applications Electronic Mail. 2 Electronic Mail Many user applications use client-server architecture. Electronic mail client accepts mail.
Electronic Mail. Familiar to most of us 4 What are the functions we expect? –Outgoing mail Compose send –compress –encrypt –Incoming Mail read forward.
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.
Traditional Internet Applications Dr. John P. Abraham Professor UTRGV.
Introduction to Internet Mail Abridged & Updated by Hervey Allen Noah Sematimba Based on Materials by Philip Hazel.
Electronic Mail. Client Software and Mail Hosts –Client PC has client software that communicates with user’s mail host –Mail hosts deliver.
SMTP – Simple Mail Transfer Protocol
What is and How Does it Work?  Electronic mail ( ) is the most popular use of the Internet. It is a fast and inexpensive way of sending messages.
File Transfer Protocol (FTP)
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,
Computer Networks Fall, 2007 Prof Peterson. CIS 235: Networks Fall, 2007 Western State College How’s it going??
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
4343 X2 – Outline The Domain Name System The Web.
SMTP - Simple Mail Transfer Protocol RFC 821
CITA 310 Section 6 Providing Services (Textbook Chapter 8)
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.
Linux Operations and Administration Chapter Twelve Configuring a Mail Server.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Electronic Mail.
COMP 431 Internet Services & Protocols
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
Discussion of OCP/SMTP profile and some Use cases Presented by Abbie Barbir
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.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
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.
concepts & protocols
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Social Media And Global Computing Sending
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
Presentation transcript:

Introduction to Internet Mail Noah Sematimba Based on Materials by Philip Hazel.

Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,  Mulberry, Pegasus, Simeon, Netscape, Outlook,... Multiple MUAs on one system - end user choice MTA = Mail Transfer Agent Receives and delivers messages  Sendmail, Smail, PP, MMDF, Charon, Exim, qmail,  Postfix,... One MTA per system - sysadmin choice

Message format (1)  From: Philip Hazel  To: Julius Caesar  Cc: Mark Anthony  Subject: How Internet mail works  Julius,  I'm going to be running a course on... Format was originally defined by RFC 822 in 1982 Now superseded by RFC 2822 Message consists of  Header lines  A blank line  Body lines

Message format (2) An address consists of a local part and a domain  A basic message body is unstructured Other RFCs (MIME, 2045) add additional headers which define structure for the body MIME supports attachments of various kinds and in various encodings Creating/decoding attachments is the MUA's job

Folders log in MTA MUA Spool Mailbo x Folders MTA Spool MTA MUA Spool Mailbo x Folders SMTP POP / IMAP Ser­ ver SMTP

Authenticating senders Embedded MUA uses inter­process call to send to MTA  May use pipe, file, or internal SMTP over a pipe  MTA knows the identity of the sender  Normally inserts Sender: header if differs from From: Freestanding MUA uses SMTP to send mail  MTA cannot easily distinguish local/remote clients  No authentication in basic protocol  AUTH command in extended SMTP  Use of security additions (TLS/SSL)  MUA can point at any MTA whatsoever  Need for relay control  Host and network blocks

A message in transit (1) Headers added by the MUA before sending  From: Philip Hazel  To: Julius Caesar  cc: Mark Anthony  Subject: How Internet mail works  Date: Fri, 10 May :29: (BST)  Message-ID: <Pine.SOL   MIME-Version: 1.0  Content-Type: TEXT/PLAIN; charset=US-ASCII  Julius,  I'm going to be running a course on...

A message in transit (2) Headers added by MTAs  Received: from taurus.cus.cam.ac.uk  ([ ] ident=exim)  by mauve.csi.cam.ac.uk with esmtp  (Exim 4.00) id 101qxX-00011X-00;  Fri, 10 May :50:  Received: from ph10 (helo=localhost)  by taurus.cus.cam.ac.uk with local-smtp  (Exim 4.10) id 101qin-0005PB-00;  Fri, 10 May :50:  From: Philip Hazel  To: Julius Caesar  cc: Mark Anthony ...

A message in transit (3) A message is transmitted with an envelope:  MAIL FROM:  RCPT TO: The envelope is separate from the RFC 2822 message Envelope (RFC 2821) fields need not be the same as the header (RFC 2822) fields MTAs are (mainly) concerned with envelopes  Just like the Post Office... Error (“bounce”) messages have null senders  MAIL FROM:<>

An SMTP session (1)  telnet relay.ancient-rome.net 25  220 relay.ancient-rome.net ESMTP Exim...  EHLO taurus.cus.cam.ac.uk  250-relay.ancient-rome.net...  250-SIZE  250-PIPELINING  250 HELP  MAIL FROM:  250 OK  RCPT TO:  250 Accepted  DATA  354 Enter message, ending with “.”  Received: from...  (continued on next slide)

An SMTP session (2)  From:...  To:...  etc... .  250 OK id=10sPdr-00034H-00  quit  221 relay.ancient-rome.net closing conn... SMTP return codes  2xx OK  3xx send more data  4xx temporary failure  5xx permanent failure

forgery It is trivial to forge unencrypted, unsigned mail This is an inevitable consequence when the sender and recipient hosts are independent It is less trivial to forge really well! Most SPAM usually contains some forged header lines Be alert for forgery when investigating

The Domain Name Service The DNS is a worldwide, distributed database DNS servers are called name servers There are multiple servers for each DNS zone Secondary servers are preferably off­site Records are keyed by type and domain name Root servers are at the base of the hierarchy Caching is used to improve performance Each record has a time­to­live field

Use of the DNS for (1) Two DNS record types are used for routing mail Mail Exchange (MX) records map mail domains to host names, and provide a list of hosts with preferences:  hermes.cam.ac.uk. MX 5 green.csi.cam.ac.uk.  MX 7 ppsw3.csi.cam.ac.uk.  MX 7 ppsw4.csi.cam.ac.uk. Address (A) records map host names to IP addresses:  green.csi.cam.ac.uk. A  ppsw3.csi.cam.ac.uk. A  ppsw4.csi.cam.ac.uk. A

Use of the DNS for (2) MX records were added to the DNS after its initial deployment Backwards compatibility rule:  If no MX records found, look for an A record, and if found, treat as an MX with 0 preference MX records were invented for gateways to other mail systems, but are now heavily used for handling generic mail domains

Other DNS records The PTR record type maps IP addresses to names  in-addr.arpa.  PTR green.csi.cam.ac.uk. PTR and A records do not have to be one­to­one  ppsw4.cam.ac.uk. A  in-addr.arpa.  PTR lilac.csi.cam.ac.uk. CNAME records provide an aliasing facility  pelican.cam.ac.uk.  CNAME redshank.csx.cam.ac.uk.

DNS lookup tools host is easy to use for simple queries  host demon.net  host  host -t mx demon.net nslookup is more widely available, but is more verbose  nslookup bt.net  nslookup  nslookup -querytype=mx bt.net dig is the ultimate nitty­gritty tool  dig bt.net  dig -x  dig bt.net mx

DNS mysteries Sometimes primary and secondary name servers get out of step When mystified, check for server disagreement  host -t ns ioe.ac.uk  ioe.ac.uk NS mentor.ioe.ac.uk  ioe.ac.uk NS ns0.ja.net  host mentor.ioe.ac.uk mentor.ioe.ac.uk  mentor.ioe.ac.uk A  host mentor.ioe.ac.uk ns0.ja.net  mentor.ioe.ac.uk has no A record at  ns0.ja.net (Authoritative answer)

Common DNS errors Final dots missing on RHS host names in MX records MX records point to aliases instead of canonical names  This should work, but is inefficient and deprecated MX records point to non­existent hosts MX records contain an IP address instead of a host name on the right­hand side  Unfortunately some MTAs accept this MX records do not contain a preference value Some broken name servers give a server error when asked for a non­existent MX record

Routing a message Process local addresses  Alias lists  Forwarding files Recognize special remote addresses  e.g. local client hosts Look up MX records for remote addresses If self in list, ignore all MX records with preferences greater than or equal to own preference For each MX record, get IP address(es)

Delivering a message Perform local delivery For each remote delivery  Try to connect to each remote host until one succeeds  If it accepts or permanently reject the message, that's it After temporary failures, try again at a later time Time out after deferring too many times Addresses are often sorted to avoid sending multiple copies

Checking incoming senders A lot of messages are sent with bad envelope senders  Mis­configured mail software  Unregistered domains  Mis­configured name servers  Forgers Forgery seems to be the largest category nowadays Many MTAs check the sender's domain It is harder to check the local part  Uses more resources, and can be quite slow Bounce messages have no envelope sender

Checking incoming recipients Some MTAs check each local recipient during the SMTP transaction  Errors are handled by the sending MTA  The receiving MTA avoids problems with bad senders Other MTAs accept messages without checking, and look at the recipients later  Errors are handled by the receiving MTA  More detailed error messages can be generated The current proliferation of forged senders has made the first approach much more popular

Relay control Incoming: From any host to specified domains  e.g. incoming gateway or backup MTA Outgoing: From specified hosts to anywhere  e.g. outgoing gateway on local network From authenticated hosts to anywhere  e.g. travelling employee or ISP customer connected to remote network Encryption can be used for password protection during authentication Authentication can also be done using certificates

Policy controls on incoming mail Block known miscreant hosts and networks  Realtime Blackhole List (RBL), Dial­up list (DUL), etc.  (now a charged service) and others Block known miscreant senders  Not as effective as it once was for SPAM Refuse malformed messages Recognize junk mail  Discard  Annotate