docs/diploma

changeset 378:c9a6cbce35fd

inserted non-break spaces where appropriate
author meillo@marmaro.de
date Tue, 03 Feb 2009 18:01:33 +0100
parents 90d5f98e3968
children 6c3c6af02faa
files thesis/tex/1-Introduction.tex thesis/tex/2-MarketAnalysis.tex thesis/tex/3-MailTransferAgents.tex thesis/tex/4-MasqmailsFuture.tex thesis/tex/5-Improvements.tex
diffstat 5 files changed, 52 insertions(+), 52 deletions(-) [+]
line diff
     1.1 --- a/thesis/tex/1-Introduction.tex	Tue Feb 03 17:53:03 2009 +0100
     1.2 +++ b/thesis/tex/1-Introduction.tex	Tue Feb 03 18:01:33 2009 +0100
     1.3 @@ -17,12 +17,12 @@
     1.4  \subsubsection{Mail agents}
     1.5  \index{mail agents}
     1.6  
     1.7 -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.8 +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.9  
    1.10  \begin{description}
    1.11  \item[\MTA:]
    1.12  \index{mta}
    1.13 -\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.14 +\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.15  
    1.16  \item[\MUA{}:]
    1.17  \index{mua}
    1.18 @@ -120,7 +120,7 @@
    1.19  
    1.20  The program is a good replacement ``in these cases'' but not generally, since it lacks essential features for running on publically accessable mail servers. It is primarily not secure enough for being accessible from untrusted locations.
    1.21  
    1.22 -\masqmail\ is best used in home networks which are non-permanently connected to the Internet. It is easy configurable for situations which are rarely solvable with the common \MTA{}s. Such include different handling of mail to local or remote destination and respecting different routes of online connection. These features are explained in more detail in section \ref{sec:masqmail-features}.
    1.23 +\masqmail\ is best used in home networks which are non-permanently connected to the Internet. It is easy configurable for situations which are rarely solvable with the common \MTA{}s. Such include different handling of mail to local or remote destination and respecting different routes of online connection. These features are explained in more detail in section~\ref{sec:masqmail-features}.
    1.24  
    1.25  While many other \MTA{}s are general purpose \MTA{}s, \masqmail\ aims on special situations. Nevertheless, it can be used as general purpose \MTA\ too. Especially this was a design goal of \masqmail: To be a replacement for \sendmail\ or similar \MTA{}s.
    1.26  
    1.27 @@ -130,7 +130,7 @@
    1.28  
    1.29  \subsubsection*{Typical usage scenarios}
    1.30  
    1.31 -This section describes three common setups that make sensible use of \masqmail. The first two are shown in figure \ref{fig:masqmail-typical-usage}.
    1.32 +This section describes three common setups that make sensible use of \masqmail. The first two are shown in figure~\ref{fig:masqmail-typical-usage}.
    1.33  
    1.34  \begin{figure}
    1.35  	\begin{center}
    1.36 @@ -150,7 +150,7 @@
    1.37  
    1.38  \item[Scenario 2:]
    1.39  \label{scenario2}
    1.40 -In the same network but with a server, one could have \masqmail\ running on the server and using simple forwarders (see \ref{subsec:relay-only}) on the workstations to transfer mail to the server. The server would then, dependent on the destination of the message, deliver locally or relay to an \NAME{ISP}'s server for further relay. This setup does only support mail transfer to the server but not back to a workstation. However, this can be solved by mounting the user's mailbox from the server to the workstation or by using \NAME{POP3} or \NAME{IMAP}. Mail transfer from the \NAME{ISP} to the local server needs \NAME{POP3} or \NAME{IMAP} as well.
    1.41 +In the same network but with a server, one could have \masqmail\ running on the server and using simple forwarders (see section~\ref{subsec:relay-only}) on the workstations to transfer mail to the server. The server would then, dependent on the destination of the message, deliver locally or relay to an \NAME{ISP}'s server for further relay. This setup does only support mail transfer to the server but not back to a workstation. However, this can be solved by mounting the user's mailbox from the server to the workstation or by using \NAME{POP3} or \NAME{IMAP}. Mail transfer from the \NAME{ISP} to the local server needs \NAME{POP3} or \NAME{IMAP} as well.
    1.42  
    1.43  \item[Scenario 3:]
    1.44  \label{scenario3}
    1.45 @@ -224,7 +224,7 @@
    1.46  \item \NAME{TCP} sockets to transfer mail to other \MTA{}s using the \SMTP\ protocol
    1.47  \end{enumerate}
    1.48  
    1.49 -Figure \ref{fig:masqmail-channels} shows this as a picture. (The ``online state'' input is explained a bit later.)
    1.50 +Figure~\ref{fig:masqmail-channels} shows this as a picture. (The ``online state'' input is explained a bit later.)
    1.51  
    1.52  \begin{figure}
    1.53  	\begin{center}
    1.54 @@ -297,7 +297,7 @@
    1.55  \hfill\citeweb[post~\#8]{ubuntuforums:simple-mailer}
    1.56  \end{quote}
    1.57  
    1.58 -Not to forget \masqmail's size. \masqmail\ is much smaller than full-blown \MTA{}s like \sendmail, \postfix, or \exim, and still smaller than \qmail. (See section \ref{sec:mta-comparison} for details.) This makes \masqmail\ a good choice for workstations or even embedded computers.
    1.59 +Not to forget \masqmail's size. \masqmail\ is much smaller than full-blown \MTA{}s like \sendmail, \postfix, or \exim, and still smaller than \qmail. (See section~\ref{sec:mta-comparison} for details.) This makes \masqmail\ a good choice for workstations or even embedded computers.
    1.60  
    1.61  Again words of a user who chose \masqmail\ as \MTA\ on his old laptop with a 75 megahertz processor and eight megabytes of \NAME{RAM}:
    1.62  \begin{quote}
     2.1 --- a/thesis/tex/2-MarketAnalysis.tex	Tue Feb 03 17:53:03 2009 +0100
     2.2 +++ b/thesis/tex/2-MarketAnalysis.tex	Tue Feb 03 18:01:33 2009 +0100
     2.3 @@ -23,7 +23,7 @@
     2.4  
     2.5  \person{Lenke} and \person{Schmitz} use the same criteria to classify \emph{new media} \cite{lenke95}. They additionally divide into local and remote communication---the latter is presumed here---and by the number of communication participants. A classification by participant structure is omitted here, as communication technologies for many-to-many communication (like chat rooms) are usable for one-to-one (private chat) too, and ones for one-to-one (email) are usable for many-to-many (mailing lists).
     2.6  
     2.7 -Figure \ref{fig:comm-classification} shows a classification of communication technologies by the properties synchronous/asynchronous and written/recorded. Email and \NAME{SMS} are examples for written and asynchronous communication; \NAME{IM} and chats are ones for written but synchronous communication. Voice mail and video messages stand as examples for recorded asynchronous communication. VoIP represents recorded synchronous communication.
     2.8 +Figure~\ref{fig:comm-classification} shows a classification of communication technologies by the properties synchronous/asynchronous and written/recorded. Email and \NAME{SMS} are examples for written and asynchronous communication; \NAME{IM} and chats are ones for written but synchronous communication. Voice mail and video messages stand as examples for recorded asynchronous communication. VoIP represents recorded synchronous communication.
     2.9  
    2.10  \begin{figure}
    2.11  	\begin{center}
    2.12 @@ -43,7 +43,7 @@
    2.13  \subsection{Life cycle analysis}
    2.14  Life cycle analysis are common for products but also for technologies. This one here is for electronic communication technologies. The first dimension regarded is the life time of the subject. It is segmented into the introduction, growth, mature, saturation, and decline phases. The second dimension can display market share, importance, or similar values. The graph has always an S-line shape, with a slow start, a rapidly increasing first half, the highest level in the fourth fifths, and a slowly declining end. Reaching the end of the life cycle means that the subject gets superseded by successors or the market situation changed thus it is old-fashioned.
    2.15  
    2.16 -The current position on the life cycle of some selected communication technologies is shown in figure \ref{fig:comm-lifecycle}. It is important to notice that the time dimension can be different for each technology---some life cycles are shorter than others---the shape of the graph, however, is the same.
    2.17 +The current position on the life cycle of some selected communication technologies is shown in figure~\ref{fig:comm-lifecycle}. It is important to notice that the time dimension can be different for each technology---some life cycles are shorter than others---the shape of the graph, however, is the same.
    2.18  
    2.19  \begin{figure}
    2.20  	\begin{center}
    2.21 @@ -57,7 +57,7 @@
    2.22  
    2.23  Email ranges in the saturation phase which is defined by a saturated market. No more products are needed: there is no more growth. This means, email is a technology which is used by everyone who want to use it. It is a standard technology. The current form of email in the current market is on the top of its life cycle. The future is decline, sooner or later.
    2.24  
    2.25 -But life cycles positions change as the subject or the market changes. An examples is the \name{Flash} animation software \citeweb{flash:homepage}. The product's change from a drawing and animation system to a technology for website creation, advertising, and movie distribution, and the thus changing target market, made it slip back on the life cycle. If the email system would evolve to become the basis for Unified Messaging (see section \ref{sec:unified-messaging}), a similar slip back would be the consequence.
    2.26 +But life cycles positions change as the subject or the market changes. An examples is the \name{Flash} animation software \citeweb{flash:homepage}. The product's change from a drawing and animation system to a technology for website creation, advertising, and movie distribution, and the thus changing target market, made it slip back on the life cycle. If the email system would evolve to become the basis for Unified Messaging (see section~\ref{sec:unified-messaging}), a similar slip back would be the consequence.
    2.27  
    2.28  The \NAME{DVD} standards \NAME{DVD+} and \NAME{DVD$-$} are an example for a changing market. With the upcoming next generation formats \name{Blu-ray Disc} \citeweb{wikipedia:bluray} and \NAME{HD-DVD} \citeweb{wikipedia:hddvd}, a much sooner decline of \NAME{DVD+} and \NAME{DVD$-$} started, even before they reached their last improvement steps in storage size. Such can happen to email too, if Unified Messaging is a revolution to the email system instead of an evolution.
    2.29  
    2.30 @@ -159,7 +159,7 @@
    2.31  
    2.32  The increasing integration of communication channels is an opportunity for the market. But deciding whether it is a weakness or strength of email is difficult. Due to the impossibility to integrate synchronous stream data and large binary data, it is a weakness. But it is also a strength, because arbitrary asynchronous communication data already can be integrated. On the other hand, the integration might be a threat too, because integration often leads to complexity of software. Complex software is more error prone and thus less reliable. This, however, could again be a strength of electronic mail because its modular design decreases complexity.
    2.33  
    2.34 -Figure \ref{fig:email-swot} displays the \NAME{SWOT} analysis in a handy overview. It is obvious to see, that the opportunities outweigh. This is an indicator for a still increasing market. %fixme: ref
    2.35 +Figure~\ref{fig:email-swot} displays the \NAME{SWOT} analysis in a handy overview. It is obvious to see, that the opportunities outweigh. This is an indicator for a still increasing market. %fixme: ref
    2.36  
    2.37  \begin{figure}
    2.38  	\begin{center}
    2.39 @@ -252,7 +252,7 @@
    2.40  When \MTA{}s become popular on home servers and maybe even on workstations and smart phones, then performance will be less important. Providers need \MTA{}s that process large amounts of mail in short time. There is no need for home servers and workstations to handle that much mail; they need to process far less email messages per time unit. Thus performance will probably not be a main requirement for an \MTA\ in future, given they mainly run on private machines.
    2.41  
    2.42  \paragraph{Flexibility}
    2.43 -New mailing concepts and architectures like push email or \name{Internet Mail 2000} will, if they succeed, require \MTA{}s to adopt the new technology. \MTA{}s that are not able to change are going to be sorted out by evolution. Thus it is important \emph{not} to focus too much on one use case, but to stay flexible. \person{Allman} saw the flexibility of \sendmail\ one reason for its huge success (see section \ref{sec:sendmail}).
    2.44 +New mailing concepts and architectures like push email or \name{Internet Mail 2000} will, if they succeed, require \MTA{}s to adopt the new technology. \MTA{}s that are not able to change are going to be sorted out by evolution. Thus it is important \emph{not} to focus too much on one use case, but to stay flexible. \person{Allman} saw the flexibility of \sendmail\ one reason for its huge success (see section~\ref{sec:sendmail}).
    2.45  
    2.46  \paragraph{Security}
    2.47  Another important requirement for all kinds of software is security. There is a constant trend coming from completely non-secured software, in the 70s and 80s, over growing security awareness, in the 90s, to security being a primary goal, now. This leads to the conclusion that software security will be even more important within the next years. As more clients get connected to the Internet and especially more computers are listening for incoming connections (like an \MTA\ in a home server), there are more possibilities to break into systems. Securing of software systems will require increasing effort in future.
     3.1 --- a/thesis/tex/3-MailTransferAgents.tex	Tue Feb 03 17:53:03 2009 +0100
     3.2 +++ b/thesis/tex/3-MailTransferAgents.tex	Tue Feb 03 18:01:33 2009 +0100
     3.3 @@ -74,7 +74,7 @@
     3.4  
     3.5  Now, where does \masqmail\ fit in? It is not groupware nor a simple forwarder, thus it belongs to the ``real \MTA{}s''. Additionally, it is Free Software and is sendmail-compatible to a large degree. This makes it similar to \sendmail, \exim, \qmail, and \postfix. \masqmail\ is intended to be a replacement for those \MTA{}s.
     3.6  
     3.7 -But: It was not designed to be used as a general replacement for them. (See: section \ref{sec:masqmail-target-field}) In fact, \masqmail\ is only a replacement \emph{in some situations}. This primary excludes working in an untrusted environment.
     3.8 +But: It was not designed to be used as a general replacement for them. (See: section~\ref{sec:masqmail-target-field}) In fact, \masqmail\ is only a replacement \emph{in some situations}. This primary excludes working in an untrusted environment.
     3.9  
    3.10  
    3.11  
    3.12 @@ -97,7 +97,7 @@
    3.13  
    3.14  \MTA\ statistics are rare, differ, and good data is hard to collect. These points are bad if good statistics are wanted. Thus it is obvious there are only few available.
    3.15  
    3.16 -Table \ref{tab:mta-market-share} shows the most used \MTA{}s determined by three different statistics. The first was done by \person{Daniel~J.\ Bernstein} (the author of \qmail) in 2001 \cite{bernstein01}. The second is by \person{Simpson} and \person{Bekman} in 2007 and was published on \name{O'ReillyNet} \cite{simpson07}. And the third is from \name{MailRadar.com} with unknown date\footnote{The footer of the website shows ``Copyright 2007'' but more likely does this refer to the whole website.} \citeweb{mailradar:mta-stats}.
    3.17 +Table~\ref{tab:mta-market-share} shows the most used \MTA{}s determined by three different statistics. The first was done by \person{Daniel~J.\ Bernstein} (the author of \qmail) in 2001 \cite{bernstein01}. The second is by \person{Simpson} and \person{Bekman} in 2007 and was published on \name{O'ReillyNet} \cite{simpson07}. And the third is from \name{MailRadar.com} with unknown date\footnote{The footer of the website shows ``Copyright 2007'' but more likely does this refer to the whole website.} \citeweb{mailradar:mta-stats}.
    3.18  
    3.19  \begin{table}
    3.20  	\begin{center}
    3.21 @@ -120,7 +120,7 @@
    3.22  
    3.23  \subsection{The four major Free Software MTAs}
    3.24  
    3.25 -Now follows a small introduction to the four programs chosen for comparison. \masqmail\ is not presented here as it was already introduced in chapter \ref{chap:introduction}. Longer introductions, including analysis and comparison, were written by \person{Jonathan de Boyne Pollard} \cite{jdebp}.
    3.26 +Now follows a small introduction to the four programs chosen for comparison. \masqmail\ is not presented here as it was already introduced in chapter~\ref{chap:introduction}. Longer introductions, including analysis and comparison, were written by \person{Jonathan de Boyne Pollard} \cite{jdebp}.
    3.27  
    3.28  
    3.29  
    3.30 @@ -136,7 +136,7 @@
    3.31  The program was first released with \NAME{BSD} 4.1c in 1983. The latest version is 8.14.3 from May 2008. The program is distributed under the \name{Sendmail License} as both, free and proprietary software.
    3.32  %fixme: write about its importance and about sendmail-compat
    3.33  
    3.34 -Further development will go into the project \name{MeTA1} (the former name was \name{sendmail X}) which succeeds \sendmail.
    3.35 +Further development will go into the project \name{MeTA1} which succeeds \sendmail. The former name of this new project was \name{sendmail~X}.
    3.36  
    3.37  More information can be found on the \sendmail\ homepage \citeweb{sendmail:homepage} and in the, so called, \name{Bat Book} \cite{costales97}.
    3.38  
    3.39 @@ -190,7 +190,7 @@
    3.40  
    3.41  This section does not try to provide a throughout \MTA\ comparison, because this is already done by others. Remarkable comparisons are the one by \person{Dan Shearer} \cite{shearer06} and a discussion on the mailing list \name{plug@lists.q-linux.com} \cite{plug:mtas}. Tabular overviews may be found at \citeweb{mailsoftware42}, \citeweb{wikipedia:comparison-of-mail-servers}, and \cite[section 1.9]{lifewithqmail}.
    3.42  
    3.43 -Here provided is an overview on important properties of the four previously introduced \MTA{}s. The data comes from the above stated sources and is collected in table \ref{tab:mta-comparison}\footnote{The lines of code were measured with \person{David~A.\ Wheeler}'s \name{sloccount} \citeweb{sloccount}.}.
    3.44 +Here provided is an overview on important properties of the four previously introduced \MTA{}s. The data comes from the above stated sources and is collected in table~\ref{tab:mta-comparison}\footnote{The lines of code were measured with \person{David~A.\ Wheeler}'s \name{sloccount} \citeweb{sloccount}.}.
    3.45  
    3.46  \begin{table}
    3.47  	\begin{center}
    3.48 @@ -203,7 +203,7 @@
    3.49  
    3.50  \subsubsection*{Architecture}
    3.51  
    3.52 -Architecture is most important when comparing \MTA{}s. Many other properties of a program depend on its architecture. \person{Munawar Hafiz} discusses in detail on \MTA\ architecture, comparing \sendmail, \qmail, \postfix, and \name{sendmail X} \cite{hafiz05}. \person{Jonathan de Boyne Pollard}'s \MTA\ review \cite{jdebp} is a source too.
    3.53 +Architecture is most important when comparing \MTA{}s. Many other properties of a program depend on its architecture. \person{Munawar Hafiz} discusses in detail on \MTA\ architecture, comparing \sendmail, \qmail, \postfix, and \name{sendmail~X} \cite{hafiz05}. \person{Jonathan de Boyne Pollard}'s \MTA\ review \cite{jdebp} is a source too.
    3.54  
    3.55  Two different architecture types show off: monolithic and modular \MTA{}s.
    3.56  
    3.57 @@ -211,7 +211,7 @@
    3.58  
    3.59  Modular \MTA{}s are \NAME{MMDF}, \qmail, \postfix, and \name{MeTA1}. They consist of several programs, each doing only a part of the overall job. The different programs run with the least permissions they need, \emph{setuid root} can be avoided completely.
    3.60  
    3.61 -The architecture does not directly define the program's security, but ``[t]he goal of making a software secure can be better achieved by making the design simple and easier to understand and verify'' \cite[chapter 6]{hafiz05}. \exim, though being monolithic, has a fairly clean security record. But it is very hard to keep the security up as the program growth. \person{Wietse Venema} (the author of \postfix) says, it was the architecture that enabled \postfix\ to grow without running into security problems \cite[page 13]{venema:postfix-growth}.
    3.62 +The architecture does not directly define the program's security, but ``[t]he goal of making a software secure can be better achieved by making the design simple and easier to understand and verify'' \cite[chapter~6]{hafiz05}. \exim, though being monolithic, has a fairly clean security record. But it is very hard to keep the security up as the program growth. \person{Wietse Venema} (the author of \postfix) says, it was the architecture that enabled \postfix\ to grow without running into security problems \cite[page 13]{venema:postfix-growth}.
    3.63  
    3.64  The modular design, with each sub-program doing one part of the overall job, conforms to the \name{Unix Philosophy}. The Unix Philosophy \cite{gancarz95} demands ``small is beautiful'' and ``make each program do one thing well''. Monolithic \MTA{}s fail here.
    3.65  
    3.66 @@ -227,7 +227,7 @@
    3.67  
    3.68  \subsubsection*{Future trends}
    3.69  
    3.70 -In chapter \ref{chap:market-analysis}, it was tried to figure out trends and future requirements for \MTA{}s. The four programs are compared on these possible future requirements now.
    3.71 +In chapter~\ref{chap:market-analysis}, it was tried to figure out trends and future requirements for \MTA{}s. The four programs are compared on these possible future requirements now.
    3.72  
    3.73  \paragraph{Provider independence}
    3.74  The first trend was provider independence, which requires easy configuration. \postfix\ seems to do best here. It uses primary two configuration files (\path{master.cf} and \path{main.cf}) which are easy to manage. \sendmail\ appears to have a bad position. Its configuration file \path{sendmail.cf} is cryptic and very complex (it has legendary Turing-completeness) thus it needs simplification wrappers around it to provide easier configuration. They exist in form of the \name{m4} macros that generate the \path{sendmail.cf} file. Unfortunately, adjusting the generated result by hand appears to be necessary for non-trivial configurations. \qmail's configuration files are simple but the whole system is complex to set up; it requires various system users and \qmail\ is hardly usable without applying several patches that add functionality which is required nowadays. \name{netqmail} is the community's effort to help in the latter point. \exim\ has only one single configuration file (\path{exim.conf}) which suffers most from its flexibility---like in \sendmail's case. Flexibility and easy configuration are almost always contrary goals.
     4.1 --- a/thesis/tex/4-MasqmailsFuture.tex	Tue Feb 03 17:53:03 2009 +0100
     4.2 +++ b/thesis/tex/4-MasqmailsFuture.tex	Tue Feb 03 18:01:33 2009 +0100
     4.3 @@ -42,10 +42,10 @@
     4.4  \label{rf1}
     4.5  \sendmail-compatible \MTA{}s must support at least two incoming channels: mail submitted using the \sendmail\ command, and mail received on a \NAME{TCP} port. Thus it is common to split the incoming channels into local and remote. This is done by \qmail\ and \postfix. The same way is \person{Hafiz}'s view \cite{hafiz05}.
     4.6  
     4.7 -\SMTP\ is the primary mail transport protocol today, but with the increasing need for new protocols (see section \ref{sec:what-will-be-important}) in mind, support for more than just \SMTP\ is good to have. New protocols will show up, maybe multiple protocols need to be supported then. This leads to multiple remote channels, one for each supported protocol as it was done in other \MTA{}s. Best would be interfaces to add further protocols as modules.
     4.8 +\SMTP\ is the primary mail transport protocol today, but with the increasing need for new protocols (see section~\ref{sec:what-will-be-important}) in mind, support for more than just \SMTP\ is good to have. New protocols will show up, maybe multiple protocols need to be supported then. This leads to multiple remote channels, one for each supported protocol as it was done in other \MTA{}s. Best would be interfaces to add further protocols as modules.
     4.9  
    4.10  
    4.11 -Outgoing mail is commonly either sent using \SMTP, piped into local commands (for example \path{uucp}), or delivered locally by appending to a mailbox. Outgoing channels are similar for \qmail, \postfix, and \name{sendmail X}: All of them have a module to send mail using \SMTP, and one for writing into a local mailbox.
    4.12 +Outgoing mail is commonly either sent using \SMTP, piped into local commands (for example \path{uucp}), or delivered locally by appending to a mailbox. Outgoing channels are similar for \qmail, \postfix, and \name{sendmail~X}: All of them have a module to send mail using \SMTP, and one for writing into a local mailbox.
    4.13  
    4.14  %fixme: is the def of MTA: transfer between machines, or transfer between users?
    4.15  Local mail delivery is a job that uses root privilege to be able to switch to any user in order to write to his mailbox. It is possible to deliver without being root privilege, but delivery to user's home folders is not generally possible then. Thus even the modular \MTA{}s \qmail\ and \postfix\ use root privilege for it. As mail delivery to local users is \emph{not} included in the basic job of an \MTA{} and introduces a lot of new complexity, why should the \MTA\ bother? In order to keep the system simple, reduce privilege, and to have programs that do one job well, the local delivery job should be handed over to a specialist: the \NAME{MDA}. \NAME{MDA}s know about the various mailbox formats and are aware of the problems of concurrent write access and the like. Hence passing the message, and the responsibility for it, over to an \NAME{MDA} seems to be best.
    4.16 @@ -60,7 +60,7 @@
    4.17  	\label{fig:mta-channels}
    4.18  \end{figure}
    4.19  
    4.20 -An overview on in and outgoing channels required for an \MTA, gives figure \ref{fig:mta-channels}.
    4.21 +An overview on in and outgoing channels required for an \MTA, gives figure~\ref{fig:mta-channels}.
    4.22  
    4.23  %fixme: write about submission (port 587)
    4.24  
    4.25 @@ -94,7 +94,7 @@
    4.26  
    4.27  \paragraph{\RF5: Route management}
    4.28  \label{rf5}
    4.29 -One key feature of \masqmail\ is its ability to send mail out over different routes. The online state defines the active route to be used. A specific route may not be suited for all messages, thus these messages are hold back until a suiting route is active. For more information on this concept see section \ref{sec:masqmail-routes}.
    4.30 +One key feature of \masqmail\ is its ability to send mail out over different routes. The online state defines the active route to be used. A specific route may not be suited for all messages, thus these messages are hold back until a suiting route is active. For more information on this concept see section~\ref{sec:masqmail-routes}.
    4.31  
    4.32  
    4.33  
    4.34 @@ -131,7 +131,7 @@
    4.35  
    4.36  The common way to encrypt \SMTP\ dialogs is using \name{Transport Layer Security} (short: \TLS, the successor of \NAME{SSL}). \TLS\ encrypts the datagrams of the \name{transport layer}. This means it works below the application protocols and can be used with any of them \citeweb{wikipedia:tls}.
    4.37  
    4.38 -Using secure tunnels that are provided by external programs, should be preferred over including encryption into the application, because the application needs not to bother with encryption then. Outgoing \SMTP\ connections can get encrypted using a secure tunnel, created by an external application (like \name{openssl}). But incoming connections can not use external secure tunnels, because the remote \NAME{IP} address is hidden then; all connections would appear to come from localhost instead. Figure \ref{fig:stunnel} depicts the situation of using an application like \name{stunnel} for incoming connections. The connection to port 25 comes from localhost and this information reaches the \MTA. Authentication based on \NAME{IP} addresses and many spam prevention methods are useless then.
    4.39 +Using secure tunnels that are provided by external programs, should be preferred over including encryption into the application, because the application needs not to bother with encryption then. Outgoing \SMTP\ connections can get encrypted using a secure tunnel, created by an external application (like \name{openssl}). But incoming connections can not use external secure tunnels, because the remote \NAME{IP} address is hidden then; all connections would appear to come from localhost instead. Figure~\ref{fig:stunnel} depicts the situation of using an application like \name{stunnel} for incoming connections. The connection to port 25 comes from localhost and this information reaches the \MTA. Authentication based on \NAME{IP} addresses and many spam prevention methods are useless then.
    4.40  
    4.41  \begin{figure}
    4.42  	\begin{center}
    4.43 @@ -149,7 +149,7 @@
    4.44  
    4.45  \paragraph{\RF8: Spam handling}
    4.46  \label{rf8}
    4.47 -Spam is a major threat nowadays, but it is a war that is hard to win. The goal is to provide state-of-the-art spam protection, but not more (see section \ref{sec:swot-analysis}).
    4.48 +Spam is a major threat nowadays, but it is a war that is hard to win. The goal is to provide state-of-the-art spam protection, but not more (see section~\ref{sec:swot-analysis}).
    4.49  
    4.50  As spam is, by increasing the amount of mail messages, not just a nuisance for end users, but also for the infrastructure---the \MTA{}s---they need to protect themselves.
    4.51  
    4.52 @@ -171,7 +171,7 @@
    4.53  
    4.54  In any way should malware checking be performed by external programs that may be invoked by the \MTA. But \NAME{MDA}s are better points to invoke content scanners.
    4.55  
    4.56 -A popular email filter framework is \name{amavis} which integrates various spam and malware scanners. The common setup includes a receiving \MTA\ which sends it to \name{amavis} using \SMTP, \name{amavis} processes the mail and sends it then to a second \MTA\ that does the outgoing transfer. Having interfaces to such scanners is nice to have, though. (This setup with two \MTA\ instances is discussed in more detail in section \ref{sec:current-code-security}).
    4.57 +A popular email filter framework is \name{amavis} which integrates various spam and malware scanners. The common setup includes a receiving \MTA\ which sends it to \name{amavis} using \SMTP, \name{amavis} processes the mail and sends it then to a second \MTA\ that does the outgoing transfer. Having interfaces to such scanners is nice to have, though. (This setup with two \MTA\ instances is discussed in more detail in section~\ref{sec:current-code-security}).
    4.58  
    4.59  
    4.60  
    4.61 @@ -195,7 +195,7 @@
    4.62  
    4.63  
    4.64  \paragraph{\RG1: Security}
    4.65 -\MTA{}s are critical points for computer security, as they are accessible from external networks. They must be secured with high effort. Properties like the need for high privilege level, from outside influenced work load, work on unsafe data, and demand for reliability, increase the need for security. This is best done by modularization, also called \name{compartmentalization}, as described in section \ref{sec:discussion-mta-arch}.
    4.66 +\MTA{}s are critical points for computer security, as they are accessible from external networks. They must be secured with high effort. Properties like the need for high privilege level, from outside influenced work load, work on unsafe data, and demand for reliability, increase the need for security. This is best done by modularization, also called \name{compartmentalization}, as described in section~\ref{sec:discussion-mta-arch}.
    4.67  
    4.68  \masqmail\ needs to be secure enough for its target field of operation. \masqmail\ is targeted to workstations and private networks, with explicit warning to not use it on permanent online hosts \citeweb{masqmail:homepage2}. But as non-permanent online connections and trustable environments become rare, \masqmail's security should be so good, that it is usable with permanent online connections and in unsafe environments. For example should mails with bad content not break \masqmail.
    4.69  
    4.70 @@ -256,7 +256,7 @@
    4.71  \sendmail\ provides now, with its \name{milter} interface, standardized connection channels to external modules.
    4.72  \masqmail\ has none of them; it is what \sendmail\ was in the beginning: a single large block.
    4.73  
    4.74 -Figure \ref{fig:masqmail-arch} is a call graph generated from \masqmail's source code, excluding logging functions. It gives a impression of how interweaved the internals are. There are no compartments existent.
    4.75 +Figure~\ref{fig:masqmail-arch} is a call graph generated from \masqmail's source code, excluding logging functions. It gives a impression of how interweaved the internals are. There are no compartments existent.
    4.76  
    4.77  \begin{figure}
    4.78  	\begin{center}
    4.79 @@ -269,7 +269,7 @@
    4.80  	\label{fig:masqmail-arch}
    4.81  \end{figure}
    4.82  
    4.83 -\sendmail\ improved its old architecture by adding the milter interface, to include further functionality by invoking external programs. \exim\ was designed, and is carefully maintained, with a modular-like code structure in mind. \qmail\ started from scratch with a ``security-first'' approach, \postfix\ improved on it, and \name{sendmail X}/\name{MeTA1} tries to adopt the best of \qmail\ and \postfix\ to completely replace the old \sendmail\ architecture. \person{Hafiz} describes this evolution of \MTA\ architecture very well \cite{hafiz05}.
    4.84 +\sendmail\ improved its old architecture by adding the milter interface, to include further functionality by invoking external programs. \exim\ was designed, and is carefully maintained, with a modular-like code structure in mind. \qmail\ started from scratch with a ``security-first'' approach, \postfix\ improved on it, and \name{sendmail~X}/\name{MeTA1} tries to adopt the best of \qmail\ and \postfix\ to completely replace the old \sendmail\ architecture. \person{Hafiz} describes this evolution of \MTA\ architecture very well \cite{hafiz05}.
    4.85  
    4.86  Every one of these programs is more modular, or became more modular over time, than \masqmail\ is. Modern requirements like spam protection and future requirements like---probably---the use of new mail transport protocols demand for modular designs in order to keep the software simple. Simplicity is a key property for security. ``the essence of security engineering is to build systems that are as simple as possible.'' \cite[page 45]{graff03}.
    4.87  
    4.88 @@ -303,7 +303,7 @@
    4.89  
    4.90  
    4.91  \paragraph{\RF1: In/out channels}
    4.92 -The incoming and outgoing channels that \masqmail\ already has (depicted in figure \ref{fig:masqmail-channels} on page \pageref{fig:masqmail-channels}) are the ones required for an \MTA{}s at the moment. Support for other protocols seems not to be necessary at the moment, although new protocols and mailing concepts are likely to appear (see section \ref{sec:email-trends}). Today, other protocols are not needed, so \masqmail\ is regarded to fulfill \RF1. But as \masqmail\ has no support for adding further protocols, delaying the work to support them until they are widely used, appears to be the best strategy anyway.
    4.93 +The incoming and outgoing channels that \masqmail\ already has (depicted in figure~\ref{fig:masqmail-channels} on page \pageref{fig:masqmail-channels}) are the ones required for an \MTA{}s at the moment. Support for other protocols seems not to be necessary at the moment, although new protocols and mailing concepts are likely to appear (see section~\ref{sec:email-trends}). Today, other protocols are not needed, so \masqmail\ is regarded to fulfill \RF1. But as \masqmail\ has no support for adding further protocols, delaying the work to support them until they are widely used, appears to be the best strategy anyway.
    4.94  
    4.95  %fixme: << smtp submission >> %fixme
    4.96  
    4.97 @@ -323,7 +323,7 @@
    4.98  Static authentication, based on \NAME{IP} addresses, can be achieved with \person{Venema}'s \NAME{TCP} \name{Wrapper} \cite{venema92}, by editing the \path{hosts.allow} and \path{hosts.deny} files. This is only relevant to authenticate host that try to submit mail into the system. Dynamic (secret-based) \SMTP\ authentication is already supported in form of \NAME{SMTP-AUTH} and \SMTP-after-\NAME{POP}, but only for outgoing connections. For incoming connections, only address-based authentication is supported.
    4.99  
   4.100  \paragraph{\RF7: Encryption}
   4.101 -Similar is the situation for encryption which is also only available for outgoing channels; here a wrapper application like \name{openssl} is needed. This creates a secure tunnel to send mail trough, but state-of-the-art is using \NAME{STARTTLS}, which is not supported. For incoming channels, no encryption is available. The only possible setup to provide encryption of incoming channels is using an application like \name{stunnel} to translate between the secure connection to the remote host and the \MTA. Unfortunately, this suffers from the problem explained on page \pageref{fig:stunnel} in figure \ref{fig:stunnel}. Anyway, this would still be no \NAME{STARTTLS} support.
   4.102 +Similar is the situation for encryption which is also only available for outgoing channels; here a wrapper application like \name{openssl} is needed. This creates a secure tunnel to send mail trough, but state-of-the-art is using \NAME{STARTTLS}, which is not supported. For incoming channels, no encryption is available. The only possible setup to provide encryption of incoming channels is using an application like \name{stunnel} to translate between the secure connection to the remote host and the \MTA. Unfortunately, this suffers from the problem explained on page \pageref{fig:stunnel} in figure~\ref{fig:stunnel}. Anyway, this would still be no \NAME{STARTTLS} support.
   4.103  
   4.104  \paragraph{\RF8: Spam handling}
   4.105  \masqmail\ nowadays does not provide special support for spam filtering. Spam prevention by not accepting spam during the \SMTP\ dialog is not possible at all. Spam filtering is only possible by using two \masqmail\ instances with an external spam filter in between. The mail flow is from the receiving \MTA\ instance, which accepts mail, to the filter application that processes and possible modifies it, to the second \MTA\ which is responsible for further delivery of the mail. This is a concept that works in general. And it is a good concept in principle to separate work with clear interfaces. But the need of two instances of the same \MTA (each for only half of the job) with doubled setup, is more a work-around. Best is to have this data flow respected in the \MTA\ design, like in \postfix. But the more important part of spam handling, for sure, is done during the \SMTP\ dialog in completely refusing unwanted mail.
   4.106 @@ -389,7 +389,7 @@
   4.107  
   4.108  \section{Work to do}
   4.109  
   4.110 -After the requirements for modern \MTA{}s were identified in section \ref{sec:mta-requirements} and \masqmail's features were set against them in section \ref{sec:fulfilled-requirements}, here the work that is left to do is identified. Table \ref{tab:requirements} lists all requirements with importance and the work needed to achieve them. The column ``Focus'' shows the attention a work task should get. The focus depends on the task's importance and the amount of work it includes.
   4.111 +After the requirements for modern \MTA{}s were identified in section~\ref{sec:mta-requirements} and \masqmail's features were set against them in section~\ref{sec:fulfilled-requirements}, here the work that is left to do is identified. Table~\ref{tab:requirements} lists all requirements with importance and the work needed to achieve them. The column ``Focus'' shows the attention a work task should get. The focus depends on the task's importance and the amount of work it includes.
   4.112  
   4.113  \begin{table}
   4.114  	\begin{center}
   4.115 @@ -415,7 +415,7 @@
   4.116  
   4.117  
   4.118  \subsubsection*{\TODO3: Security (\RG1)}
   4.119 -\masqmail's security is bad, thus the program is forced into a limited field of operation. This field of operation even shrinks as security becomes more important and networking and interaction increases. Save and trusted environment become rare. Thus improving security is an important thing to do. The focus should be on adding compartments to split \masqmail\ into separate modules. (See section \ref{sec:discussion-mta-arch}.) Further more should \masqmail's security be tested throughout to get a definitive view how good it really is and where the weak spots are.
   4.120 +\masqmail's security is bad, thus the program is forced into a limited field of operation. This field of operation even shrinks as security becomes more important and networking and interaction increases. Save and trusted environment become rare. Thus improving security is an important thing to do. The focus should be on adding compartments to split \masqmail\ into separate modules. (See section~\ref{sec:discussion-mta-arch}.) Further more should \masqmail's security be tested throughout to get a definitive view how good it really is and where the weak spots are.
   4.121  
   4.122  
   4.123  \subsubsection*{\TODO4: Reliability (\RG2)}
   4.124 @@ -457,7 +457,7 @@
   4.125  
   4.126  The requirements are now regarded each on its own, and are linked to the development strategy that is preferred to reach each specific requirement. If some requirement is well achievable by using different strategies then it is linked to all of them. Implementing encryption (\TODO1) and authentication (\TODO2), for example, are limited to a narrow region in the code. Such features are addable to the current code base without much problem. In contrast can quality properties like reliability (\TODO4), extendability (\TODO6), and maintainability hardly be added to code afterwards---if at all. Security (\TODO3) is addable in a new design, of course, but also with wrappers or interposition filters.
   4.127  
   4.128 -This linking of strategies to the requirements is shown in table \ref{tab:strategies}. The requirements are ordered by their focus.
   4.129 +This linking of strategies to the requirements is shown in table~\ref{tab:strategies}. The requirements are ordered by their focus.
   4.130  
   4.131  \begin{table}
   4.132  	\begin{center}
   4.133 @@ -487,7 +487,7 @@
   4.134  
   4.135  \subsubsection*{Quality improvements}
   4.136  
   4.137 -Most quality properties can hardly be added to a software afterwards. Hence, if reliability, extendability, or maintainability shall be improved, a redesign of \masqmail\ is the best way to take. The wish to improve quality inevitably point towards a modular architecture. Modularity with internal and external interfaces is highly preferred from the architectural point of view (see section \ref{sec:discussion-mta-arch}). The need for further features, especially ones that require changes in \masqmail's structure, support the decision for a new design too. Hence a rewrite is favored if \masqmail\ should become a modern \MTA, with good quality properties.
   4.138 +Most quality properties can hardly be added to a software afterwards. Hence, if reliability, extendability, or maintainability shall be improved, a redesign of \masqmail\ is the best way to take. The wish to improve quality inevitably point towards a modular architecture. Modularity with internal and external interfaces is highly preferred from the architectural point of view (see section~\ref{sec:discussion-mta-arch}). The need for further features, especially ones that require changes in \masqmail's structure, support the decision for a new design too. Hence a rewrite is favored if \masqmail\ should become a modern \MTA, with good quality properties.
   4.139  
   4.140  
   4.141  
   4.142 @@ -552,7 +552,7 @@
   4.143  
   4.144  Besides these advantages of existing code, one must not forget that further work on it is often repair work. Small bug fixes are not the problem, but adding something for which the software originally was not designed for are problems. Such work often destroys the clear concepts of the software, especially in interweaved monolithic code.
   4.145  
   4.146 -Repair strategies are useful, but only in the short-time view and in times of trouble. If the future is bright, however, one does best by investing into a software. As shown in section \ref{sec:market-analysis-conclusion}, the future for \MTA{}s is bright. This means it is time to invest into a redesigning to build up a more modern product.
   4.147 +Repair strategies are useful, but only in the short-time view and in times of trouble. If the future is bright, however, one does best by investing into a software. As shown in section~\ref{sec:market-analysis-conclusion}, the future for \MTA{}s is bright. This means it is time to invest into a redesigning to build up a more modern product.
   4.148  
   4.149  In the author's view is \masqmail\ already needing a redesign since about 2003 when the old design was still quite suitable \dots\ it already delayed too long.
   4.150  
   4.151 @@ -568,7 +568,7 @@
   4.152  
   4.153  A new design does protect against such dead ends.
   4.154  
   4.155 -Changing requirements are one possible dead end if the software does not evolve with them. A famous example is \sendmail, which had an almost monopoly for a long time. But when security became important \sendmail\ was only repaired instead of removing the problem sources---its insecure design. Thus security problems reappeared and over the years \sendmail's market share shrank as more secure \MTA{}s became available. \sendmail's reaction to the new requirements, in form of \name{sendmail X} and \name{MeTA1}, came much to late---the users already switched to other \MTA{}s. Redesigning a software as requirements change helps keeping it alive. % fixme: add quote: ``one thing surely remains: change'' (something like that)
   4.156 +Changing requirements are one possible dead end if the software does not evolve with them. A famous example is \sendmail, which had an almost monopoly for a long time. But when security became important \sendmail\ was only repaired instead of removing the problem sources---its insecure design. Thus security problems reappeared and over the years \sendmail's market share shrank as more secure \MTA{}s became available. \sendmail's reaction to the new requirements, in form of \name{sendmail~X} and \name{MeTA1}, came much to late---the users already switched to other \MTA{}s. Redesigning a software as requirements change helps keeping it alive. % fixme: add quote: ``one thing surely remains: change'' (something like that)
   4.157  
   4.158  Another danger is the dead end of complexity which is likely to appear by constantly working on the same code base. It is even more likely if the code base has a monolithic architecture. A good example for simplicity is \qmail\ which consists of small independent modules, each with only about one thousand lines of code. Such simple code makes it obvious to understand what it does. The \name{suckless} project \citeweb{suckless.org} for example advertises such a philosophy of small and simple software by following the thoughts of the \unix\ inventors \cite{kernighan84} \cite{kernighan99}. Simple, small, and clear code avoids complexity and is thus also a strong prerequisite for security.
   4.159  
   4.160 @@ -687,5 +687,5 @@
   4.161  
   4.162  %A program's structure is primary its architecture. Which is the most influencing design decision, and has the greatest impact on the program's future capabilities. The architecture defines what the program can do, and how it can be used. If the architecture does not fit to the requirements, development will reach a dead end \dots\ further work then will make everything worse. The only good solution then is to change the architecture, which, sadly but most likely, means a redesign from scratch.
   4.163  
   4.164 -%This plan is similar to the change from \sendmail\ to \name{sendmail X}/\name{MeTA1}, except the \sendmail\ change was much too late.
   4.165 +%This plan is similar to the change from \sendmail\ to \name{sendmail~X}/\name{MeTA1}, except the \sendmail\ change was much too late.
   4.166  
     5.1 --- a/thesis/tex/5-Improvements.tex	Tue Feb 03 17:53:03 2009 +0100
     5.2 +++ b/thesis/tex/5-Improvements.tex	Tue Feb 03 18:01:33 2009 +0100
     5.3 @@ -92,11 +92,11 @@
     5.4  \subsection{Security}
     5.5  \label{sec:current-code-security}
     5.6  
     5.7 -Improvements to \masqmail's security are an important requirement and are the third task to work on. Retrofitting security \emph{into} \masqmail\ is not or hardly possible as it was explained in section \ref{sec:discussion-further-devel}. But adding wrappers and interposition filters can be a large step towards security.
     5.8 +Improvements to \masqmail's security are an important requirement and are the third task to work on. Retrofitting security \emph{into} \masqmail\ is not or hardly possible as it was explained in section~\ref{sec:discussion-further-devel}. But adding wrappers and interposition filters can be a large step towards security.
     5.9  
    5.10  \subsubsection*{Mail security layers}
    5.11  
    5.12 -At first mail security layers like \name{smap} come to mind. The market share analysis in section \ref{sec:market-share} identified such software. This is an interposition filter that stands between the untrusted network and the \MTA. It accepts mail in replacement for the \MTA\ (also called \name{proxy}) in order to separate the \MTA\ from the untrusted network.
    5.13 +At first mail security layers like \name{smap} come to mind. The market share analysis in section~\ref{sec:market-share} identified such software. This is an interposition filter that stands between the untrusted network and the \MTA. It accepts mail in replacement for the \MTA\ (also called \name{proxy}) in order to separate the \MTA\ from the untrusted network.
    5.14  
    5.15  The work \name{smap} does is described in \cite{cabral01}: \name{smap} accepts messages as proxy for the \MTA\ and puts it into a queue. \name{smapd} a brother program runs as daemon and watches for new messages in the queue which it submits into the \MTA\ then.
    5.16  
    5.17 @@ -108,12 +108,12 @@
    5.18  
    5.19  Mail from outside would then come through the proxy into the system. Mail from the local host and from the local network could be directly accepted by the normal \masqmail, if those locations are considered trusted. But it seems better to have them use the proxy too, or maybe a second proxy instance with different policy.
    5.20  
    5.21 -The here described setup comes close to the structure of the incoming channels in the new design which is described in \ref{sec:new-design}. This shows the possibilities of the here chosen approach. %fixme: rethink this sentence
    5.22 +The here described setup comes close to the structure of the incoming channels in the new design which is described in section~\ref{sec:new-design}. This shows the possibilities of the here chosen approach. %fixme: rethink this sentence
    5.23  
    5.24  
    5.25  \subsubsection*{A concrete setup}
    5.26  
    5.27 -A stripped down proxy needs to be created. It should only be able to receive mail via \SMTP, encrypt the communication, authenticate clients, and send mail out via \SMTP\ to an internal socket (named ``X'' in the figure). This is a straight forward task. The normal \masqmail\ instance runs on the system too. It takes input from \name{stdin} (by calling the \path{sendmail} command) and via \SMTP\ where it listens on an internal socket (named ``X'' in the figure). Outgoing mail is handled without difference to a regular setup. Figure \ref{fig:proxy-setup} depicts the setup.
    5.28 +A stripped down proxy needs to be created. It should only be able to receive mail via \SMTP, encrypt the communication, authenticate clients, and send mail out via \SMTP\ to an internal socket (named ``X'' in the figure). This is a straight forward task. The normal \masqmail\ instance runs on the system too. It takes input from \name{stdin} (by calling the \path{sendmail} command) and via \SMTP\ where it listens on an internal socket (named ``X'' in the figure). Outgoing mail is handled without difference to a regular setup. Figure~\ref{fig:proxy-setup} depicts the setup.
    5.29  
    5.30  \begin{figure}
    5.31  	\begin{center}
    5.32 @@ -155,7 +155,7 @@
    5.33  
    5.34  \subsection{Design decisions}
    5.35  
    5.36 -This section describes and discusses architectural decision that were made for the new design. To functional requirements is in most times only refered as they were already discussed in chapter \ref{chap:present-and-future}.
    5.37 +This section describes and discusses architectural decision that were made for the new design. To functional requirements is in most times only refered as they were already discussed in chapter~\ref{chap:present-and-future}.
    5.38  
    5.39  A number of major design ideas lead the development of the new architecture:
    5.40  \begin{enumerate}
    5.41 @@ -173,7 +173,7 @@
    5.42  
    5.43  The functional requirements for incoming and outgoing channels were already discussed as \RF\,1 on page \pageref{rf1}. Two required incoming channels were identified: the \path{sendmail} command for local mail submission and the \SMTP\ daemon for remote connections.
    5.44  
    5.45 -A bit different is the structure of \name{sendmail X} at that point: Locally submitted messages go to the \SMTP\ daemon, which is the only connection towards the mail queue. %fixme: is it a smtp dialog? or a back door?
    5.46 +A bit different is the structure of \name{sendmail~X} at that point: Locally submitted messages go to the \SMTP\ daemon, which is the only connection towards the mail queue. %fixme: is it a smtp dialog? or a back door?
    5.47  \person{Finch} proposes a similar approach \cite{finch-sendmail}. He wants the \texttt{sendmail} command to be a simple \SMTP\ client that contacts the \SMTP\ daemon of the \MTA\ like it is done by connections from remote. The advantage here is one single module where all \SMTP\ dialog with submitters is done. Hence one single point to accept or refuse incoming mail. Additionally does the module which puts mail into the queue not need to be \name{setuid} or \name{setgid} because it is only invoked from the \SMTP\ daemon. The \MTA's architecture would become simpler and common tasks are not duplicated in modules that do similar jobs.
    5.48  
    5.49  But merging the input channels in the \SMTP\ daemon makes the \MTA\ heavily dependent on \SMTP. To \qmail\ and \postfix\ new protocol handlers may be added without change in other parts of the system. Also the \SMTP\ modules can be removed if it is not needed. It is better to have more independent modules if each one is simpler then. The need to implement an \SMTP\ client in each one makes the modules more complicated.
    5.50 @@ -190,9 +190,9 @@
    5.51  
    5.52  Outgoing mail is commonly either sent using \SMTP, piped into local commands (for example \path{uucp}), or delivered locally by appending to a mailbox.
    5.53  
    5.54 -Outgoing channels are similar for \qmail, \postfix, and \name{sendmail X}: All of them have a module to send mail using \SMTP\ and one for writing into a local mailbox. Local mail delivery is a job that should have root privilege to be able to switch to any user in order to write to his mailbox. Modular \MTA{}s do not require \name{setuid root} but the local delivery process (or its parent) should run as root. root privilege is not a mandatory requirement but any other approach has some disadvantages thus commonly root privilege is used.
    5.55 +Outgoing channels are similar for \qmail, \postfix, and \name{sendmail~X}: All of them have a module to send mail using \SMTP\ and one for writing into a local mailbox. Local mail delivery is a job that should have root privilege to be able to switch to any user in order to write to his mailbox. Modular \MTA{}s do not require \name{setuid root} but the local delivery process (or its parent) should run as root. root privilege is not a mandatory requirement but any other approach has some disadvantages thus commonly root privilege is used.
    5.56  
    5.57 -Local mail delivery should not be done by the \MTA, but by an \NAME{MDA} instead. This decision was discussed in section \ref{sec:functional-requirements}. This means only an outgoing channel that pipes mail into a local command is required for local delivery.
    5.58 +Local mail delivery should not be done by the \MTA, but by an \NAME{MDA} instead. This decision was discussed in section~\ref{sec:functional-requirements}. This means only an outgoing channel that pipes mail into a local command is required for local delivery.
    5.59  
    5.60  Other outgoing channels, one for each supported protocol, should be designed like it was done in other \MTA{}s.
    5.61  
    5.62 @@ -279,7 +279,7 @@
    5.63  
    5.64  \subsubsection*{Spam and malware handling}
    5.65  
    5.66 -The two approaches for spam handling were already presented to the reader in section \ref{sec:functional-requirements} as \RF\,8 and \RF\,9. Here they are described in more detail:
    5.67 +The two approaches for spam handling were already presented to the reader in section~\ref{sec:functional-requirements} as \RF\,8 and \RF\,9. Here they are described in more detail:
    5.68  
    5.69  \begin{enumerate}
    5.70  \item Refusing spam during the \SMTP\ dialog. This is the way it was meant by the designers of the \SMTP\ protocol. They thought checking the sender and recipient mail addresses would be enough, but as they are forgeable it is not. More and more complex checks need to be done. Checking needs time, but \SMTP\ dialogs time out if it takes too long. Thus only limited time during the \SMTP\ dialog can be used for checking if a message seems to be spam. The advantage is that bad messages can simply get refused---no responsibility for the message is taken and no further system load is added. See \RFC\,2505 (especially section 1.5) for detail.
    5.71 @@ -321,7 +321,7 @@
    5.72  
    5.73  \subsection{The resulting architecture}
    5.74  
    5.75 -The result is a symmetric design, featuring the following parts: Any number of handlers for incoming connections to receive mail. A module that stores the received mail into a first queue. A central scanning module take mail from the first queue, processes it in various ways, and puts it afterwards into a second queue. A module that takes it out of the second queue and passes it to a matching transport module. A set of transport modules that transfers the message to the destination. In other words three main modules (\name{queue-in}, \name{scanning}, \name{queue-out}) are connected by two queues (\name{incoming}, \name{outgoing}). On each end is a set of modules to receive or send mail---one for each protocol. The \name{pool} is part of the queue; it is the place where the bodies of the queued messages are stored. Figure \ref{fig:masqmail-arch-new} depicts the new designed architecture.
    5.76 +The result is a symmetric design, featuring the following parts: Any number of handlers for incoming connections to receive mail. A module that stores the received mail into a first queue. A central scanning module take mail from the first queue, processes it in various ways, and puts it afterwards into a second queue. A module that takes it out of the second queue and passes it to a matching transport module. A set of transport modules that transfers the message to the destination. In other words three main modules (\name{queue-in}, \name{scanning}, \name{queue-out}) are connected by two queues (\name{incoming}, \name{outgoing}). On each end is a set of modules to receive or send mail---one for each protocol. The \name{pool} is part of the queue; it is the place where the bodies of the queued messages are stored. Figure~\ref{fig:masqmail-arch-new} depicts the new designed architecture.
    5.77  
    5.78  \begin{figure}
    5.79  	\begin{center}
    5.80 @@ -331,7 +331,7 @@
    5.81  	\label{fig:masqmail-arch-new}
    5.82  \end{figure}
    5.83  
    5.84 -This architecture is heavily influenced by the ones of \qmail\ and \postfix. Both have different incoming channels that merge in the module that puts mail into the queue; central is the queue (or more of them); and one module takes mail from the queue and passes it to one of the outgoing channels. Mail processing is built into the architecture in a more explicit way than it was done in \qmail\ and \postfix. It is more similar to the \NAME{AR} module of \name{sendmail X}, which is the central point for spam checking.
    5.85 +This architecture is heavily influenced by the ones of \qmail\ and \postfix. Both have different incoming channels that merge in the module that puts mail into the queue; central is the queue (or more of them); and one module takes mail from the queue and passes it to one of the outgoing channels. Mail processing is built into the architecture in a more explicit way than it was done in \qmail\ and \postfix. It is more similar to the \NAME{AR} module of \name{sendmail~X}, which is the central point for spam checking.
    5.86  
    5.87  Special regard was put on addable support for further mail transfer protocols. This appears to be most similar to \qmail, which was designed to handle multiple protocols.
    5.88  
    5.89 @@ -352,7 +352,7 @@
    5.90  
    5.91  \name{Receiver modules} are the communication interface between external senders and the \name{queue-in} module. Each protocol needs a corresponding \name{receiver module} to be supported. Most popular is the \name{sendmail} module which is a command to be called from the local host and the \name{smtpd} module which usually listens on port 25. Other modules to support other protocols may be added as needed. Receiving modules that need to listen on ports should get invoked by \name{inetd} or a more secure replacement like \person{Bernstein}'s \name{ucspi-tcp}. This makes it possible to run them with least privilege.
    5.92  
    5.93 -\name{Transport modules}, on the opposite side of the system, are the modules that send outgoing mail. They are the interface between \name{queue-out} and remote hosts or local commands for further processing. The most popular ones are the \name{smtp} module which acts as an \SMTP\ client and the \name{pipe} module to interface gateways to other systems or networks like fax and \NAME{UUCP}. A module for local delivery is not included, \masqmail\ passes this job to an \NAME{MDA} (like \name{procmail}) (see section \ref{sec:functional-requirements} for reasons). The \NAME{MDA} gets invoked through the \name{pipe} module.
    5.94 +\name{Transport modules}, on the opposite side of the system, are the modules that send outgoing mail. They are the interface between \name{queue-out} and remote hosts or local commands for further processing. The most popular ones are the \name{smtp} module which acts as an \SMTP\ client and the \name{pipe} module to interface gateways to other systems or networks like fax and \NAME{UUCP}. A module for local delivery is not included, \masqmail\ passes this job to an \NAME{MDA} (like \name{procmail}) (see section~\ref{sec:functional-requirements} for reasons). The \NAME{MDA} gets invoked through the \name{pipe} module.
    5.95  
    5.96  
    5.97  
    5.98 @@ -383,7 +383,7 @@
    5.99  
   5.100  The connections between \name{queue-in} and \name{scanning}, as well as between \name{scanning} and \name{queue-out} is provided by the queues, only sending signals to trigger runs may be useful. Communication between receiving and transport modules and the outside world are done using the specific protocol they do handle.
   5.101  
   5.102 -Left is only communication between the receiver modules and \name{queue-in}, and between \name{queue-out} and the transport modules. Data is exchanged using \unix\ pipes and a simple protocol. Figure \ref{fig:ipc-protocol} shows a state diagram for the protocol. Solid lines indicate client actions, dashed lines indicate server responses.
   5.103 +Left is only communication between the receiver modules and \name{queue-in}, and between \name{queue-out} and the transport modules. Data is exchanged using \unix\ pipes and a simple protocol. Figure~\ref{fig:ipc-protocol} shows a state diagram for the protocol. Solid lines indicate client actions, dashed lines indicate server responses.
   5.104  
   5.105  \begin{figure}
   5.106  	\begin{center}