\chapter{Introduction}
\label{chap:introduction}

\section{History of electronic mail}
%TODO: have a quote from Bell Labs about email here
%FIXME: add references to text

Electronic mail\index{electronic mail} (short: \name{email}) is a basic concept in \unix.
On \unix\ machines, a lot of information is distributed by \name{system mail}, which is email sent by the operating system.
Beside that, email is the common communication system between humans working on computers.

The \unix\ operating system supports email through the \name{mail user agent} (\NAME{MUA}) \name{/bin/mail}.

As generally known, development of \unix\ was not only made in the \name{Bell Labratories} of \NAME{AT\&T}.
The \name{Univerity of California at Berkeley} worked on their version of a \unix\ operating system, too.
It is refered to as \NAME{UCB} \unix, or \name{Berkeley} \unix\index{Berkeley Unix}.

The few features of \name{/bin/mail} lead to a second \NAME{MUA} from Berkeley: \name{Mail} (with a capital `M').
Later, the superior functionality of \name{Mail} went back to \name{Bell Labs} and into the program \name{mailx}, the successor of \name{/bin/mail}.
The different programs for handling mail are a good example for the problem of standardization of \unix.

Nowadays, \name{mailx} and \name{Mail} are quite equivalent and \name{/bin/mail} is linked to either of them---whichever is installed.

For transporting mail in between two systems, the \NAME{UUCP} program and protocol suite (for ``\unix\ to \unix\ copy'') was invented at \name{Bell Labs}.
Berkeley however had an own creation called \name{Berknet} in use. %FIXME: why? license issues? closed source?
Further more there was a third important network type: the \NAME{ARPAnet}, based on the \name{transmission control protocol} (\NAME{TCP}). %FIXME: where did it came from?

Each of the three network types could transfer email between different machines.
The file transfer itself was made using \NAME{FTP}, but the higher layered logic of the transfer was different in each.
For example was the addressing schema not the same: \NAME{UUCP} used a flat-style schema, while \NAME{ARPAnet} was hierachical.

Mail transport from one machine using one kind of network to a second machine using another kind was a problem.
This showed up at Berkeley where some departments of the university had switched to \NAME{ARPAnet}, and some to \NAME{UUCP}, while the rest was \name{Berknet}.

It was around 1982, when Eric Allman, then a student at Berkeley, wrote \name{delivermail}.
Its purpose was to transform email from one network to another.
\name{delivermail} like its successor, the more flexible \sendmail, intermediated between the different networks.
They were able to transform email messages from any network to any other.

Todays email structure is basicly the same as then.
The major difference is the uniformity of the underlying network, which is nearly always the \NAME{ARPAnet}-based \name{Internet}.
Most other differences are organized as extensions to the old model of electronic mail.

More information about electronic mail and its history can be found at:
%FIXME: add books and websites here

% http://www.helpdesk.umd.edu/documents/4/4804/
% http://www.networkcomputing.com/unixworld/tutorial/810.txt.html
% http://www.livinginternet.com/i/iw_unix_war.htm
% http://www.nobell.org/~gjm/about/ihnp4.html
% http://en.wikipedia.org/wiki/E-mail
% http://en.wikipedia.org/wiki/UUCP
% http://en.wikipedia.org/wiki/ARPAnet
% http://en.wikipedia.org/wiki/History_of_the_Internet
% http://www.multicians.org/thvv/mail-history.html
% http://openmap.bbn.com/~tomlinso/ray/firstemailframe.html
% http://www.livinginternet.com/e/ei.htm
% http://www.cs.ucsb.edu/~almeroth/classes/F04.176A/homework1_good_papers/jay-akkad.html


\section{Transporting mail}
%TODO: include definitions from others here (cites)
%TODO: when was the term ``mail transfer agent'' established?
The basic job of a \name{mail transfer agent} (or \index{mail transport agent|see{mail transfer agent}}\name{mail transport agent}, short \NAME{MTA}) is to transfer/transport \name{electronic mail} (short \name{email}) from one host to another.

Here are definitions from various sources:

\begin{quotation}
A mail transfer agent (MTA) is a highly specialized program that delivers mail and transports it between machines, like the post office. Usually there is only one MTA on a machine. The sendmail program is an MTA.
\cite{sendmail}
\end{quotation}

\begin{quotation}
A mail transfer agent (MTA) (also called a mail transport agent, message transfer agent, or smtpd (short for SMTP daemon)), is a computer program or software agent that transfers electronic mail messages from one computer to another.
\citeweb{wikipedia:mta}
\end{quotation}

\begin{quotation}
mail server (also known as a mail transfer agent or MTA, a mail transport agent, a mail router or an Internet mailer) is an application that receives incoming e-mail from local users (people within the same domain) and remote senders and forwards outgoing e-mail for delivery.
\citeweb{website:techtarget}
\end{quotation}

\begin{quotation}
Message Transfer Agent - (MTA, Mail Transfer Agent) Any program responsible for delivering e-mail messages. Upon receiving a message from a Mail User Agent or another MTA, often by SMTP over the Internet, it stores it temporarily locally and analyses the recipients and delivers it to any local addressees and/or forwards it to other remote MTAs (routing) for delivery to remote recipients. In either case it may edit and/or add to the message headers.

The most widely used MTA for Unix is sendmail, which communicates using SMTP.

RFC 2821 (SMTP) expands MTA as ``Mail Transfer Agent'' though this is less common. Alternatives with ``Transport'' are also seen but less correct.
\citeweb{website:thefreedictionary}
\end{quotation}

\begin{quotation}
mail transfer agent (MTA) The program responsible for delivering e-mail messages. Upon receiving a message from a mail user agent or another MTA it stores it temporarily locally and analyses the recipients and either delivers it (local addressee) or forwards it to another MTA. In either case it may edit and/or add to the message headers. A widely used MTA for Unix is sendmail. 
\citeweb{website:faqs}
\end{quotation}

\begin{quotation}
Mail Transfer Agent (MTA): The means by which mail messages are transferred between machines over the Internet.
\citeweb{website:freeserve.co.uk}
\end{quotation}


\section{\sendmail}
\label{sec:sendmail}
\name{sendmail} is the de facto standard for \name{mail transfer agents}.

% FIXME: is that true?
It was the first \NAME{MTA} and had no real alternative for a long time.

Most other existing substitutes (on \unix\ systems), which are mainly \name{postfix}, \name{exim}, \name{qmail} and the here regarded \name{masqmail}, mimic \name{sendmail}'s interface.
Especially, they all create a symbolic link named ``sendmail'' pointing to their own executable.
This is because a lot of programs assume there is an executable called ``sendmail'' on every computer system existing.

Besides being the ``standard'', \name{sendmail} probably is the most scalable and powerful solution for transfering emails and definately the most flexible one.



\section{(a look at Windows)}

