docs/diploma

diff thesis/tex/1-Introduction.tex @ 373:d51894e48762

started indexing; mta -> MTA (many small changes)
author meillo@marmaro.de
date Sat, 31 Jan 2009 21:39:53 +0100
parents 664716b256e1
children 3445852ed736
line diff
     1.1 --- a/thesis/tex/1-Introduction.tex	Sat Jan 31 20:07:58 2009 +0100
     1.2 +++ b/thesis/tex/1-Introduction.tex	Sat Jan 31 21:39:53 2009 +0100
     1.3 @@ -9,24 +9,28 @@
     1.4  
     1.5  \section{Email prerequisites}
     1.6  
     1.7 -Electronic mail is a service on the Internet and thus, like other Internet services, defined and standardized by \RFC{}s under management of the \name{Internet Engineering Task Force} (short: \NAME{IETF}). \RFC{}s are highly technical documents and it is not required that the readers of this thesis are familiar with them.
     1.8 +Electronic mail is a service on the Internet and thus, like other Internet services, defined and standardized by \name{Requests For Comments}\index{rfc} (short: \RFC{}s\index{rfc}) under management of the \name{Internet Engineering Task Force}\index{ietf} (short: \NAME{IETF}). \RFC{}s are highly technical documents and it is not required that the readers of this thesis are familiar with them.
     1.9  
    1.10  This section gives an introduction into the basic internals of the email system in a low-technical language. It is intended to make the reader familiar with the essential concepts of email as they are essential throughout the thesis.
    1.11  
    1.12  
    1.13  \subsubsection{Mail agents}
    1.14 +\index{mail agents}
    1.15  
    1.16 -This thesis will frequently use the three terms: \MTA, \NAME{MUA}, and \NAME{MDA}, naming the three different kinds of nodes of the email infrastructure. Here, they are explained with references to the ``snail mail'' system which is known from everyday life. Figure \ref{fig:mail-agents} shows the relation between those three mail agents and the way an email message takes when passing through the system.
    1.17 +This thesis will frequently use the three terms: \MTA, \MUA{}, and \MDA{}, naming the three different kinds of nodes of the email infrastructure. Here, they are explained with references to the ``snail mail'' system which is known from everyday life. Figure \ref{fig:mail-agents} shows the relation between those three mail agents and the way an email message takes when passing through the system.
    1.18  
    1.19  \begin{description}
    1.20  \item[\MTA:]
    1.21 +\index{mta}
    1.22  \name{Mail Transfer Agents} are the post offices for electronic mail. The basic job of an \MTA\ is to transport mail from senders to recipients, or more pedantic: from \MTA\ to \MTA. \sendmail, \exim, \qmail, \postfix, and, of course, \masqmail\ are \MTA{}s. \MTA{}s are explained in more detail in chapter \ref{chap:mail-transfer-agents}.
    1.23  
    1.24 -\item[\NAME{MUA}:]
    1.25 -\name{Mail User Agents} are the software users deal with. A user writes and reads email with it. The \NAME{MUA} passes outgoing mail to the nearest \MTA. Also the \NAME{MUA} displays the contents of the user's mailbox. Well known \NAME{MUA}s are \name{Mozilla Thunderbird} and \name{mutt} on \unix\ systems, and \name{Microsoft Outlook} on \name{Windows}.
    1.26 +\item[\MUA{}:]
    1.27 +\index{mua}
    1.28 +\name{Mail User Agents} are the software users deal with. A user writes and reads email with it. The \MUA{} passes outgoing mail to the nearest \MTA. Also the \MUA{} displays the contents of the user's mailbox. Well known \MUA{}s are \name{Mozilla Thunderbird} and \name{mutt} on \unix\ systems, and \name{Microsoft Outlook} on \name{Windows}.
    1.29  
    1.30 -\item[\NAME{MDA}:]
    1.31 -\name{Mail Delivery Agents} correspond to postmen in the real world. They receive mail, destined to recipients they are responsible for, from an \MTA, and deliver it to the mailboxes of those recipients. Many \MTA{}s include an own \NAME{MDA}, but independent ones exist: \name{procmail} and \name{maildrop} are examples.
    1.32 +\item[\MDA{}:]
    1.33 +\index{mda}
    1.34 +\name{Mail Delivery Agents} correspond to postmen in the real world. They receive mail, destined to recipients they are responsible for, from an \MTA, and deliver it to the mailboxes of those recipients. Many \MTA{}s include an own \MDA{}, but independent ones exist: \name{procmail} and \name{maildrop} are examples.
    1.35  \end{description}
    1.36  
    1.37  \begin{figure}
    1.38 @@ -44,35 +48,35 @@
    1.39  
    1.40  \subsubsection{Mail transfer with SMTP}
    1.41  
    1.42 -Today most of the email is transferred using the \name{Simple Mail Transfer Protocol} (short: \SMTP), which is defined in \RFC\,821 and the successors \RFC\,2821 and \RFC\,5321. A good entry point for further information is \citeweb{wikipedia:smtp}.
    1.43 +Today most of the email is transferred using the \name{Simple Mail Transfer Protocol}\index{smtp} (short: \SMTP), which is defined in \RFC\,821 and the successors \RFC\,2821 and \RFC\,5321. A good entry point for further information is \citeweb{wikipedia:smtp}.
    1.44  
    1.45 -A selection of important concepts of \SMTP\ is explained here.
    1.46 +A selection of important concepts of \SMTP\index{smtp!concepts of} is explained here.
    1.47  
    1.48 -First the \name{store and forward} transfer concept. This means mail messages are sent from \MTA\ to \MTA, until the final \MTA\ (the one which is responsible for the recipient) is reached. The message is gets stored for some time on each \MTA, until it is forwarded to the next \MTA.
    1.49 +First the \name{store and forward}\index{smtp!store and forward} transfer concept. This means mail messages are sent from \MTA\ to \MTA, until the final \MTA\ (the one which is responsible for the recipient) is reached. The message is gets stored for some time on each \MTA, until it is forwarded to the next \MTA.
    1.50  
    1.51 -This leads to the concept of \name{responsibility}. A mail message is always in the responsibility of one system. First it is the \NAME{MUA}. When it is transferred to an \MTA, this \MTA\ takes over the responsibility for the message too. The \NAME{MUA} can then delete its copy of the message. This is the same for each transfer---from \MTA\ to \MTA\ and finally from \MTA\ to the \NAME{MDA}---the message gets transferred and if the transfer was successful, the responsibility for the message is transferred as well. The responsibility chain ends at a user's mailbox where he himself has control on the message.
    1.52 +This leads to the concept of \name{responsibility}\index{smtp!responsibility}. A mail message is always in the responsibility of one system. First it is the \MUA\index{mua}. When it is transferred to an \MTA, this \MTA\ takes over the responsibility for the message too. The \MUA{} can then delete its copy of the message. This is the same for each transfer---from \MTA\ to \MTA\ and finally from \MTA\ to the \MDA{}---the message gets transferred and if the transfer was successful, the responsibility for the message is transferred as well. The responsibility chain ends at a user's mailbox where he himself has control on the message.
    1.53  
    1.54 -A third concept is about failure handling. At any step on the way an \MTA\ may receive a message it is unable to handle. In such a case this receiving \MTA\ will \name{reject} the message before it takes responsibility for it. The sending \MTA\ still has responsibility for the message and may try other ways for sending the message. If none succeeds the \MTA\ will send a \name{bounce message} back to the original sender with information on the type of failure. Bounces are only sent if the failure is expected to be permanent or if the transfer still was unsuccessful after many tries.
    1.55 +A third concept is about failure handling. At any step on the way an \MTA\ may receive a message it is unable to handle. In such a case this receiving \MTA\ will \name{reject}\index{smtp!rejecting} the message before it takes responsibility for it. The sending \MTA\ still has responsibility for the message and may try other ways for sending the message. If none succeeds the \MTA\ will send a \name{bounce message}\index{smtp!bouncing} back to the original sender with information on the type of failure. Bounces are only sent if the failure is expected to be permanent or if the transfer still was unsuccessful after many tries.
    1.56  
    1.57  
    1.58  
    1.59  \subsubsection{Mail messages}
    1.60  
    1.61 -Mail messages consist of text in a specific format. This format is specified in \RFC\,822, and the successors \RFC\,2822 and \RFC\,5322.
    1.62 +Mail messages\index{mail message} consist of text in a specific format. This format is specified in \RFC\,822, and the successors \RFC\,2822 and \RFC\,5322.
    1.63  
    1.64 -A message has two parts, the \name{header} and the \name{body}. The header of an email message is similar to the header of a (formal) letter. It spans the first lines of the message up to the first empty line. The header consists of several lines, called \name{header lines} or simply \name{headers}. They specify the sender, the recipient(s), the date, and possibly further information. Their order is irrelevant. Headers are named like the colon-separated start of those lines, for example the ``\texttt{Date:}'' header. A user may write the header himself but normally the \NAME{MUA} does this job.
    1.65 +A message has two parts, the \name{header}\index{mail message!header} and the \name{body}\index{mail message!body}. The header of an email message is similar to the header of a (formal) letter. It spans the first lines of the message up to the first empty line. The header consists of several lines, called \name{header lines}\index{mail message!header lines} or simply \name{headers}. They specify the sender, the recipient(s), the date, and possibly further information. Their order is irrelevant. Headers are named like the colon-separated start of those lines, for example the ``\texttt{Date:}'' header. A user may write the header himself but normally the \MUA{} does this job.
    1.66  
    1.67 -The body is the payload of the message. It is under full control of the user. From the view point of the \SMTP\ protocol, it must consist of only 7-bit \NAME{ASCII} text. But arbitrary content can be included by encoding it to 7-bit \NAME{ASCII}. \NAME{MIME} is the common \SMTP\ extension to handle such conversion automatically in \NAME{MUA}s.
    1.68 +The body is the payload\index{mail message!payload} of the message. It is under full control of the user. From the view point of the \SMTP\ protocol, it must consist of only 7-bit \NAME{ASCII}\index{ascii} text. But arbitrary content can be included by encoding it to 7-bit \NAME{ASCII}. \NAME{MIME}\index{mime} is the common \SMTP\ extension to handle such conversion automatically in \MUA{}s.
    1.69  
    1.70  Following is a sample mail message with four header lines (\texttt{From:}, \texttt{To:}, \texttt{Date:}, and \texttt{Subject:}) and three lines of message body.
    1.71  
    1.72 -\codeinput{input/sample-email.txt}
    1.73 +\codeinput{input/sample-email.txt}\index{mail message!example}
    1.74  
    1.75 -Email messages are put into \name{envelopes} for transfer. This concept is also derived from the real world so it is easy to understand. The envelope is used to route the message from sender to recipient. It contains the sender's address and addresses of one or more recipients. Envelopes are generated by \MTA{}s, usually from mail header data. The user has not to deal with them.
    1.76 +Email messages are put into \name{envelopes}\index{mail message!envelope} for transfer. This concept is also derived from the real world so it is easy to understand. The envelope is used to route the message from sender to recipient. It contains the sender's address and addresses of one or more recipients. Envelopes are generated by \MTA{}s, usually from mail header data. The user has not to deal with them.
    1.77  
    1.78  Each \MTA\ on the way reads envelopes it receives and generates new ones. If a message has recipients on different hosts, then the message gets copied and sent within multiple envelopes, one for each host.
    1.79  
    1.80 -The sample message would would lead to two envelopes, one from \name{markus@host01} to \name{alice@host02}, the other from \name{markus@host01} to \name{bob@host03}. Both envelopes would contain the same message.
    1.81 +The sample message would would lead to two envelopes\index{mail message!more envelopes}, one from \name{markus@host01} to \name{alice@host02}, the other from \name{markus@host01} to \name{bob@host03}. Both envelopes would contain the same message.
    1.82  
    1.83  
    1.84  
    1.85 @@ -82,11 +86,11 @@
    1.86  \section{The \masqmail\ project}
    1.87  \label{sec:masqmail}
    1.88  
    1.89 -The \masqmail\ project was initiated by \person{Oliver Kurth} in 1999. His aim was to create a small \MTA\ that is especially focused on computers with dial-up Internet connections. Throughout the next four years he worked steadily on it, releasing new versions every few weeks. During the active phase of development 53 version have been released. In average, this is a new version every 20 days.
    1.90 +The \masqmail\ project\index{masqmail!the project} was initiated by \person{Oliver Kurth} in 1999. His aim was to create a small \MTA\ that is especially focused on computers with dial-up Internet connections\index{dial-up}. Throughout the next four years he worked steadily on it, releasing new versions every few weeks. During the active phase of development 53 version have been released. In average, this is a new version every 20 days.
    1.91  
    1.92 -This thesis is based on the latest release of \masqmail---version 0.2.21, dated November 2005. It was released after a 28 month gap of inactivity. The source code of 0.2.21 is the same as of 0.2.20, with only build documents modified. The homepage of \masqmail\ \citeweb{masqmail:homepage2} does not include this latest release, but it can be retrieved from the \debian\ package pool\footnote{The \NAME{URL} is:\\\url{http://ftp.de.debian.org/debian/pool/main/m/masqmail/masqmail_0.2.21.orig.tar.gz}} \citeweb{packages.debian}.
    1.93 +This thesis is based on the latest release of \masqmail---version 0.2.21, dated November 2005\index{masqmail!latest release}. It was released after a 28 month gap of inactivity. The source code of 0.2.21 is the same as of 0.2.20, with only build documents modified. The homepage of \masqmail\ \citeweb{masqmail:homepage2}\index{masqmail!homepage} does not include this latest release, but it can be retrieved from the \debian\ package pool\index{debian!package pool}\footnote{The \NAME{URL} is:\\\url{http://ftp.de.debian.org/debian/pool/main/m/masqmail/masqmail_0.2.21.orig.tar.gz}} \citeweb{packages.debian}.
    1.94  
    1.95 -\masqmail\ is covered by the \name{General Public License} (short: \NAME{GPL}) \cite{fsf:gpl} which qualifies it as Free Software \cite{fsf:freesw-definition}.
    1.96 +\masqmail\ is covered by the \name{General Public License}\index{gpl} (short: \NAME{GPL}) \cite{fsf:gpl} which qualifies it as Free Software\index{free software} \cite{fsf:freesw-definition}.
    1.97  
    1.98  \person{Kurth} abandoned \masqmail\ after 2005 and no one adopted the project since then. Thus, the author of this thesis decided to take over responsibility for \masqmail\ now. He received \person{Kurth}'s permission to do so in private telephone conversation with \person{Kurth} on September 4, 2008.
    1.99  
   1.100 @@ -212,7 +216,7 @@
   1.101  
   1.102  \begin{enumerate}
   1.103  \item Direct delivery to local mailboxes (in \name{mbox} or \name{maildir} format)
   1.104 -\item Local pipes to pass mail to a program (e.g.\ to \NAME{MDA}s or to gateways to \NAME{UUCP} or fax)
   1.105 +\item Local pipes to pass mail to a program (e.g.\ to \MDA{}s or to gateways to \NAME{UUCP} or fax)
   1.106  \item \NAME{TCP} sockets to transfer mail to other \MTA{}s using the \SMTP\ protocol
   1.107  \end{enumerate}
   1.108  
   1.109 @@ -234,7 +238,7 @@
   1.110  %masqmail: mailq, mailrm, runq, rmail, smtpd/in.smtpd
   1.111  %sendmail: hoststat, mailq, newaliases, purgestat, smtpd
   1.112  
   1.113 -Additional to the \mta\ job, \masqmail\ also offers mail retrieval services by acting as a \NAME{POP3} client. It can fetch mail from different remote locations, also dependent on the active online connection. Such functionality is especially useful in a setup like \name{Scenario 2} on page \pageref{scenario2}.
   1.114 +Additional to the \MTA\ job, \masqmail\ also offers mail retrieval services by acting as a \NAME{POP3} client. It can fetch mail from different remote locations, also dependent on the active online connection. Such functionality is especially useful in a setup like \name{Scenario 2} on page \pageref{scenario2}.
   1.115  
   1.116  
   1.117