(SMTP, MIME) Message transfer protocol (SMTP) vs message format protocols (RFC 822, Multipurpose Internet Mail Extensions or 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 RFC 822: message consists of header and body Header fields: (e.g., subject: hi!) Header fields: (e.g., subject: hi!) Body: ASCII only Body: ASCII only Body separated by header with a blank line Body separated by header with a blank line Content-type/length/encoding/description.. Content-type/length/encoding/description.. MIME extension (93 and 96): allows many different types of body types (audio, images, Word documents, etc) 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 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 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 Maps every 3-byte group of binary message to 4 6-bit characters MIME also supports 7-bit ASCII encoding of text-only messages MIME also supports 7-bit ASCII encoding of text-only messages Default SMTP server listening port : 25 Default SMTP server listening port : 25
From Fri Oct 25 15:39: Received: from sark.cc.gatech.edu (sark.cc.gatech.edu [ ]) by tokyo.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd7K29064 by tokyo.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd7K29064 for ; Fri, 25 Oct :39: (EDT) for ; Fri, 25 Oct :39: (EDT) Received: from boris.cc.gatech.edu (boris.cc.gatech.edu [ ]) by sark.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd5a08589 by sark.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd5a08589 for ; Fri, 25 Oct :39: (EDT) for ; Fri, 25 Oct :39: (EDT) Received: from [ ] (mccracken.cc.gatech.edu [ ]) by boris.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd by boris.cc.gatech.edu (8.11.6/8.11.6) with ESMTP id g9PJd for ; Fri, 25 Oct :39: (EDT) for ; Fri, 25 Oct :39: (EDT) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: Message-Id: In-Reply-To: In-Reply-To: Date: Fri, 25 Oct :40: To: Constantine To: Constantine From: Mike McCracken From: Mike McCracken Subject: Re: MS thesis/project Content-Length: 1011 Status: RO X-Status: A X-Keywords: X-UID: 6561 ( body omitted..) Mike
SMTP: message transfer Mail readers, daemons, and gateways Mail readers, daemons, and gateways Network transfer takes place over TCP Network transfer takes place over TCP Mail gateways can buffer pending messages for days, are always up, and they can also be used for preprocessing (e.g., spam detection) Mail gateways can buffer pending messages for days, are always up, and they can also be used for preprocessing (e.g., spam detection) Each SMTP session is a sequence of text-based commands/responses between two sendmail daemons Each SMTP session is a sequence of text-based commands/responses between two sendmail daemons Mail reader Mail daemon SMTP/TCP Mail gateway Mail daemon SMTP/TCP Mail reader Mail daemon
As generated by rth's mailer and handed off to mail.bieberdorf.edu: As generated by rth's mailer and handed off to mail.bieberdorf.edu: From: (R.T. Hood) To: Date: Tue, Mar :36:14 PST X-Mailer: Loris v2.32 Subject: Lunch today? From: (R.T. Hood) To: Date: Tue, Mar :36:14 PST X-Mailer: Loris v2.32 Subject: Lunch today? As they are when mail.bieberdorf.edu transmits the message to mailhost.immense-isp.com: As they are when mail.bieberdorf.edu transmits the message to mailhost.immense-isp.com: Received: from alpha.bieberdorf.edu (alpha.bieberdorf.edu [ ]) by mail.bieberdorf.edu (8.8.5) id 004A21; Tue, Mar :36: (PST) From: (R.T. Hood) To: Date: Tue, Mar :36:14 PST Message-Id: X-Mailer: Loris v2.32 Subject: Lunch today? Received: from alpha.bieberdorf.edu (alpha.bieberdorf.edu [ ]) by mail.bieberdorf.edu (8.8.5) id 004A21; Tue, Mar :36: (PST) From: (R.T. Hood) To: Date: Tue, Mar :36:14 PST Message-Id: X-Mailer: Loris v2.32 Subject: Lunch today? As they are when mailhost.immense-isp.com finishes processing the message and stores it for tmh to retrieve: 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 [ ]) by mailhost.immense-isp.com (8.8.5/8.7.2) with ESMTP id LAA20869 for ; Tue, 18 Mar :39: (PST) Received: from alpha.bieberdorf.edu (alpha.bieberdorf.edu [ ]) by mail.bieberdorf.edu (8.8.5) id 004A21; Tue, Mar :36: (PST) From: (R.T. Hood) To: Date: Tue, Mar :36:14 PST Message-Id: X-Mailer: Loris v2.32 Subject: Lunch today? Received: from mail.bieberdorf.edu (mail.bieberdorf.edu [ ]) by mailhost.immense-isp.com (8.8.5/8.7.2) with ESMTP id LAA20869 for ; Tue, 18 Mar :39: (PST) Received: from alpha.bieberdorf.edu (alpha.bieberdorf.edu [ ]) by mail.bieberdorf.edu (8.8.5) id 004A21; Tue, Mar :36: (PST) From: (R.T. Hood) To: Date: Tue, Mar :36:14 PST Message-Id: X-Mailer: Loris v2.32 Subject: Lunch today?
Command Description DATA Begins message composition. DATA Begins message composition. EXPN Returns names on the specified mail list. EXPN Returns names on the specified mail list. HELO Returns identity of mail server. HELO Returns identity of mail server. HELP Returns information on the specified command. HELP Returns information on the specified command. MAIL FROM Initiates a mail session from host. MAIL FROM Initiates a mail session from host. NOOP Causes no action, except acknowledgement from server. NOOP Causes no action, except acknowledgement from server. QUIT Terminates the mail session. QUIT Terminates the mail session. RCPT TO Designates who receives mail. RCPT TO Designates who receives mail. RSET Resets mail connection. RSET Resets mail connection. SAML FROM Sends mail to user terminal and mailbox. SAML FROM Sends mail to user terminal and mailbox. SEND FROM Sends mail to user terminal. SEND FROM Sends mail to user terminal. SOML FROM Sends mail to user terminal or mailbox. SOML FROM Sends mail to user terminal or mailbox. TURN Switches role of receiver and sender. TURN Switches role of receiver and sender. VRFY Verifies the identity of a user. VRFY Verifies the identity of a user.
Response Codes Server returns response codes to client: Server returns response codes to client: 2xx everything is fine, go on 2xx everything is fine, go on 4xx temporary problem, try again later 4xx temporary problem, try again later 5xx permanent error, give up 5xx permanent error, give up
Mail session