# HG changeset patch # User meillo@marmaro.de # Date 1232973378 -3600 # Node ID f9f925c5e2d100bf027ae53650791a784d6272f4 # Parent 5a4b3e22a68478c28fdb81d5310b36e4f4ef3e9a added labels and few work at some places diff -r 5a4b3e22a684 -r f9f925c5e2d1 thesis/tex/4-MasqmailsFuture.tex --- a/thesis/tex/4-MasqmailsFuture.tex Mon Jan 26 13:35:01 2009 +0100 +++ b/thesis/tex/4-MasqmailsFuture.tex Mon Jan 26 13:36:18 2009 +0100 @@ -1,4 +1,5 @@ \chapter{\masqmail's present and future} +\label{chap:present-and-future} This chapter identifies requirements for \masqmail\ which are compared against the current code to see what is already fulfilled and what is missing. Then the outstanding work is ordered by relevance and a list of tasks to do is created. The end of this chapter is the evaluation of the best development strategy to get the work done in order to achieve the requirements. @@ -38,6 +39,7 @@ \paragraph{\RF1: Incoming and outgoing channels} +\label{rf1} \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}. \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. @@ -66,6 +68,7 @@ \paragraph{\RF2: Mail queuing} +\label{rf2} 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 used 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. The mail queue and the module(s) to manage it are the central part of the whole system. This demands especially for robustness and reliability, as a failure here can lead to loosing mail. An \MTA\ takes over responsibility for mail in accepting it, hence loosing mail messages is absolutely to avoid. This covers any kind of crash situation too. The worst thing acceptable to happen is an already sent mail to be sent again. @@ -74,6 +77,7 @@ \paragraph{\RF3: Header sanitizing} +\label{rf3} 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. Generating the envelope is a related job. The envelope specifies the actual recipient of the mail, no matter what the \texttt{To:}, \texttt{Cc:}, and \texttt{Bcc:} headers contain. Multiple recipients lead to multiple different envelopes, containing all the same mail message. @@ -82,18 +86,21 @@ \paragraph{\RF4: Aliasing} +\label{rf4} 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 containing 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. \paragraph{\RF5: Route management} +\label{rf5} 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}. \paragraph{\RF6: Authentication} +\label{rf6} \label{requirement-authentication} One thing to avoid is being an \name{open relay}. Open relays allow to relay mail from everywhere to everywhere. This is a source of spam. The solution is restricting relay\footnote{Relaying is passing mail, that is not from and not for the own system, through it.} access. It may also be wanted to refuse all connections to the \MTA\ except ones from a specific set of hosts. @@ -118,6 +125,7 @@ \paragraph{\RF7: Encryption} +\label{rf7} \label{requirement-encryption} Electronic mail is vulnerable to sniffing attacks, because in generic \SMTP\ all data transfer is unencrypted. The message's body, the header, and envelope are all unencrypted, but also authentication dialogs that transfer plain text passwords (e.g.\ \NAME{PLAIN} and \NAME{LOGIN}). Hence encryption is throughout important. @@ -140,6 +148,7 @@ \paragraph{\RF8: Spam handling} +\label{rf8} 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}). 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. @@ -157,6 +166,7 @@ \paragraph{\RF9: Malware handling} +\label{rf9} Related to spam is malicious content (short: \name{malware}) like viruses, worms, trojan horses. They, in contrast to spam, do not affect the \MTA\ itself, as they are in the mail's body. \MTA{}s searching for malware is equal to real world's post offices opening 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, so it is often done there. 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. @@ -166,9 +176,8 @@ \paragraph{\RF10: Archiving} -Mail archiving and auditability become more important as email establishes as technology for serious business communication. It is also a must for companies in many countries. - -<< \textbf{SOX} >> %fixme: cite SOX +\label{rf10} +Mail archiving and auditability become more important as email establishes as technology for serious business communication. It is also a must for companies in many countries. In the United States, the \name{Sarbanes-Oxley Act} \cite{sox} covers this topic. But a dedicated archiving solution is advisable if archiving is of high importance. The ability to archive verbatim copies of every mail coming into and every mail going out of the system, with relation between them, appears to be a goal to achieve. @@ -248,16 +257,15 @@ \masqmail\ has none of them; it is what \sendmail\ was in the beginning: a single large block. 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. -%fixme: what is included, what not? \begin{figure} \begin{center} \vspace*{2ex} %\includegraphics[scale=0.75]{img/callgraph.eps} - \includegraphics[scale=0.75]{img/masqmail-3-omitlog5.eps} + %\includegraphics[scale=0.75]{img/masqmail-3-omitlog5.eps} + \includegraphics[scale=0.75]{img/bb.eps} \end{center} - \caption{Internal structure of \masqmail, showed by a call graph. (Logging functions are excluded.)} - %fixme: what else is excluded + \caption{Internal structure of \masqmail, showed by a call graph. (Logging functions are ignored; test and \NAME{POP3} code is excluded.)} \label{fig:masqmail-arch} \end{figure} @@ -297,13 +305,11 @@ \paragraph{\RF1: In/out 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. 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. -<< smtp submission >> %fixme +%fixme: << smtp submission >> %fixme \paragraph{\RF2: Queuing} One single mail queue is used in \masqmail; it satisfies all current requirements. -<< persistence: DB >> %fixme - \paragraph{\RF3: Header sanitizing} The envelope and mail headers are generated when the mail is put into the queue. The requirements are fulfilled. @@ -358,10 +364,11 @@ \paragraph{\RG6: Testability} -The testability suffers from missing modularity. Testing program parts is hard to do. Nevertheless, it is done by compiling parts of the source to special test programs. %fixme: what are the names? what do they test? +The testability suffers from missing modularity. 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. -This kind of testing is only clean-room testing, so .... %fixme - % XXX +Two additional scripts exist to send a set of mails to differend kinds of recipients. They can be used for automated testing, but both test only the complete system's function. + +%fixme: think about clean-room testing \paragraph{\RG7: Performance} The performance---efficiency---of \masqmail\ is good enough for its target field of operation, where this is a minor goal.