Mercurial > docs > diploma
comparison thesis/tex/4-MasqmailsFuture.tex @ 316:f3a86ce788ec
spell checking
author | meillo@marmaro.de |
---|---|
date | Wed, 21 Jan 2009 15:19:25 +0100 |
parents | 9038d2030d9a |
children | 3b7680af0ebe |
comparison
equal
deleted
inserted
replaced
315:734afc9b1a9f | 316:f3a86ce788ec |
---|---|
93 | 93 |
94 | 94 |
95 \paragraph{\RF6: Authentication} | 95 \paragraph{\RF6: Authentication} |
96 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 be also wanted to refuse all connections to the \MTA\ except ones from a specific set of hosts. | 96 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 be also wanted to refuse all connections to the \MTA\ except ones from a specific set of hosts. |
97 | 97 |
98 Several ways to restrict access are available. The most simple one is restriction by the \NAME{IP} address. No extra complexity is added this way, but the \NAME{IP} addresses have to be static or within known ranges. This approach is often used to allow relaying for local nets. The access check can be done by the \MTA\ or by a guard (e.g.\ \NAME{TCP} \name{Wrappers}) before. The main advantage here is the minimal setup and maintainence work needed. This kind of access restriction is important to be implemented. | 98 Several ways to restrict access are available. The most simple one is restriction by the \NAME{IP} address. No extra complexity is added this way, but the \NAME{IP} addresses have to be static or within known ranges. This approach is often used to allow relaying for local nets. The access check can be done by the \MTA\ or by a guard (e.g.\ \NAME{TCP} \name{Wrappers}) before. The main advantage here is the minimal setup and maintenance work needed. This kind of access restriction is important to be implemented. |
99 | 99 |
100 This authentication based on \NAME{IP} addresses is impossible in situations where hosts with changing \NAME{IP} addresses, that are not part of a known subnet, need access. Then a authentication mechanism based on some \emph{secret} is required. Three common approaches exist: | 100 This authentication based on \NAME{IP} addresses is impossible in situations where hosts with changing \NAME{IP} addresses, that are not part of a known sub net, need access. Then a authentication mechanism based on some \emph{secret} is required. Three common approaches exist: |
101 \begin{enumerate} | 101 \begin{enumerate} |
102 \item \SMTP-after-\NAME{POP}: Uses authentication on the \NAME{POP} protocol to permit incoming \SMTP\ connections for a limited time afterwards. The variant \SMTP-after-\NAME{IMAP} exists too. | 102 \item \SMTP-after-\NAME{POP}: Uses authentication on the \NAME{POP} protocol to permit incoming \SMTP\ connections for a limited time afterwards. The variant \SMTP-after-\NAME{IMAP} exists too. |
103 \item \SMTP\ authentication: An extension to \SMTP. It allows to request authentication before mail is accepted. Here no helper protocols are needed. | 103 \item \SMTP\ authentication: An extension to \SMTP. It allows to request authentication before mail is accepted. Here no helper protocols are needed. |
104 \item Certificates: The identity of a user or a host is confirmed by certificates that are signed by trusted authorities. Certificates are closely related to encryption, they do normally satisfy both needs: \NAME{SSL} tunnels encrypt the data transmission and allow to identify the remote user/host by his certificate. | 104 \item Certificates: The identity of a user or a host is confirmed by certificates that are signed by trusted authorities. Certificates are closely related to encryption, they do normally satisfy both needs: \NAME{SSL} tunnels encrypt the data transmission and allow to identify the remote user/host by his certificate. |
105 \end{enumerate} | 105 \end{enumerate} |
111 \label{requirement-encryption} | 111 \label{requirement-encryption} |
112 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. | 112 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. |
113 | 113 |
114 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}. | 114 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}. |
115 | 115 |
116 Using secure tunnels that are provided by external programs, should be prefered 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. | 116 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. |
117 | 117 |
118 \begin{figure} | 118 \begin{figure} |
119 \begin{center} | 119 \begin{center} |
120 \includegraphics[scale=0.75]{img/stunnel.eps} | 120 \includegraphics[scale=0.75]{img/stunnel.eps} |
121 \end{center} | 121 \end{center} |
136 | 136 |
137 Filtering spam can be done by either refusing spam during the \SMTP\ dialog or by checking for spam after the mail was accepted and queued. Both ways have advantages and disadvantages, so modern \MTA{}s use them in combination. | 137 Filtering spam can be done by either refusing spam during the \SMTP\ dialog or by checking for spam after the mail was accepted and queued. Both ways have advantages and disadvantages, so modern \MTA{}s use them in combination. |
138 | 138 |
139 Spam is identified by the results of a set of checks. Static rules, querying databases (\NAME{DNS} blacklists \cite{cole07} \cite{levine08}), requesting special client behavior (\name{greylisting} \cite{harris03}, \name{hashcash} \cite{back02}), or statistical analysis (\name{bayesian filters} \cite{graham02}) are checks that may be used. Running more checks leads to better results, but takes more system resources and more time. | 139 Spam is identified by the results of a set of checks. Static rules, querying databases (\NAME{DNS} blacklists \cite{cole07} \cite{levine08}), requesting special client behavior (\name{greylisting} \cite{harris03}, \name{hashcash} \cite{back02}), or statistical analysis (\name{bayesian filters} \cite{graham02}) are checks that may be used. Running more checks leads to better results, but takes more system resources and more time. |
140 | 140 |
141 Doing some basic checks during the \SMTP\ dialog seems to be a must \cite[page~25]{eisentraut05}. Including them into the \MTA\ makes them fast to avoid \SMTP\ dialog timeouts. For modularity and reusability reasons internal interfaces to specialized modules seem to be best. | 141 Doing some basic checks during the \SMTP\ dialog seems to be a must \cite[page~25]{eisentraut05}. Including them into the \MTA\ makes them fast to avoid \SMTP\ dialog timeouts. For modularity and risibility reasons internal interfaces to specialized modules seem to be best. |
142 | 142 |
143 More detailed checks after the message is queued should be done using external scanners. Interfaces to invoke them need to be defined. (See also the remarks about \name{amavis} in the next section.) | 143 More detailed checks after the message is queued should be done using external scanners. Interfaces to invoke them need to be defined. (See also the remarks about \name{amavis} in the next section.) |
144 | 144 |
145 | 145 |
146 | 146 |
171 %fixme: refer to ch01 and ch02 | 171 %fixme: refer to ch01 and ch02 |
172 These non-functional requirements are named ``\NAME{RG}'' for ``requirement, general''. | 172 These non-functional requirements are named ``\NAME{RG}'' for ``requirement, general''. |
173 | 173 |
174 | 174 |
175 \paragraph{\RG1: Security} | 175 \paragraph{\RG1: Security} |
176 \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{compartementalization}, as described in section \ref{sec:discussion-mta-arch}. | 176 \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}. |
177 | 177 |
178 \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. | 178 \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. |
179 | 179 |
180 | 180 |
181 \paragraph{\RG2: Reliability} | 181 \paragraph{\RG2: Reliability} |
182 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 are distributed systems, one of the communication partners or the transport medium may crash at any time during mail tranfer. Thus reliability is needed for mail transfer communication too. | 182 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 are distributed systems, 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. |
183 | 183 |
184 The goal is to transfer exactly one copy of the message. \person{Tanenbaum} evaluates the situation and comes to the conclusion that ``in general, there is no way to arrange this.'' \cite[pages~377--379]{tanenbaum02}. Only strategies where now mail gets lost are acceptable; he identifies three of them, but one generates more duplicates than the others, so two strategies remain. (1) The client always reissues the transfer; the server first sends an acknowledgement, then handles the transfer. (2) The client reissues the transfer only if no acknowledgement was received; the server first handles the transfer and sends the acknowledgement afterwards. The first strategy does not need acknowledgements at all, however, it will lose mail if the second transfer fails too. | 184 The goal is to transfer exactly one copy of the message. \person{Tanenbaum} evaluates the situation and comes to the conclusion that ``in general, there is no way to arrange this.'' \cite[pages~377--379]{tanenbaum02}. Only strategies where now mail gets lost are acceptable; he identifies three of them, but one generates more duplicates than the others, so two strategies remain. (1) The client always reissues the transfer; the server first sends an acknowledgment, then handles the transfer. (2) The client reissues the transfer only if no acknowledgment was received; the server first handles the transfer and sends the acknowledgment afterwards. The first strategy does not need acknowledgments at all, however, it will lose mail if the second transfer fails too. |
185 | 185 |
186 Hence, mail transfer between two processes must use the strategy: The client reissues if it receives no acknowledgement; the server first handles the message and then sends the acknowledgement. This strategy only leads to duplicates if a crash happens in the time between the message is fully transfered to the server and the acknowlegement is received by the client. No mail will get lost. | 186 Hence, mail transfer between two processes must use the strategy: The client reissues if it receives no acknowledgment; the server first handles the message and then sends the acknowledgment. This strategy only leads to duplicates if a crash happens in the time between the message is fully transferred to the server and the acknowledgment is received by the client. No mail will get lost. |
187 | 187 |
188 | 188 |
189 \paragraph{\RG3: Robustness} | 189 \paragraph{\RG3: Robustness} |
190 Being robust means handling errors properly. Small errors may get corrected, large errors may kill a process. Killed processes should 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}. | 190 Being robust means handling errors properly. Small errors may get corrected, large errors may kill a process. Killed processes should 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}. |
191 | 191 |
284 \paragraph{\RF1: In/out channels} | 284 \paragraph{\RF1: In/out channels} |
285 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. | 285 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. |
286 | 286 |
287 << smtp submission >> %fixme | 287 << smtp submission >> %fixme |
288 | 288 |
289 \paragraph{\RF2: Queueing} | 289 \paragraph{\RF2: Queuing} |
290 One single mail queue is used in \masqmail; it satisfies all current requirements. | 290 One single mail queue is used in \masqmail; it satisfies all current requirements. |
291 | 291 |
292 << persistence: DB >> %fixme | 292 << persistence: DB >> %fixme |
293 | 293 |
294 \paragraph{\RF3: Header sanitizing} | 294 \paragraph{\RF3: Header sanitizing} |
305 | 305 |
306 \paragraph{\RF7: Encryption} | 306 \paragraph{\RF7: Encryption} |
307 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. | 307 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. |
308 | 308 |
309 \paragraph{\RF8: Spam handling} | 309 \paragraph{\RF8: Spam handling} |
310 \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 inbetween. 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. | 310 \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. |
311 | 311 |
312 \paragraph{\RF9: Malware handling} | 312 \paragraph{\RF9: Malware handling} |
313 For malware handling applies nearly the same, except all checks are done after mail is accepted. So the possible setup is the same with the two \MTA\ instances and the filter inbetween. \masqmail\ does support such a setup, but not in a nice way. | 313 For malware handling applies nearly the same, except all checks are done after mail is accepted. So 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. |
314 | 314 |
315 \paragraph{\RF10: Archiving} | 315 \paragraph{\RF10: Archiving} |
316 There is currently no way of archiving every message going through \masqmail. | 316 There is currently no way of archiving every message going through \masqmail. |
317 | 317 |
318 | 318 |
319 | 319 |
320 \paragraph{\RG1: Security} | 320 \paragraph{\RG1: Security} |
321 \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 attackers. In environments where untrusted components or persons have access to \masqmail, its security is too low. | 321 \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 attackers. In environments where untrusted components or persons have access to \masqmail, its security is too low. |
322 Its author states it ``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, is a security report missing that confirms \masqmail's security level. | 322 Its author states it ``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, is a security report missing that confirms \masqmail's security level. |
323 | 323 |
324 \masqmail\ uses conditional compilation to exclude unneeded functionality from the executable at complile time. Excluding code means excluding all bugs and weaknesses within this code too. Excluding unused code is a good concept to improve security. | 324 \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. |
325 | 325 |
326 \paragraph{\RG2: Reliability} | 326 \paragraph{\RG2: Reliability} |
327 Similar is its reliability not good enough. Situations where only one part of sent message was removed from the queue, and the other part remained as garbage, showed off \citeweb{debian:bug245882}. Problems with large mail and small bandwidth were also reported \citeweb{debian:bug216226}. Fortunately, lost email was no big problem yet, but \person{Kurth} warns: | 327 Similar is its reliability not good enough. Situations where only one part of sent message was removed from the queue, and the other part remained as garbage, showed off \citeweb{debian:bug245882}. Problems with large mail and small bandwidth were also reported \citeweb{debian:bug216226}. Fortunately, lost email was no big problem yet, but \person{Kurth} warns: |
328 \begin{quote} | 328 \begin{quote} |
329 There may still be serious bugs in [masqmail], so mail might get lost. But in the nearly two years of its existence so far there was only one time a bug which caused mail retrieved via pop3 to be lost in rare circumstances. | 329 There may still be serious bugs in [masqmail], so mail might get lost. But in the nearly two years of its existence so far there was only one time a bug which caused mail retrieved via pop3 to be lost in rare circumstances. |
397 \subsubsection*{\TODO3: Security (\RG1)} | 397 \subsubsection*{\TODO3: Security (\RG1)} |
398 \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. | 398 \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. |
399 | 399 |
400 | 400 |
401 \subsubsection*{\TODO4: Reliability (\RG2)} | 401 \subsubsection*{\TODO4: Reliability (\RG2)} |
402 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 startup process inevitably demands for good recovery. The critical situations for reliability are nothing special anymore, they are common. Hence they are regulary tested and will definately work. | 402 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. The critical situations for reliability are nothing special anymore, they are common. Hence they are regularly tested and will definitely work. |
403 | 403 |
404 | 404 |
405 \subsubsection*{\TODO5: Spam handling (\RF8)} | 405 \subsubsection*{\TODO5: Spam handling (\RF8)} |
406 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 using the approach of two \masqmail\ instances with a spam scanner inbetween should be written. And at least a basic kind of spam prevention during the \SMTP\ dialog should be implemented. | 406 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 using the approach 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. |
407 | 407 |
408 | 408 |
409 \subsubsection*{\TODO6: Extendability (\RG4)} | 409 \subsubsection*{\TODO6: Extendability (\RG4)} |
410 \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 to the 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. | 410 \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 to the 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. |
411 | 411 |
423 Knowing what needs to be done is only one part, the other is deciding \emph{how} to do it by focusing on a global development strategy. | 423 Knowing what needs to be done is only one part, the other is deciding \emph{how} to do it by focusing on a global development strategy. |
424 | 424 |
425 | 425 |
426 \subsection{Possibilities} | 426 \subsection{Possibilities} |
427 | 427 |
428 Futher development of software can always go three different ways: | 428 Further development of software can always go three different ways: |
429 \begin{enumerate} | 429 \begin{enumerate} |
430 \item[S1:] Improve the current code base. | 430 \item[S1:] Improve the current code base. |
431 \item[S2:] Add wrappers or interposition filters. | 431 \item[S2:] Add wrappers or interposition filters. |
432 \item[S3:] Redesign the software from scratch and rebuild it. | 432 \item[S3:] Redesign the software from scratch and rebuild it. |
433 \end{enumerate} | 433 \end{enumerate} |
434 | 434 |
435 The first two strategies base on the available source code, and can be applied in combination. The third strategy splits from the old code base and starts over again. Wrappers and interposition filters would be outright included into a new architecture; they are a subset of a new design. Also parts of existing code can be used in a new design if appropriate. | 435 The first two strategies base on the available source code, and can be applied in combination. The third strategy splits from the old code base and starts over again. Wrappers and interposition filters would be outright included into a new architecture; they are a subset of a new design. Also parts of existing code can be used in a new design if appropriate. |
436 | 436 |
437 | 437 |
438 The requirements are now regarded each on its own, and are linked to the development strategy that is prefered 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. | 438 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. |
439 | 439 |
440 This linking of strategies to the requirements is shown in table \ref{tab:strategies}. The requirements are ordered by their focus. | 440 This linking of strategies to the requirements is shown in table \ref{tab:strategies}. The requirements are ordered by their focus. |
441 | 441 |
442 \begin{table} | 442 \begin{table} |
443 \begin{center} | 443 \begin{center} |
446 \caption{Development strategies and their suitability for requirements} | 446 \caption{Development strategies and their suitability for requirements} |
447 \label{tab:strategies} | 447 \label{tab:strategies} |
448 \end{table} | 448 \end{table} |
449 | 449 |
450 | 450 |
451 Next, the best strategy for further development needs to be discovered. Therefore a score for each strategy is obtained now by summing up the focus points of each requirement for which a strategy is prefered. Herefore only positive focus points are regarded, with each plus symbol counting one. Requirements with negative focus are not regareded because they are already or nearly reached, but the view here is on outstanding work. %(Respecting negative focus points leads to a similar result.) | 451 Next, the best strategy for further development needs to be discovered. Therefore a score for each strategy is obtained now by summing up the focus points of each requirement for which a strategy is preferred. Therefore only positive focus points are regarded, with each plus symbol counting one. Requirements with negative focus are not regarded because they are already or nearly reached, but the view here is on outstanding work. %(Respecting negative focus points leads to a similar result.) |
452 | 452 |
453 Strategy 1 (Improve current code) has a score of 9 points. Strategy 2 (Wrappers and interposition filters) has a score of 7 points. Strategy 3 (A new design) scores on top with 17 points. \St1 and \St2 can be used in combination; the combined score is 13 points. Thus strategy 3 ranges first, followed by the combination of strategy 1 and 2. | 453 Strategy 1 (Improve current code) has a score of 9 points. Strategy 2 (Wrappers and interposition filters) has a score of 7 points. Strategy 3 (A new design) scores on top with 17 points. \St1 and \St2 can be used in combination; the combined score is 13 points. Thus strategy 3 ranges first, followed by the combination of strategy 1 and 2. |
454 | 454 |
455 This leads to the conclusion, that S3 (A new design) is probably the best strategy for further development. But this result respects only the view on requirements and their relevance. Other factors like development effort and risks are important to think about too. These issues are discussed in the following sections, comparing \St3 against the combination \St1+2. | 455 This leads to the conclusion, that S3 (A new design) is probably the best strategy for further development. But this result respects only the view on requirements and their relevance. Other factors like development effort and risks are important to think about too. These issues are discussed in the following sections, comparing \St3 against the combination \St1+2. |
456 | 456 |
464 \subsection{Discussion} | 464 \subsection{Discussion} |
465 | 465 |
466 | 466 |
467 \subsubsection*{Quality improvements} | 467 \subsubsection*{Quality improvements} |
468 | 468 |
469 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 prefered 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 enfavored if \masqmail\ should become a modern \MTA, with good quality properties. | 469 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. |
470 | 470 |
471 | 471 |
472 | 472 |
473 \subsubsection*{Security} | 473 \subsubsection*{Security} |
474 | 474 |
480 \hfill\cite[page 55]{graff03} | 480 \hfill\cite[page 55]{graff03} |
481 \end{quote} | 481 \end{quote} |
482 | 482 |
483 They also suggest to add wrappers and interposition filters \emph{around} applications, but more as repair techniques if it is not possible to design security \emph{into} a software the first way \cite[pages~71--72]{graff03}. | 483 They also suggest to add wrappers and interposition filters \emph{around} applications, but more as repair techniques if it is not possible to design security \emph{into} a software the first way \cite[pages~71--72]{graff03}. |
484 | 484 |
485 \person{Hafiz} adds: ``The major idea is that security cannot be retrofitted \emph{into} an architecture.'' \cite[page 64]{hafiz05} (emphasisis added). | 485 \person{Hafiz} adds: ``The major idea is that security cannot be retrofitted \emph{into} an architecture.'' \cite[page 64]{hafiz05} (emphasis added). |
486 | 486 |
487 | 487 |
488 | 488 |
489 | 489 |
490 \subsubsection*{Effort estimation} | 490 \subsubsection*{Effort estimation} |
502 | 502 |
503 | 503 |
504 | 504 |
505 \subsubsection*{Risks} | 505 \subsubsection*{Risks} |
506 | 506 |
507 The gained result might still overwights the development effort. But risks are something more to consider. | 507 The gained result might still outweighs the development effort. But risks are something more to consider. |
508 | 508 |
509 A redesign and rewrite of software from scratch is hard. It takes time to design a new architecture, which then must prove that it is as good as expected. As well is much time and work needed to implement the design, test it, fix bugs, and so on. If flaws in the design appear during prototype implementation, it is necessary to start again. | 509 A redesign and rewrite of software from scratch is hard. It takes time to design a new architecture, which then must prove that it is as good as expected. As well is much time and work needed to implement the design, test it, fix bugs, and so on. If flaws in the design appear during prototype implementation, it is necessary to start again. |
510 | 510 |
511 Such a redesign can fail at many points and it is for long unclear if the result is really better than the code that is already existent. Even if the new code is working like expected, it is still not matured. | 511 Such a redesign can fail at many points and it is for long unclear if the result is really better than the code that is already existent. Even if the new code is working like expected, it is still not matured. |
512 | 512 |
545 | 545 |
546 \subsubsection*{A guard against dead ends} | 546 \subsubsection*{A guard against dead ends} |
547 | 547 |
548 A new design does protect against such dead ends. | 548 A new design does protect against such dead ends. |
549 | 549 |
550 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 unsecure design. Thus security problems reappeared and over the years \sendmail's market share shrinked as more secure \MTA{}s became available. %fixme: declined ?? | 550 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. %fixme: declined ?? |
551 \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. % add quote: ``one thing surely remains: change'' (something like that) | 551 \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. % add quote: ``one thing surely remains: change'' (something like that) |
552 | 552 |
553 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. %fixme: proof | 553 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. %fixme: proof |
554 Such simple code makes it obvious to understand what it does. The \name{suckless} project \citeweb{suckless.org} for example advertizes 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 prequisite for security. | 554 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. |
555 | 555 |
556 | 556 |
557 | 557 |
558 | 558 |
559 | 559 |
560 \subsubsection*{Modularity} | 560 \subsubsection*{Modularity} |
561 | 561 |
562 The avoidence of dead ends is essential for further development on current code too. Hence it is mandatory to refactor the existing code base sooner or later. Most important is the intention to modularize it, as it improves many quality requirements, eases further development, and essentially improves securtiy. | 562 The avoidance of dead ends is essential for further development on current code too. Hence it is mandatory to refactor the existing code base sooner or later. Most important is the intention to modularize it, as it improves many quality requirements, eases further development, and essentially improves security. |
563 | 563 |
564 One example how modular structure makes it easy to add further functionality: \person{Sill} describes that integrating the \name{amavis} filter framework into the \qmail\ system can be done by renaming the \name{qmail-queue} module to \name{qmail-queue-real} and renaming the \name{amavis} to \name{qmail-queue} \cite[section~12.7.1]{sill02}. Nothing more in the \qmail\ system needs to be changed. This is a very admirable approach, but only possible in a modular system that consists of independent executables. | 564 One example how modular structure makes it easy to add further functionality: \person{Sill} describes that integrating the \name{amavis} filter framework into the \qmail\ system can be done by renaming the \name{qmail-queue} module to \name{qmail-queue-real} and renaming the \name{amavis} to \name{qmail-queue} \cite[section~12.7.1]{sill02}. Nothing more in the \qmail\ system needs to be changed. This is a very admirable approach, but only possible in a modular system that consists of independent executables. |
565 | 565 |
566 This thesis showed several times that modularity is the key property for good software design. This property can hardly be retrofitted into software. Hence development on base of current code will need a throughout restructuring too to modularize the source code. Thus a new design is similar to such a throughout refactoring, except without depending on current code. | 566 This thesis showed several times that modularity is the key property for good software design. This property can hardly be retrofitted into software. Hence development on base of current code will need a throughout restructuring too to modularize the source code. Thus a new design is similar to such a throughout refactoring, except without depending on current code. |
567 | 567 |
586 | 586 |
587 \subsubsection*{Break Even} | 587 \subsubsection*{Break Even} |
588 | 588 |
589 It is important to keep the time dimension in mind. This includes the separation into a short-time and a long-time view. The short-time view shall cover between two and four years. The long-time view is the following time. % fixme: find sources! | 589 It is important to keep the time dimension in mind. This includes the separation into a short-time and a long-time view. The short-time view shall cover between two and four years. The long-time view is the following time. % fixme: find sources! |
590 | 590 |
591 In the short-time view, the effort for improving the existing code is much smaller than the effort for a new design plus improvements. But to have similar quality properties at the end of the short-time frame, a \masqmail\ that is based on current code will probably require nearly as much effort as a new designed \masqmail\ will take. For all further development afterwards, the new design will scale well while the old code will require exponentiel more work. | 591 In the short-time view, the effort for improving the existing code is much smaller than the effort for a new design plus improvements. But to have similar quality properties at the end of the short-time frame, a \masqmail\ that is based on current code will probably require nearly as much effort as a new designed \masqmail\ will take. For all further development afterwards, the new design will scale well while the old code will require exponential more work. |
592 | 592 |
593 In the long-time view, a restructuring for modularity is necessary anyway. The question is, when to do it: Right at the start in a new design, or later in some restructuring. | 593 In the long-time view, a restructuring for modularity is necessary anyway. The question is, when to do it: Right at the start in a new design, or later in some restructuring. |
594 | 594 |
595 %fixme: define exactly, be clear: what does break even here mean | 595 %fixme: define exactly, be clear: what does break even here mean |
596 | 596 |
597 | 597 |
598 | 598 |
599 \subsubsection*{The problem with ``good enough''} | 599 \subsubsection*{The problem with ``good enough''} |
600 | 600 |
601 The decision for later restructuring is problematic. Functionality is often more wanted than quality, so further function is prefered over better quality, as quality is still ``good enough''. But it might be still ``good enough'' the next time, and the time after that one, and so on. | 601 The decision for later restructuring is problematic. Functionality is often more wanted than quality, so further function is preferred over better quality, as quality is still ``good enough''. But it might be still ``good enough'' the next time, and the time after that one, and so on. |
602 | 602 |
603 Quality improving is no popular work but it is required to avoid dead ends. As more code increases the work that needs to be done for quality and modularity improvements, it is better to do these improvements early. Afterwards all further development profits from it. | 603 Quality improving is no popular work but it is required to avoid dead ends. As more code increases the work that needs to be done for quality and modularity improvements, it is better to do these improvements early. Afterwards all further development profits from it. |
604 | 604 |
605 Also if some design is bad one should never hesitate to erase it and rebuild it in a sane way. | 605 Also if some design is bad one should never hesitate to erase it and rebuild it in a sane way. |
606 | 606 |
616 | 616 |
617 Free Software ``sells'' if it has a good user base. Although \qmail\ is somehow outdated and its author has released no new version since about 10 years, \qmail\ still has a very strong user base and community. | 617 Free Software ``sells'' if it has a good user base. Although \qmail\ is somehow outdated and its author has released no new version since about 10 years, \qmail\ still has a very strong user base and community. |
618 | 618 |
619 Good concepts, sound design, and a sane philosophy gives users good feelings for the software and faith in it. They become interested in using it and to contribute. In contrast does constantly repairing and reappearing weaknesses leave a bad feeling. | 619 Good concepts, sound design, and a sane philosophy gives users good feelings for the software and faith in it. They become interested in using it and to contribute. In contrast does constantly repairing and reappearing weaknesses leave a bad feeling. |
620 | 620 |
621 The motivation most volunteer developers have is their wish of doing good work to create software of value. Projects that follow admireable plans towards a good product will motivate volunteers to help with it. More helpers can get the 2,5 man-years for a new design in less absolute time done. Additionally is a good developers base the best start for a good user base, and users define a software's value. | 621 The motivation most volunteer developers have is their wish of doing good work to create software of value. Projects that follow admire able plans towards a good product will motivate volunteers to help with it. More helpers can get the 2,5 man-years for a new design in less absolute time done. Additionally is a good developers base the best start for a good user base, and users define a software's value. |
622 | 622 |
623 | 623 |
624 | 624 |
625 | 625 |
626 | 626 |
627 | 627 |
628 | 628 |
629 | 629 |
630 \section{Result} | 630 \section{Result} |
631 | 631 |
632 This chapter identified the requirements and the outstanding work to achieve them. Their importance and the required work on them lead to a focus ranking amoung the requirements, which resulted in a list of tasks to do. Afterwards possible development strategies to control the work process were compared and discussed. | 632 This chapter identified the requirements and the outstanding work to achieve them. Their importance and the required work on them lead to a focus ranking among the requirements, which resulted in a list of tasks to do. Afterwards possible development strategies to control the work process were compared and discussed. |
633 | 633 |
634 Strategy 3 (A new design) is slightly prefered over the combination of strategy 1 (Improve existing code) and 2 (Add wrappers and interposition filters) in regard of the requirements. | 634 Strategy 3 (A new design) is slightly preferred over the combination of strategy 1 (Improve existing code) and 2 (Add wrappers and interposition filters) in regard of the requirements. |
635 | 635 |
636 The discussion afterwards did generally support the new design strategy. But some arguments stand against it. These are: | 636 The discussion afterwards did generally support the new design strategy. But some arguments stand against it. These are: |
637 | 637 |
638 \begin{enumerate} | 638 \begin{enumerate} |
639 \item The development time and effort | 639 \item The development time and effort |
641 \item The risks for failure | 641 \item The risks for failure |
642 \end{enumerate} | 642 \end{enumerate} |
643 | 643 |
644 The first two arguments are only relevant for the short-time view, because both will become \emph{support arguments} for the new design, once the Break Even point is reached. | 644 The first two arguments are only relevant for the short-time view, because both will become \emph{support arguments} for the new design, once the Break Even point is reached. |
645 | 645 |
646 The third argument, the risks, remain. There are risk in every investion. Taking no risks means remaining the same, means drifting towards a dead end in a world that does change. | 646 The third argument, the risks, remain. There are risk in every investment. Taking no risks means remaining the same, means drifting towards a dead end in a world that does change. |
647 | 647 |
648 | 648 |
649 With respect to the current situation, the suggested further development plan for \masqmail\ is splitted into a short-time plan and a long-time plan: | 649 With respect to the current situation, the suggested further development plan for \masqmail\ is split into a short-time plan and a long-time plan: |
650 | 650 |
651 \begin{enumerate} | 651 \begin{enumerate} |
652 \item The short-time plan: Add the most needed features, being encryption, authentication, and security wrappers, to the current code base. | 652 \item The short-time plan: Add the most needed features, being encryption, authentication, and security wrappers, to the current code base. |
653 \item The long-time plan: Design a new architecture that satisfies the modern requirements especially the quality requirements. | 653 \item The long-time plan: Design a new architecture that satisfies the modern requirements especially the quality requirements. |
654 \end{enumerate} | 654 \end{enumerate} |
655 | 655 |
656 The background thought is to first do the most needed stuff on the existing code to keep %fixme: erhalten | 656 The background thought is to first do the most needed stuff on the existing code to keep %fixme: erhalten |
657 it usable. This satisfies the urgent needs and removes the time pressure from the development of the new design. After this is done, a new designed \masqmail\ should be developed from scratch. This is the work for the future. It shall, after it is usable and throughout tested, supersede the old \masqmail. | 657 it usable. This satisfies the urgent needs and removes the time pressure from the development of the new design. After this is done, a new designed \masqmail\ should be developed from scratch. This is the work for the future. It shall, after it is usable and throughout tested, supersede the old \masqmail. |
658 | 658 |
659 The basic idea is, regularly developing a new design from scratch while the current version is still in use and gets repaired. Hence a modern design will inherit an old one in regular intervals. This is a very future-proove concept that combines the best of both worlds. The price to pay is only the increased work which gets covered %fixme: uebernommen | 659 The basic idea is, regularly developing a new design from scratch while the current version is still in use and gets repaired. Hence a modern design will inherit an old one in regular intervals. This is a very future-proof concept that combines the best of both worlds. The price to pay is only the increased work which gets covered %fixme: uebernommen |
660 by volunteers that \emph{want} to do it. | 660 by volunteers that \emph{want} to do it. |
661 | 661 |
662 | 662 |
663 | 663 |
664 %fixme: move that sentence to the beginning of the next chapter? | 664 %fixme: move that sentence to the beginning of the next chapter? |