Tanenbaum section 7.4 Electronic Mail
RFC 821 - Simple Mail Transfer Protocol
RFC 2045 - MIME multipurpose Internet mail extensions - format of message bodies
RFC 2046 - MIME - media types
One of the earliest open application protocols - 1982
Very simple protocol for transferring human-readable mail messages.
Messages include envelope and content information.
Open Systems alternative to Internet email.
A more complicated family of protocols over the OSI 7 layer stack, with
Little implemented, interoperability function largely replaced by Internet mail.
User agent interacts with user:
Transfer agent sends and receives messages over network - client-server, connection via port 25.

There are very many examples of user agents:
The user agent prepares the message from user interaction
including message transfer header fields;
expands user's address aliases
The message transfer agent (such as UNIX sendmail) acts as client, makes a connection with an agent acting as server at the destination host computer.
Messages are transferred with SMTP
- simple mail transfer protocol
often via intermediate mail hosts
where address aliases may be expanded.
Messages are commonly stored at receiver for
later pickup by user agent
OR
transfer to further remote user using Post
Office Protocol POP.
Messages consist of
From: somebody
To: someone else
Subject: something that you want to write about
This format should be familiar to those who have looked at HTTP (see also lecture 5 in this series) - which is based on the RFC 822 standard.
Tanenbaum fig. 7-42, Tanenbaum fig. 7-43 Some RFC 822 headers
Added to basic message format to allow
text/plain
image/gif
application/octet-stream
can also specify more interpretation information,
such as text/plain - character set in which the message is to be interpreted,
using attribute=value notation added to type/subtype
text/plain charset=us-ascii
text/plain charset=iso8859-1
Headers added by MIME - Tanenbaum fig. 7-44
The MIME content types and subtypes - Tanenbaum fig. 7-45
Tanenbaum fig 7-46 - multipart message
These headers are also used in HTTP.
When appearing in the header of a HTTP response, the client (browser) is informed how to display the message body.
HTTP also adds further related headers, such as
[HTTP specification section 14.12, RFC 2068, HTTP/1.1]
specifies compression method used for body data
gzip
compress
The transfer protocol is simple.
Connection oriented - assumes error free transport service (TCP).
Client may transfer many messages in one session.
SMTP protocol sequence - Halsall "Data communication,s computer networks and open systems" 3rd edition, Addison Wesley 1992, fig 12-6
Example of message transfer - Tanenbaum fig. 7-47
Needed to carry different types of data through the very low-ability RFC821 service of 7 bit ASCII characters only.
7bit - default if no header included
8bit
binary
quoted-printable - 7 bit characters plus hex-encoding for extension set
Now is winter=B4s ending=20
just around the corner.
base64 - groups of 24 bits grouped as 4x6 bits,
each 6 bit group represented by a single printable ASCII character
in A..Z, a..z, 0..9, +, /
where = and == mean a short group of 8 or 16 bits at the end.
AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAPgAAABAAAAAJAAAATgAAACAA
AAACAAAAbgAAAR5BZ2VuZGEgMy85NyBKdWx5VzZCTk1TV0QBAP////8AAAAAAAAAAAAA
AAAAAAAAAAAAAAEAAAABAAAAAAAAAAAej0hu/+RwAS8ASG7/7Ehu//Bw+avtVE9Krv/s
Zwa4rv8QQWdlbmRhIDMvOTcgSnVseSACAAIAVzZCTk1TV0QAAAIAVzZCTk1TV0QAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAACv7/lAAABuAAAAAR5QIm7/4CNoAAQAGCBu//AgUCJu
/+AjUAAISgVnHkoGZxogeAK2IGgBGHAIwKgACGcKLy7/4E66BopYT1mPqNgmXy8KLwuo
3C8LcAE/AD8AqOEvCi8LLwqo5i8LqNlVjy8u/+AvLgAULwpwDavtNh9nDAxD/4BnBj1D
ABhgYgxD/4BmAAABAAAAAQAAAAAAAAAAHgKf7IwdBAAAABwAHv//
Last modified: Tue Mar 30 11:21:15 EST 1999