1 / 10

Understanding SMTP and MIME in Email Communication

Learn about the Simple Mail Transfer Protocol (SMTP) and Message Transfer Protocol (MIME) in email communication, including message formats, encoding, and server ports.

Download Presentation

Understanding SMTP and MIME in Email Communication

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SMTP Simple Mail Transfer Protocol

  2. E-mail (SMTP, MIME) • Message transfer protocol (SMTP) vs message format protocols (RFC 822, Multipurpose Internet Mail Extensions or MIME) • RFC 822: message consists of header and body • Header fields: <type: value CRLF> (e.g., subject: hi!) • Body: ASCII only • Body separated by header with a blank line • Content-type/length/encoding/description.. • MIME extension (93 and 96): allows many different types of body types (audio, images, Word documents, etc) • MIME also defines multipart type, allowing multiple data types in single message • Base64 encoding of 8-bit binary words in 6-bit printable ASCII characters • Maps every 3-byte group of binary message to 4 6-bit characters • MIME also supports 7-bit ASCII encoding of text-only messages • Default SMTP server listening port : 25

  3. From mike@cc.gatech.edu Fri Oct 25 15:39:08 2002 Received: from sark.cc.gatech.edu (sark.cc.gatech.edu [130.207.7.23]) by tokyo.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd7K29064 for <dovrolis@tokyo.cc.gatech.edu>; Fri, 25 Oct 2002 15:39:07 -0400 (EDT) Received: from boris.cc.gatech.edu (boris.cc.gatech.edu [130.207.6.141]) by sark.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd5a08589 for <dovrolis@cc.gatech.edu>; Fri, 25 Oct 2002 15:39:05 -0400 (EDT) Received: from [130.207.6.84] (mccracken.cc.gatech.edu [130.207.6.84]) by boris.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd5709928 for <dovrolis@cc.gatech.edu>; Fri, 25 Oct 2002 15:39:05 -0400 (EDT) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <v04020a23b9df4dcf85b5@[130.207.6.84]> In-Reply-To: <Pine.GSO.4.44.0210230920560.1561-100000@tokyo.cc.gatech.edu> Date: Fri, 25 Oct 2002 15:40:17 -0400 To: Constantine <dovrolis@cc.gatech.edu> From: Mike McCracken <mike@cc.gatech.edu> Subject: Re: MS thesis/project Content-Length: 1011 Status: RO X-Status: A X-Keywords: X-UID: 6561 (email body omitted..) Mike

  4. SMTP: email message transfer Mail Mail gateway Mail reader reader • Mail readers, daemons, and gateways • Network transfer takes place over TCP • Mail gateways can buffer pending messages for days, are always up, and they can also be used for email preprocessing (e.g., spam detection) • Each SMTP session is a sequence of text-based commands/responses between two sendmail daemons Mail Mail Mail daemon daemon daemon SMTP/TCP SMTP/TCP

  5. As generated by rth's mailer and handed off to mail.bieberdorf.edu: • From: rth@bieberdorf.edu (R.T. Hood)To: tmh@immense-isp.comDate: Tue, Mar 18 1997 14:36:14 PSTX-Mailer: Loris v2.32Subject: Lunch today? • As they are when mail.bieberdorf.edu transmits the message to mailhost.immense-isp.com: • Received: from alpha.bieberdorf.edu (alpha.bieberdorf.edu [124.211.3.11]) by mail.bieberdorf.edu (8.8.5) id 004A21; Tue, Mar 18 1997 14:36:17 -0800 (PST)From: rth@bieberdorf.edu (R.T. Hood)To: tmh@immense-isp.comDate: Tue, Mar 18 1997 14:36:14 PSTMessage-Id: <rth031897143614-00000298@mail.bieberdorf.edu>X-Mailer: Loris v2.32Subject: Lunch today? • As they are when mailhost.immense-isp.com finishes processing the message and stores it for tmh to retrieve: • Received: from mail.bieberdorf.edu (mail.bieberdorf.edu [124.211.3.78]) by mailhost.immense-isp.com (8.8.5/8.7.2) with ESMTP id LAA20869 for <tmh@immense-isp.com>; Tue, 18 Mar 1997 14:39:24 -0800 (PST)Received: from alpha.bieberdorf.edu (alpha.bieberdorf.edu [124.211.3.11]) by mail.bieberdorf.edu (8.8.5) id 004A21; Tue, Mar 18 1997 14:36:17 -0800 (PST)From: rth@bieberdorf.edu (R.T. Hood)To: tmh@immense-isp.comDate: Tue, Mar 18 1997 14:36:14 PSTMessage-Id: <rth031897143614-00000298@mail.bieberdorf.edu>X-Mailer: Loris v2.32Subject: Lunch today?

  6. Command Description • DATA Begins message composition. • EXPN <string> Returns names on the specified mail list. • HELO <domain> Returns identity of mail server. • HELP <command> Returns information on the specified command. • MAIL FROM <host> Initiates a mail session from host. • NOOP Causes no action, except acknowledgement from server. • QUIT Terminates the mail session. • RCPT TO <user> Designates who receives mail. • RSET Resets mail connection. • SAML FROM <host> Sends mail to user terminal and mailbox. • SEND FROM <host> Sends mail to user terminal. • SOML FROM <host> Sends mail to user terminal or mailbox. • TURN Switches role of receiver and sender. • VRFY <user> Verifies the identity of a user.

  7. Response Codes • Server returns response codes to client: • 2xxeverything is fine, go on • 4xxtemporary problem, try again later • 5xxpermanent error, give up

  8. Mail session

More Related