# HG changeset patch # User meillo@marmaro.de # Date 1234004411 -3600 # Node ID 6494832a798c9db6910caa1d60bd3a460fa82bf7 # Parent b4611d4e1484f12c4704e762e333955e5dc6e320 fixed all half-spaces after RF, RG, TODO diff -r b4611d4e1484 -r 6494832a798c thesis/tbl/requirements.tbl --- a/thesis/tbl/requirements.tbl Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tbl/requirements.tbl Sat Feb 07 12:00:11 2009 +0100 @@ -2,26 +2,26 @@ \hline Requirement & Importance & Pending work & Focus \\ \hline \hline - \RF1: In/out channels & ++ & - & + \\ - \RF2: Mail queuing & ++ & - & + \\ - \RF3: Header sanitizing & 0 & - & - \\ - \RF4: Aliasing & 0 & - & - \\ - \RF5: Route management & + & - & 0 \\ - \RF6: Authentication & ++ & + & +++ \\ - \RF7: Encryption & ++ & + & +++ \\ - \RF8: Spam handling & + & ++ & +++ \\ - \RF9: Malware handling & - & + & 0 \\ - \RF10: Archiving & - & + & 0 \\ + \RF\,1: In/out channels & ++ & - & + \\ + \RF\,2: Mail queuing & ++ & - & + \\ + \RF\,3: Header sanitizing & 0 & - & - \\ + \RF\,4: Aliasing & 0 & - & - \\ + \RF\,5: Route management & + & - & 0 \\ + \RF\,6: Authentication & ++ & + & +++ \\ + \RF\,7: Encryption & ++ & + & +++ \\ + \RF\,8: Spam handling & + & ++ & +++ \\ + \RF\,9: Malware handling & - & + & 0 \\ + \RF\,10: Archiving & - & + & 0 \\ \hline - \RG1: Security & ++ & + & +++ \\ - \RG2: Reliability & ++ & + & +++ \\ - \RG3: Robustness & + & + & ++ \\ - \RG4: Extendability & + & ++ & +++ \\ - \RG5: Maintainability & + & 0 & + \\ - \RG6: Testability & 0 & 0 & 0 \\ - \RG7: Performance & -{}- & - & -{}-{}- \\ - \RG8: Availability & - & - & -{}- \\ - \RG9: Portability & - & -{}- & -{}-{}- \\ - \RG10: Usability & + & -{}- & - \\ + \RG\,1: Security & ++ & + & +++ \\ + \RG\,2: Reliability & ++ & + & +++ \\ + \RG\,3: Robustness & + & + & ++ \\ + \RG\,4: Extendability & + & ++ & +++ \\ + \RG\,5: Maintainability & + & 0 & + \\ + \RG\,6: Testability & 0 & 0 & 0 \\ + \RG\,7: Performance & -{}- & - & -{}-{}- \\ + \RG\,8: Availability & - & - & -{}- \\ + \RG\,9: Portability & - & -{}- & -{}-{}- \\ + \RG\,10: Usability & + & -{}- & - \\ \hline \end{tabular} diff -r b4611d4e1484 -r 6494832a798c thesis/tbl/strategies.tbl --- a/thesis/tbl/strategies.tbl Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tbl/strategies.tbl Sat Feb 07 12:00:11 2009 +0100 @@ -2,32 +2,32 @@ \hline Requirement & Focus & S\,1 & S\,2 & S\,3 \\ \hline \hline - \RF7: Encryption (\TODO1) & +++ & x & & \\ - \RF6: Authentication (\TODO2) & +++ & x & & \\ - \RG1: Security (\TODO3) & +++ & & x & x \\ - \RG2: Reliability (\TODO4) & +++ & & & x \\ - \RF8: Spam handling (\TODO5) & +++ & x & x & x \\ - \RG4: Extendability (\TODO6) & +++ & & & x \\ + \RF\,7: Encryption (\TODO\,1) & +++ & x & & \\ + \RF\,6: Authentication (\TODO\,2) & +++ & x & & \\ + \RG\,1: Security (\TODO\,3) & +++ & & x & x \\ + \RG\,2: Reliability (\TODO\,4) & +++ & & & x \\ + \RF\,8: Spam handling (\TODO\,5) & +++ & x & x & x \\ + \RG\,4: Extendability (\TODO\,6) & +++ & & & x \\ \hline - \RG3: Robustness & ++ & & & x \\ + \RG\,3: Robustness & ++ & & & x \\ \hline - \RF1: In/out channels & + & x & x & x \\ - \RF2: Mail queueing & + & & & x \\ - \RG5: Maintainability & + & & & x \\ + \RF\,1: In/out channels & + & x & x & x \\ + \RF\,2: Mail queueing & + & & & x \\ + \RG\,5: Maintainability & + & & & x \\ \hline - \RF5: Route management & 0 & x & & \\ - \RF9: Malware handling & 0 & x & x & x \\ - \RF10: Archiving & 0 & x & & x \\ - \RG6: Testability & 0 & & & x \\ + \RF\,5: Route management & 0 & x & & \\ + \RF\,9: Malware handling & 0 & x & x & x \\ + \RF\,10: Archiving & 0 & x & & x \\ + \RG\,6: Testability & 0 & & & x \\ \hline - \RF3: Header sanitizing & - & x & & \\ - \RF4: Aliasing & - & x & & \\ - \RG10: Usability & - & x & & \\ + \RF\,3: Header sanitizing & - & x & & \\ + \RF\,4: Aliasing & - & x & & \\ + \RG\,10: Usability & - & x & & \\ \hline - \RG8: Availability & -{}- & x & & \\ + \RG\,8: Availability & -{}- & x & & \\ \hline - \RG7: Performance & -{}-{}- & x & & \\ - \RG9: Portability & -{}-{}- & x & & \\ + \RG\,7: Performance & -{}-{}- & x & & \\ + \RG\,9: Portability & -{}-{}- & x & & \\ \hline \hline Score (Sum of `+') & 23 & 9 & 7 & 17 \\ \hline diff -r b4611d4e1484 -r 6494832a798c thesis/tex/0-preface.tex --- a/thesis/tex/0-preface.tex Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tex/0-preface.tex Sat Feb 07 12:00:11 2009 +0100 @@ -4,7 +4,7 @@ This thesis is about \masqmail, a small mail transfer agent for workstations and home networks. In October 2007 I had chosen \masqmail\ for my machines because of its small size though it was a ``real'' mail transfer agent. \masqmail\ served me well since then and I have found no reasons to change. -Unfortunately, the \masqmail\ package in \debian, which is my preferred \NAME{GNU}/Linux distribution, is unmaintained since the beginning of 2008. Unmaintained packages are likely to get dropped out of a distribution if critical bugs appear in them. Although \masqmail\ had no critical bugs, this was a situation I definitely wanted to prevent. +Unfortunately, the \masqmail\ package in \name{Debian}, which is my preferred \NAME{GNU}/Linux distribution, is unmaintained since the beginning of 2008. Unmaintained packages are likely to get dropped out of a distribution if critical bugs appear in them. Although \masqmail\ had no critical bugs, this was a situation I definitely wanted to prevent. Using my diploma thesis as a ``power-start'' for maintaining and developing \masqmail\ in the future was a great idea. As it came to my mind I knew this is the thing I \emph{wanted} to do. --- I did it! :-) @@ -20,7 +20,7 @@ This document is primary written with an audience of \masqmail\ developers and developers of other mail transfer agents in mind. But users of \masqmail\ and everyone who is interested in email systems in general may find this thesis an interesting literature, too. -However, at least basic knowledge about \unix\ and C programming is a prerequisite for chapters three, four, and five. \person{Kernighan} and \person{Pike}'s ``The \NAME{UNIX} Programming Environment'' \cite{kernighan84} is a valuable source to gain information about \unix. Programming in the C language is best learned from \person{Kernighan} and \person{Ritchie}'s ``The C Programming Language'' \cite{k&r}. +However, at least basic knowledge about Unix and C programming is a prerequisite for chapters three, four, and five. \person{Kernighan} and \person{Pike}'s ``The \NAME{UNIX} Programming Environment'' \cite{kernighan84} is a valuable source to gain information about Unix. Programming in the C language is best learned from \person{Kernighan} and \person{Ritchie}'s ``The C Programming Language'' \cite{k&r}. diff -r b4611d4e1484 -r 6494832a798c thesis/tex/1-Introduction.tex --- a/thesis/tex/1-Introduction.tex Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tex/1-Introduction.tex Sat Feb 07 12:00:11 2009 +0100 @@ -26,7 +26,7 @@ \item[\MUA{}:] \index{mua} -\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}. +\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}. \item[\MDA{}:] \index{mda} @@ -88,7 +88,7 @@ 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. -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}. +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 \name{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}. \masqmail\ is covered by the \name{General Public License}\index{gpl} (short: \NAME{GPL}) version two or any later version \cite{fsf:gpl}. This qualifies \masqmail\ as Free Software\index{free software} \cite{fsf:freesw-definition}. @@ -111,7 +111,7 @@ It is intended to cover a specific niche: non-permanent Internet connection and different \name{Internet Service Providers} (short: \NAME{ISP}s). -Although it can basically replace other \MTA{}s it is not \emph{generally} aimed to do so. The package description of \masqmail\ within \debian\ states this more clearly by changing the last sentence to:\index{debian!masqmail package} +Although it can basically replace other \MTA{}s it is not \emph{generally} aimed to do so. The package description of \masqmail\ within \name{Debian} states this more clearly by changing the last sentence to:\index{debian!masqmail package} \begin{quote} In these cases, MasqMail is a slim replacement for full-blown \MTA{}s such as sendmail, exim, qmail or postfix. @@ -364,7 +364,7 @@ Although the development on \masqmail\ has been stopped in 2003, \masqmail\ still has its users. Having users is already reason enough for further development and maintenance. This applies especially when the software covers a niche and when requirements for such software in general changed. Both is the case for \masqmail. -It is difficult to get numbers about users of Free Software because no one needs to tell anyone when he uses some software. \debian's \name{popcon} statistics \citeweb{popcon.debian} are a try to provided numbers. For January 2009, the statistics report 60 \masqmail\ installations of which 49 are in active use. If it is assumed that one third of all \debian\ users report their installed software\footnote{One third is a high guess as it means there would be only about 230 thousand \debian\ installations in total. But according to the \name{Linux Counter} \citeweb{counter.li.org} between 490 thousand and 12 million \debian\ users can be estimated.}, there would be in total around 150 active \masqmail\ installations in \debian. \name{Ubuntu} which also does \name{popcon} statistics \citeweb{popcon.ubuntu}, counts 82 installations with 13 active ones. If here also one third of all systems submit their data, 40 active installations can be added. Including a guessed amount of additional 30 installations on other \unix\ operating systems makes about 220 \masqmail\ installations in total. Of course one person may have \masqmail\ installed on more than one computer, but a total of 150 different users seems to be realistic. +It is difficult to get numbers about users of Free Software because no one needs to tell anyone when he uses some software. \name{Debian}'s \name{popcon} statistics \citeweb{popcon.debian} are a try to provided numbers. For January 2009, the statistics report 60 \masqmail\ installations of which 49 are in active use. If it is assumed that one third of all \name{Debian} users report their installed software\footnote{One third is a high guess as it means there would be only about 230 thousand \name{Debian} installations in total. But according to the \name{Linux Counter} \citeweb{counter.li.org} between 490 thousand and 12 million \name{Debian} users can be estimated.}, there would be in total around 150 active \masqmail\ installations in \name{Debian}. \name{Ubuntu} which also does \name{popcon} statistics \citeweb{popcon.ubuntu}, counts 82 installations with 13 active ones. If here also one third of all systems submit their data, 40 active installations can be added. Including a guessed amount of additional 30 installations on other Unix operating systems makes about 220 \masqmail\ installations in total. Of course one person may have \masqmail\ installed on more than one computer, but a total of 150 different users seems to be realistic. \index{debian!popcon} \index{masqmail!users} diff -r b4611d4e1484 -r 6494832a798c thesis/tex/3-MailTransferAgents.tex --- a/thesis/tex/3-MailTransferAgents.tex Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tex/3-MailTransferAgents.tex Sat Feb 07 12:00:11 2009 +0100 @@ -73,7 +73,7 @@ \MTA{}s can also be split in other ways. -Due to \sendmail's significance in the early times of email, compatibility interfaces to \sendmail\ are important for Unix \MTA{}s. The reason is that many mail applications simply assume the \sendmail\ \MTA\ to be installed on the system. Being not \name{sendmail-compatible} may not matter for some fields of action, but makes the program ineligible for serving as a general purpose \MTA\ on \unix\ systems. Hence being sendmail-compatible is a major property of an \MTA. \MTA{}s without \name{sendmail-compatible} interfaces, or at least compatibility add-ons, will not be covered here. One example for such a program is \name{Apache James}. %FIXME: check if correct +Due to \sendmail's significance in the early times of email, compatibility interfaces to \sendmail\ are important for Unix \MTA{}s. The reason is that many mail applications simply assume the \sendmail\ \MTA\ to be installed on the system. Being not \name{sendmail-compatible} may not matter for some fields of action, but makes the program ineligible for serving as a general purpose \MTA\ on Unix systems. Hence being sendmail-compatible is a major property of an \MTA. \MTA{}s without \name{sendmail-compatible} interfaces, or at least compatibility add-ons, will not be covered here. One example for such a program is \name{Apache James}. %FIXME: check if correct \index{sendmail!compatibility} Another separation can be done between Free Software \MTA{}s and proprietary ones. Many of the \MTA{}s for Unix systems are Free Software. Only these are regarded throughout this thesis, because comparing Free Software with proprietary or commercial software is not what typical users of programs like \masqmail\ do. Comparison with non-free programs may be a point for large Free Software projects that try to step into the business world. Small projects, mostly used by individuals at home, need to be compared against other projects of similar shape. The document is seen from \masqmail's point of view---an \MTA\ for Unix systems on home servers and workstations---so non-free software is out of the way. @@ -102,7 +102,7 @@ \section{Popular MTAs} -This section introduces a selection of popular \MTA{}s; they are the most likely substitutes for \masqmail. All are sendmail-compatible ``smart'' \freesw\ \MTA{}s that focus on mail transfer, as is \masqmail. +This section introduces a selection of popular \MTA{}s; they are the most likely substitutes for \masqmail. All are sendmail-compatible ``smart'' Free Software \MTA{}s that focus on mail transfer, as is \masqmail. The programs chosen to be compared are: \sendmail, \exim, \qmail, and \postfix. They are the most important representatives of the regarded group. @@ -206,7 +206,7 @@ The \postfix\ project started in 1999 at \NAME{IBM} \name{research}, then called \name{VMailer} or \NAME{IBM} \name{Secure Mailer}. \person{Wietse Venema}'s program ``attempts to be fast, easy to administer, and secure. The outside has a definite Sendmail-ish flavor, but the inside is completely different.'' \citeweb{postfix:homepage}. In fact, \postfix\ was mainly designed after qmail's architecture to gain security. But in contrast to \qmail\ it aims much more on being fast and full-featured. -Today \postfix\ is taken by many \unix\ systems and \gnulinux\ distributions as default \MTA. +Today \postfix\ is taken by many Unix systems and \gnulinux\ distributions as default \MTA. The latest stable version is numbered 2.5.6 from December 2008. \postfix\ is covered by the \NAME{IBM} \name{Public License 1.0} which is a Free Software license. diff -r b4611d4e1484 -r 6494832a798c thesis/tex/4-MasqmailsFuture.tex --- a/thesis/tex/4-MasqmailsFuture.tex Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tex/4-MasqmailsFuture.tex Sat Feb 07 12:00:11 2009 +0100 @@ -44,7 +44,7 @@ The requirements are named ``\NAME{RF}'' for ``requirement, functional''. -\paragraph{\RF1: Incoming and outgoing channels} +\paragraph{\RF\,1: Incoming and outgoing channels} \label{rf1} \sendmail-compatible \MTA{}s must support at least two incoming channels: mail submitted using the \path{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}. \index{incoming channels} @@ -80,7 +80,7 @@ -\paragraph{\RF2: Mail queuing} +\paragraph{\RF\,2: Mail queuing} \label{rf2} \index{mail queue} Mail queuing removes the need to deliver instantly as a message is received. The queue provides fail-safe storage of mails until they are delivered. Mail queues are probably used in all \MTA{}s, even in some simple forwarders. The mail queue is essential for \masqmail, as \masqmail\ is intended for non-permanent online connections. This means, mail must be queued until a online connection is available to send the message. This may be after a reboot. Hence the mail queue must provide persistence. @@ -93,7 +93,7 @@ -\paragraph{\RF3: Header sanitizing} +\paragraph{\RF\,3: Header sanitizing} \label{rf3} \index{header sanitizing} Mail coming into the system often lacks important header lines. At least the required ones must be added by the \MTA. One example is the \texttt{Date:} header, another is the, not required but recommended, \texttt{Message-ID:} header. Apart from adding missing headers, rewriting headers is important, too. Changing the locally known domain part of email addresses to globally known ones is an example. \masqmail\ needs to be able to rewrite the domain part dependent on the route used to send the message, to prevent messages to get classified as spam. @@ -104,7 +104,7 @@ -\paragraph{\RF4: Aliasing} +\paragraph{\RF\,4: Aliasing} \label{rf4} \index{aliases} Email addresses can have aliases, thus they need to be expanded. Aliases can be of different kind: another local user, a remote user, a list of local and remote users, or a command. Most important are the aliases in the \path{aliases} file, usually located at \path{/etc/aliases}. Addresses expanding to lists of users lead to more envelopes. Aliases changing the recipient's domain part may require a different route to be used. @@ -112,7 +112,7 @@ -\paragraph{\RF5: Route management} +\paragraph{\RF\,5: Route management} \label{rf5} \index{online routes} 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}. @@ -120,7 +120,7 @@ -\paragraph{\RF6: Authentication} +\paragraph{\RF\,6: Authentication} \label{rf6} \label{requirement-authentication} \index{auth} @@ -153,7 +153,7 @@ -\paragraph{\RF7: Encryption} +\paragraph{\RF\,7: Encryption} \label{rf7} \label{requirement-encryption} \index{enc} @@ -185,7 +185,7 @@ -\paragraph{\RF8: Spam handling} +\paragraph{\RF\,8: Spam handling} \label{rf8} \index{spam} 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}.) @@ -211,7 +211,7 @@ -\paragraph{\RF9: Malware handling} +\paragraph{\RF\,9: Malware handling} \label{rf9} \index{malware} Related to spam is malicious content (short: \name{malware}) like viruses, worms, and trojan horses. They, in contrast to spam, do not affect the \MTA\ itself, as they are in the mail's body. \MTA{}s that search for malware are equal to post offices that open letters to check if they contain something that could harm the recipient. This is not a mail transport job. But by many people the \MTA\ which is responsible for the recipient is seen to be at a good position to do this work, thus it is often done there. Though, it is nice to have interfaces to such scanners within the \MTA. @@ -223,7 +223,7 @@ -\paragraph{\RF10: Archiving} +\paragraph{\RF\,10: Archiving} \label{rf10} \index{archiving} Mail archiving and auditability become more important as email establishes as technology for serious business communication. Archiving is a must for companies in many countries. In the United States, the \name{Sarbanes-Oxley Act} \cite{sox} covers this topic. @@ -246,7 +246,7 @@ These non-functional requirements are named ``\NAME{RG}'' for ``requirement, general''. -\paragraph{\RG1: Security} +\paragraph{\RG\,1: Security} \index{security} \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}. \index{compartmentalization} @@ -255,7 +255,7 @@ \index{masqmail!security} -\paragraph{\RG2: Reliability} +\paragraph{\RG\,2: Reliability} \index{reliability} Reliability is the second essential quality property for an \MTA. Mail for which the \MTA\ took responsibility must never get lost while it is within the \MTA's responsibility. The \MTA\ must not be \emph{the cause} of any mail loss, no matter what happens. Unreliable \MTA{}s are of no value. However, as the mail transport infrastructure is a distributed system, one of the communication partners or the transport medium may crash at any time during mail transfer. Thus reliability is needed for mail transfer communication, too. \index{mail loss} @@ -266,27 +266,27 @@ \index{duplicates} -\paragraph{\RG3: Robustness} +\paragraph{\RG\,3: Robustness} \index{robustness} Being robust means handling errors properly. Small errors may get corrected, large errors may kill a process. Killed processes should get restarted automatically and lead to a clean state again. Log messages should be written in every case. Robust software does not need a special environment, it creates a friendly environment itself. \person{Raymond}'s \name{Rule of Robustness} and his \name{Rule of Repair} are good descriptions \cite[pages~18--21]{raymond03}. -\paragraph{\RG4: Extendability} +\paragraph{\RG\,4: Extendability} \index{extendability} \masqmail's architecture needs to be extendable to allow new features to be added afterwards. The reasons for this need are the changing requirements. New requirements will appear, like more efficient mail transfer of large messages or a final solution to the spam problem. Extendability is the ability of software to include new function with little work. -\paragraph{\RG5: Maintainability} +\paragraph{\RG\,5: Maintainability} \index{maintainability} Maintaining software takes much time and effort. \person{Spinellis} guesses ``40\,\% to 70\,\% of the effort that goes into a software system is expended after the system is written first time.'' \cite[page~1]{spinellis03}. This work is called \emph{maintaining}. Hence making software good to maintain will ease all further work. -\paragraph{\RG6: Testability} +\paragraph{\RG\,6: Testability} \index{testability} Good testability make maintenance easier too, because functionality is directly verifiable when changes are done, thus removing the uncertainty. Modularized software makes testing easier, because parts can be tested without external influences. \person{Spinellis} sees testability as a sub-quality of maintainability. -\paragraph{\RG7: Performance} +\paragraph{\RG\,7: Performance} \index{performance} Also called ``efficiency''. Efficient software requires few time and few resources. The merge of communication hardware and its move from service providers to homes and to mobile devices demand smaller and more resource-friendly software. The amount of mail will be lower even if much more mail will be sent, thus time performance is less important. \masqmail\ is not a program to be used on large servers, but on small devices. Thus more important for \masqmail\ will be energy and heat saving, maybe also system resources. @@ -294,18 +294,18 @@ -\paragraph{\RG8: Availability} +\paragraph{\RG\,8: Availability} \index{availability} Availability is important for server programs. They must stay operational by blocking \name{denial of service} attacks and the like. Automated restarts into a clean state after fatal errors are also required. -\paragraph{\RG9: Portability} +\paragraph{\RG\,9: Portability} \index{portability} -Source code that compiles and runs on various operation systems is called portable. Portability can be achieved by using standard features of the programming language and common libraries. Basic rules to achieve portable code are defined by \person{Kernighan} and \person{Pike} \cite{kernighan99}. Portable code lets software spread faster. Portability among the various flavors of Unix systems is a goal for \masqmail, because these systems are the ones \MTA{}s usually run on. No special care needs to be taken for non-\unix\ platforms. +Source code that compiles and runs on various operation systems is called portable. Portability can be achieved by using standard features of the programming language and common libraries. Basic rules to achieve portable code are defined by \person{Kernighan} and \person{Pike} \cite{kernighan99}. Portable code lets software spread faster. Portability among the various flavors of Unix systems is a goal for \masqmail, because these systems are the ones \MTA{}s usually run on. No special care needs to be taken for non-Unix platforms. -\paragraph{\RG10: Usability} +\paragraph{\RG\,10: Usability} \index{usability} Usability, not mentioned by \person{Hafiz} (he focuses on architecture) but by \person{Spinellis} and \person{Kan}, is a property which is very important from the user's point of view. Software with bad usability is rarely used, no matter how good it is. If substitutes with better usability exist, the user will switch to one of them. Here, usability includes setting up and configuring; the term ``users'' includes administrators. Having \MTA{}s on home servers and workstations requires easy and standardized configuration. The common setups should be configurable with little action by the user. Complex configuration should be possible, but the focus should be on the most common form of configuration: choosing one of several common setups. @@ -380,55 +380,55 @@ Here follows a description of how far the requirements are already fulfilled by \masqmail. -\paragraph{\RF1: In/out channels} +\paragraph{\RF\,1: In/out channels} \index{incoming channels} \index{outgoing channels} -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. Currently, support for other protocols seems not to be necessary, although new protocols and mailing concepts are likely to appear (see section~\ref{sec:email-trends}). As other protocols are not required today, \masqmail\ is regarded to fulfill \RF1. Without any support in \masqmail\ for adding further protocols, the best strategy is to delaying such work until the functionality is essential, anyway. +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. Currently, support for other protocols seems not to be necessary, although new protocols and mailing concepts are likely to appear (see section~\ref{sec:email-trends}). As other protocols are not required today, \masqmail\ is regarded to fulfill \RF\,1. Without any support in \masqmail\ for adding further protocols, the best strategy is to delaying such work until the functionality is essential, anyway. %fixme: << smtp submission >> %fixme -\paragraph{\RF2: Queuing} +\paragraph{\RF\,2: Queuing} \index{mail queue} One single mail queue is used in \masqmail. It satisfies all current requirements. -\paragraph{\RF3: Header sanitizing} +\paragraph{\RF\,3: Header sanitizing} \index{header sanitizing} The envelope and mail headers are generated when the mail is put into the queue. The requirements are fulfilled. -\paragraph{\RF4: Aliasing} +\paragraph{\RF\,4: Aliasing} \index{aliases} Aliasing is done on delivery. All common kinds of aliases in the global aliases file are supported. So called \name{.forward} aliasing is not supported, but this is less common and seldom used. -\paragraph{\RF5: Route management} +\paragraph{\RF\,5: Route management} \index{online routes} Querying the name of the active route is done on delivery. Headers can get rewritten a second time then. This part does provide all the functionality required. -\paragraph{\RF6: Authentication} +\paragraph{\RF\,6: Authentication} \index{auth} 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 hosts 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. \index{auth!smtp-after-pop} \index{auth!smtp-auth} -\paragraph{\RF7: Encryption} +\paragraph{\RF\,7: Encryption} \index{enc} Similar is the situation for encryption which is also only available for outgoing channels; here a tunnel application, like \name{openssl}, is needed. A secure tunnel can be created to send mail trough. State-of-the-art, however, is using \NAME{STARTTLS}, but this 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 crypt between the secure connection to the remote host and the plain connection to the \MTA. Unfortunately, this suffers from the problem explained on page \pageref{fig:stunnel} in figure~\ref{fig:stunnel}. Anyway, it would still be no \NAME{STARTTLS} support. \index{secure tunnel} -\paragraph{\RF8: Spam handling} +\paragraph{\RF\,8: Spam handling} \index{spam!handling} \masqmail\ 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 good to separate different work with clear interfaces. But the need of two instances of the same \MTA, with doubled setup, makes it rather a work-around. Better is to have this data flow respected in the \MTA\ design, like it was done in \postfix. Anyway, the more important part of spam handling, for sure, is done during the \SMTP\ dialog by completely refusing unwanted mail. -\paragraph{\RF9: Malware handling} +\paragraph{\RF\,9: Malware handling} \index{malware!handling} For malware handling applies nearly the same as for spam handling, except that all checks are done after mail is accepted. The possible setup is the same with the two \MTA\ instances and the filter in between. \masqmail\ does support such a setup, but not in a nice way. -\paragraph{\RF10: Archiving} +\paragraph{\RF\,10: Archiving} \index{archiving} There is currently no way for archiving every message that does through \masqmail. -\paragraph{\RG1: Security} +\paragraph{\RG\,1: Security} \index{security} \masqmail's current security is bad. However, it seems acceptable for using \masqmail\ on workstations and private networks, if the environment is trustable and \masqmail\ is protected against remote attacks. In environments where untrusted components or persons have access to \masqmail, its security is too low. Its author states that \masqmail\ ``is not designed to'' such usage \citeweb{masqmail:homepage2}. This is a clear indicator for being careful. Issues like high memory consumption, low performance, and denial-of-service attacks---things not regarded by design---may cause serious problems. In any way, a security report that confirms \masqmail's security level is missing. \index{masqmail!security} @@ -436,7 +436,7 @@ \masqmail\ uses conditional compilation to exclude unneeded functionality from the executable at compile time. Excluding code means excluding all bugs and weaknesses within this code, too. Excluding unused code is a good concept to improve security. \index{conditional compilation} -\paragraph{\RG2: Reliability} +\paragraph{\RG\,2: Reliability} \index{reliability} Its reliability is also not good enough. Situations where only one part of a sent message was removed from the queue and the other part remained as garbage, showed off \citeweb{debian:bug245882}. Problems with large mail messages in conjunction with small bandwidth were also reported \citeweb{debian:bug216226}. Fortunately, lost email was no big problem yet, but \person{Kurth} warns: \index{masqmail!bugs} @@ -449,22 +449,22 @@ In summary: Current reliability needs to be improved. %fixme: state machine -\paragraph{\RG3: Robustness} +\paragraph{\RG\,3: Robustness} \index{robustness} The logging behavior of \masqmail\ is good, although it does not cover the whole code. For example, if the queue directory is world writeable by accident (or as action of an intruder), any user can remove messages from the queue or replace them with own ones. \masqmail\ does not even write a debug message in this case. The origin of this problem, however, is \masqmail's trust in its environment. %fixme: rule of robustness, rule of repair -\paragraph{\RG4: Extendability} +\paragraph{\RG\,4: Extendability} \index{extendability} \masqmail's extendability is very poor. This is a general problem of monolithic software, but can though be provided with high effort. \exim\ is an example for good extendability in a monolithic program. -\paragraph{\RG5: Maintainability} +\paragraph{\RG\,5: Maintainability} \index{maintainability} The maintainability of \masqmail\ is equivalent to other software of similar kind. Missing modularity and therefore more complexity makes the maintainer's work harder. Conditional compilation might be good for security, but \name{ifdef}s scattered throughout the source code is a pain for maintenance. In summary is \masqmail's maintainability bearable, like in average Free Software projects. -\paragraph{\RG6: Testability} +\paragraph{\RG\,6: Testability} \index{testability} The testability suffers from missing modularity, too. Testing program parts is hard to do. Nevertheless, it is done by compiling parts of the source to two special test programs: One tests reading input from a socket, the other tests constructing messages and sending it directly. Neither is designed for automated testing of source parts, they are rather to help the programmer during development. @@ -473,21 +473,21 @@ %fixme: think about clean-room testing -\paragraph{\RG7: Performance} +\paragraph{\RG\,7: Performance} \index{performance} The performance---efficiency---of \masqmail\ is good enough for its target field of operation, where this is a minor goal. -\paragraph{\RG8: Availability} +\paragraph{\RG\,8: Availability} \index{availability} This applies equal to availability. Hence no further work needs to be done her. -\paragraph{\RG9: Portability} +\paragraph{\RG\,9: Portability} \index{portability} The code's portability is good with view on Unix-like operation systems. At least \name{Debian}, \name{Red Hat}, \NAME{SUSE}, \name{Slackware}, \name{Free}\NAME{BSD}, \name{Open}\NAME{BSD}, and \name{Net}\NAME{BSD} are reported to be able to compile and run \masqmail\ \citeweb{masqmail:homepage2}. Special requirements for the underlying file system are not known. Thus, the portability is already good. \index{masqmail!supported systems} -\paragraph{\RG10: Usability} +\paragraph{\RG\,10: Usability} \index{usability} The usability is very good, from the administrator's point of view. \masqmail\ was developed to suite a specific, limited job---its configuration does perfect match. The user's view does not reach to the \MTA, as it is hidden behind the \MUA. Configuration could be eased even more by providing configuration generators that enable \masqmail\ to be used right ``out of the box'' after running one of several configuration scripts for common setups. This would improve \masqmail's usability for not technical educated people. \index{out-of-the-box usage} @@ -517,34 +517,34 @@ These tasks are presented in more detail in a todo list, now. The list is sorted by focus and then by importance. -\subsubsection*{\TODO1: Encryption (\RF7)} +\subsubsection*{\TODO\,1: Encryption (\RF\,7)} \index{enc} Encryption is chosen for number one as it is essential to provide privacy. Using \NAME{STARTTLS} for encryption is definitely needed and should be added first; encrypted data transfer is hardly possible without support for it. -\subsubsection*{\TODO2: Authentication (\RF6)} +\subsubsection*{\TODO\,2: Authentication (\RF\,6)} \index{auth} Authentication of incoming \SMTP\ connections is also highly needed and should be added second. It is important to restrict access and to prevent relaying. For workstations and local networks, this has only medium importance and address-based authentication is sufficient in most times. But secret-based authentication is mandatory to receive mail from the Internet. Additionally it is a guard against spam. -\subsubsection*{\TODO3: Security (\RG1)} +\subsubsection*{\TODO\,3: Security (\RG\,1)} \index{security} \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. Secure 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}.) Furthermore, \masqmail's security should be tested throughout to get a definitive view how good it really is and where the weak spots are. \index{modularity} -\subsubsection*{\TODO4: Reliability (\RG2)} +\subsubsection*{\TODO\,4: Reliability (\RG\,2)} \index{reliability} Reliability is also to improve. It is a key quality property for an \MTA, and not good enough in \masqmail. Reliability is strong related to the queue, thus improvements there are favorable. Applying ideas of \name{crash-only software} \cite{candea03} will be a good step. \person{Candea} and \person{Fox} see in killing the process the best way to stop a running program. Doing so inevitably demands for good reliability of the queue, and the start up process inevitably demands for good recovery. Those critical situations for reliability are nothing special anymore, they are common. Hence they are regularly tested and will definitely work. \index{crash-only software} -\subsubsection*{\TODO5: Spam handling (\RF8)} +\subsubsection*{\TODO\,5: Spam handling (\RF\,8)} \index{spam!handling} As authentication can be a guard against spam, filter facilities have lower priority. But basic spam filtering and interfaces for external tools should be implemented in future. Configuration guides for a setup of two \masqmail\ instances with a spam scanner in between should be written. And at least a basic kind of spam prevention during the \SMTP\ dialog should be implemented. -\subsubsection*{\TODO6: Extendability (\RG4)} +\subsubsection*{\TODO\,6: Extendability (\RG\,4)} \index{extendability} \masqmail\ lacks an interface to plug in modules with additional functionality. There exists no add-on or module system. The code is only separated by function into various source files. Some functional parts can be included or excluded by conditional compilation. But the \name{ifdef}s are scattered through all the code. This situation needs to be improved by collecting related function into single places that interact through clear interfaces with other parts. Also should these interfaces allow efficient adding of further functionality. \index{conditional compilation} @@ -578,7 +578,7 @@ \index{interposition filter} -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 improvable in a new design, of course, but also with wrappers or interposition filters. +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 (\TODO\,1) and authentication (\TODO\,2), 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 (\TODO\,4), extendability (\TODO\,6), and maintainability hardly be added to code afterwards---if at all. Security (\TODO\,3) is improvable in a new design, of course, but also with wrappers or interposition filters. This linking of requirements to the strategies is shown in table~\ref{tab:strategies}. The requirements are ordered by their focus. @@ -720,7 +720,7 @@ Redesigning a software as requirements change helps keeping it alive. % fixme: add quote: ``one thing surely remains: change'' (something like that) \index{redesign} -Another danger is the dead end of complexity which is likely to appear by constant work 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. +Another danger is the dead end of complexity which is likely to appear by constant work 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. \index{suckless} diff -r b4611d4e1484 -r 6494832a798c thesis/tex/5-Improvements.tex --- a/thesis/tex/5-Improvements.tex Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/tex/5-Improvements.tex Sat Feb 07 12:00:11 2009 +0100 @@ -482,7 +482,7 @@ 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 signals might be useful to trigger runs. Communication between receiver and transport modules and the outside world is organized by their specific protocol (e.g.\ \SMTP). -Left is only the communication between the receiver modules and \name{queue-in}, and between \name{queue-out} and the transport modules. Suggested for this communication is a simple protocol with data exchange through \unix\ pipes. Figure~\ref{fig:ipc-protocol} shows a state diagram for the protocol. +Left is only the communication between the receiver modules and \name{queue-in}, and between \name{queue-out} and the transport modules. Suggested for this communication is a simple protocol with data exchange through Unix pipes. Figure~\ref{fig:ipc-protocol} shows a state diagram for the protocol. The protocol is described in more detail now: \index{protocol} diff -r b4611d4e1484 -r 6494832a798c thesis/thesis.sty --- a/thesis/thesis.sty Sat Feb 07 11:42:45 2009 +0100 +++ b/thesis/thesis.sty Sat Feb 07 12:00:11 2009 +0100 @@ -43,24 +43,18 @@ \newcommand{\exim}{\name{exim}} \newcommand{\postfix}{\name{postfix}} -\newcommand{\debian}{\name{Debian}} \newcommand{\gnulinux}{\NAME{GNU}/\name{Linux}} \newcommand{\MTA}{\NAME{MTA}} \newcommand{\MUA}{\NAME{MUA}} \newcommand{\MDA}{\NAME{MDA}} \newcommand{\RFC}{\NAME{RFC}} \newcommand{\GNU}{\NAME{GNU}} -\newcommand{\unix}{Unix} -\newcommand{\freesw}{Free Software} \newcommand{\SMTP}{\NAME{SMTP}} \newcommand{\TLS}{\NAME{TLS}} -\newcommand{\TODO}{\NAME{TODO}\,} -\newcommand{\RF}{\NAME{RF}\,} -\newcommand{\RG}{\NAME{RG}\,} -\newcommand{\RA}{\NAME{RA}\,} -\newcommand{\St}{\NAME{S}\,} -%fixme: remove the \, and insert them in the text directly +\newcommand{\TODO}{\NAME{TODO}} +\newcommand{\RF}{\NAME{RF}} +\newcommand{\RG}{\NAME{RG}}