docs/diploma

annotate thesis/tex/3-MailTransferAgents.tex @ 218:711f0d3f5dfd

minor change for block quotes
author meillo@marmaro.de
date Sun, 04 Jan 2009 22:57:49 +0100
parents d645ac015c3b
children f88853595b7a
rev   line source
meillo@89 1 \chapter{Mail transfer agents}
meillo@89 2
meillo@217 3 After having analyzed the market for electronic mail and identified upcoming trends, in the last chapter; this chapter takes a look at \mta{}s---the intelligent nodes and thus the most important parts of the email infrastructure. The \MTA{}s will be grouped by similarities first. Then the four most popular \freesw\ \mta{}s, will be presented to the reader in a short overview and with the most important facts. At the end of this chapter these programs will be compared.
meillo@89 4
meillo@117 5
meillo@89 6
meillo@89 7
meillo@120 8 \section{Types of MTAs}
meillo@217 9 ``Mail transfer agent'' is a term covering a variety of programs. One thing is common to them: they transfer email from one senders to recipients.
meillo@89 10
meillo@217 11 This is how Bryan \person{Costales} defines a \mta:
meillo@117 12 \begin{quote}
meillo@217 13 A mail transfer agent (\MTA) is a highly specialized program that delivers mail and transports it between machines, like the post office.
meillo@218 14 \hfill\cite{costales97}
meillo@117 15 \end{quote}
meillo@217 16 \name{The Free Dictionary} is a bit more concrete on the term:
meillo@117 17 \begin{quote}
meillo@217 18 Message Transfer Agent - (\MTA, Mail Transfer Agent): Any program responsible for delivering e-mail messages. Upon receiving a message from a Mail User Agent or another \MTA, [...] it [...] delivers it to any local addressees and/or forwards it to other remote \MTA{}s (routing) for delivery to remote recipients.
meillo@218 19 \hfill\citeweb{website:thefreedictionary}
meillo@117 20 \end{quote}
meillo@89 21
meillo@217 22 Common to all \MTA{}s is the transport of mail to recipients; this is the actual job. Besides this similarity, \MTA{}s can be very different. Some of them have \NAME{POP3} and/or \NAME{IMAP} servers included. Some can fetch mails through these protocols. Others have have all features you can think of. And maybe there are some that do nothing else but transporting email.
meillo@89 23
meillo@117 24 Following is a classification of \mta{}s into groups of similar programs, regarding what is viewable from the outside.
meillo@117 25
meillo@117 26
meillo@120 27 \subsubsection*{Relay-only MTAs}
meillo@89 28 \label{subsec:relay-only}
meillo@217 29 Also called \name{forwarders}. This is the most simple kind of \MTA. It transfers mail only to defined \name{smart hosts}\footnote{\name{smart host}s are \MTA{}s that receives email and route it to the actual destination}. \name{Relay-only} \MTA{}s do not receive mail from outside the system, and they do not deliver locally. All they do is transfer mail to a specified smart host for further relay.
meillo@89 30
meillo@89 31 Most \MTA{}s can be configured to act as such a \name{forwarder}. But this is usually an additional functionality.
meillo@89 32
meillo@217 33 One uses this kind of \MTA\ to give a system the possibility to send mail, without the need to do lots of configuration. In a local network, usually the clients are set up with relay-only \MTA{}s, while there is one mail server that acts as a \name{smart host}. The ``dumb'' clients send mail to this \name{mail server} which does all further work.
meillo@89 34
meillo@217 35 Example programs in that group are: \name{nullmailer}, \name{ssmtp} and \name{esmtp}.
meillo@89 36
meillo@89 37
meillo@117 38 \subsubsection*{Groupware}
meillo@217 39 Normally the term ``groupware'' does not mean one single program, but a suite of programs. They build a framework which is then populated with various modules that provide the actual functionality. Modules for mail transfer, file storage, calendars, resource management, instant messaging, and more, are commonly available.
meillo@89 40
meillo@217 41 These program suites are used if the main work to do is providing integrated communication facilities and team working support for a group of people. Mail transfer is only one part of the problem to solve. The most common scenario are companies. They have \name{groupware} running to provide adequate services for their teams to work efficiently. But one may use \name{groupware} on the home server for his family members also.
meillo@89 42
meillo@217 43 Examples for groupware are: \name{Lotus Notes}, \name{Microsoft Exchange}, \name{OpenGroupware.org}, and \name{eGroupWare}.
meillo@89 44
meillo@89 45
meillo@120 46 \subsubsection*{``Real'' MTAs}
meillo@217 47 There is a third type of \mta{}s in between the minimalistic \name{relay-only} \MTA{}s and the feature loaded \name{groupware}. Those programs may be named ``real \MTA{}s'', or ``proper \MTA{}s'', though there is no common name. They are what is meant with the term ``\mta''---programs that transfer mail between hosts.
meillo@89 48
meillo@217 49 Common to them is their focus on transferring email, while being able to act as \name{smart host}. Their variety ranges from ones mostly restricted to mail transfer (e.g.\ \qmail) to others having interfaces for adding further mail processing modules (e.g.\ \postfix). This group covers everything in between the other two groups.
meillo@89 50
meillo@217 51 ``Real \MTA{}s'' are of importance in this document. All programs selected for the comparison in the following section are ``real \MTA{}s''. \masqmail\ is one too.
meillo@89 52
meillo@89 53
meillo@117 54 \subsubsection*{Other segmenting}
meillo@124 55 \name{Mail transfer agents} can also be split in other ways.
meillo@217 56 Due to \sendmail's significance---described in section \ref{sec:sendmail}---compatibility interfaces for \sendmail\ are important for \unix\ \MTA{}s. Being not \emph{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 a \mta. %todo: how many MTAs are sendmail-compatible?
meillo@124 57 \MTA{}s not having a \emph{sendmail-compatible} interface or not offering it as a compatibility add-on, will not be covered here. One example for such a program is \name{Apache James}. %FIXME: check if correct
meillo@89 58
meillo@217 59 Another separation can be done between \freesw\ \MTA{}s and proprietary ones. Many of the \MTA{}s for \unix\ systems are \freesw. Only these are regarded in the following sections, because comparing \freesw\ with proprietary or commercial software is not what typical users of programs like \masqmail\ do. %fixme: what are typical users?
meillo@217 60 Comparison with non-free programs may be a point for large \freesw\ projects, trying to step into the business world. Small projects, mostly used by individuals at home, %fixme: is this the right target field? see chap02
meillo@217 61 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.
meillo@89 62
meillo@89 63
meillo@89 64
meillo@89 65
meillo@120 66 \section{Popular MTAs}
meillo@89 67
meillo@130 68 This section introduces a selection of popular \MTA{}s; they are the most likely substitutes for \masqmail. All are \emph{sendmail-compatible} ``smart'' \freesw\ \MTA{}s that focus on mail transfer, as is \masqmail.
meillo@89 69
meillo@217 70 The programs chosen to be compared, with each other and with \masqmail, are: \sendmail, \exim, \qmail, and \postfix. They are the most important representatives of the regarded group.
meillo@117 71
meillo@145 72
meillo@145 73 \subsection{Market share analysis}
meillo@145 74
meillo@217 75 \MTA\ statistics are rare, differ, and good data is hard to collect. These points are bad if one wants good statistics. Thus it is obvious there are only few available.
meillo@217 76
meillo@217 77 Table \ref{tab:mta-market-share} shows the most used \MTA{}s determined by three different statistics. The first was done by Daniel~J.\ \person{Bernstein} (the author of \qmail) in 2001 \cite{bernstein01}. The second is by \person{Simpson} and \person{Bekman} in 2007 and was published on \name{O'ReillyNet} \cite{simpson07}. And the third is from \name{MailRadar.com} with unknown date\footnote{The footer of the website shows ``Copyright 2007'' but more likely does this refer to the whole website.} \citeweb{mailradar:mta-stats}.
meillo@117 78
meillo@130 79 \begin{table}
meillo@130 80 \begin{center}
meillo@130 81 \input{input/mta-market-share.tex}
meillo@130 82 \end{center}
meillo@130 83 \caption{Market share of \MTA{}s}
meillo@130 84 \label{tab:mta-market-share}
meillo@130 85 \end{table}
meillo@89 86
meillo@217 87 All surveys show high market shares for the four \MTA{}s: \sendmail, \exim, \qmail, and \postfix. Only the \name{Microsoft} mail server software and \name{IMail} have comparable large shares. Other \freesw\ \mta{}s (\name{smail}, \name{zmailer}, \name{MMDF}, \name{courier-mta}) are less important and seldom used.
meillo@130 88
meillo@217 89 The three surveys base on different data. \person{Bernstein} took 1\,000\,000 randomly chosen \NAME{IP} addresses, containing 39\,206 valid hosts; 958 of them accepted \NAME{SMTP} connections. The \person{Simpson} and \person{Bekman} survey used only domains owned by companies; in total 400\,000 hosts. \name{MailRadar} scanned 2\,818\,895 servers, leading to 59\,209 accepted connections.
meillo@130 90
meillo@217 91 All surveys show \sendmail\ to be the most popular \MTA. \postfix, \qmail, and \exim\ are among the best seven in each. \exim\ has slightly smaller shares than the other two. The four together share more than half of the market according to \person{Bernstein} and the \name{MailRadar} statistics. \person{Simpson} and \person{Bekman} have their share to be somewhere between a third and the half. This uncertainty comes from the large amount of unidentifieable \MTA{}s.
meillo@143 92
meillo@217 93 The 22 percent of \name{mail security layers} in the \name{O'Reilly} survey is remarkable. Mail security layers are software guards between the network and the \mta\ that filter unwanted mail before it reaches the \MTA. This increases security by filtering malicious content and by blocking attacks against the \MTA. This large share may be a result of only regarding business mail servers. The problem concerning the survey is the deguise of the \mta\ working behind the security layer. It seems wrong to assume equal shares for the \MTA{}s behind the guards as for the unguarded \MTA{}s, because mail security layers will be more often used to guard weak \MTA{}s, as strong ones do not need them so much. This needs to be kept in mind when using the \name{O'Reilly} survey.
meillo@145 94
meillo@217 95 The date of the \name{Mailradar} statistics ist not mentioned with it; a mail to \name{Mailradar} asking for information was not replied, unfortunately. However, it seems quite sure that the statistics were published after 2001, caused by the \sendmail\ and \postfix\ shares. But to decide whether before or after the one from \name{O'Reilly} would be just guessing.
meillo@145 96
meillo@145 97
meillo@145 98 \subsection{The four major Free Software MTAs}
meillo@143 99
meillo@217 100 Now follows a small introduction to the four programs chosen for comparison. \masqmail\ is not presented here, as it was already introduced in chapter \ref{chap:introduction}. Longer introductions, including analysis and comparison, were written by Jonathan \person{de Boyne Pollard} \cite{jdebp}.
meillo@89 101
meillo@117 102
meillo@117 103
meillo@120 104 \subsubsection*{sendmail}
meillo@89 105 \label{sec:sendmail}
meillo@217 106 \sendmail\ is the best known \mta, since it was one of the first and surely the one that made \MTA{}s popular. It also was shipped as default \MTA{}s by many vendors of \unix\ systems. %fixme: ref
meillo@89 107
meillo@217 108 The program was written by Eric \person{Allman} as the successor of his program \name{delivermail}. \person{Allman} was not the only one working on the program. Other people developed own versions of it and a variety of flavors came up, especially in the late eighties when Allman was inactive. %fixme: ref
meillo@89 109
meillo@217 110 \sendmail\ is focused on transferring mails between different protocols and networks, this lead to a very flexible, though complex, configuration.
meillo@89 111
meillo@217 112 It was first released with \NAME{BSD} 4.1c in 1983. The latest version is 8.14.3 from May 2008. The program is distributed under the \name{Sendmail License} as both, \freesw\ and proprietary software.
meillo@89 113
meillo@128 114 Further development will go into the project \name{MeTA1} (the former name was \name{sendmail X}) which succeeds \sendmail.
meillo@89 115
meillo@217 116 More information can be found on the \sendmail\ homepage \citeweb{sendmail:homepage} and in the, so called, ``Bat Book'' \cite{costales97}.
meillo@89 117
meillo@89 118
meillo@117 119
meillo@120 120 \subsubsection*{exim}
meillo@117 121 \label{sec:exim}
meillo@217 122 \exim\ was started in 1995 by Philip \person{Hazel} at the \name{University of Cambridge}. It is a fork of \name{smail-3}, and inherited a monolithic architecture similar to \sendmail's. But having no separation of the individual components of the system did not hurt. Its security is quite good. %fixme: ref
meillo@117 123
meillo@217 124 \exim\ is highly configurable, especially in the field of mail policies. This makes it easy to specify how mail is routed through the system and who is allowed to send email to whom. Also interfaces for integration of virus and spam checkers are provided by design. %fixme: ref
meillo@117 125
meillo@117 126 The program is \freesw, released under the \GPL. The latest stable version is 4.69 from December 2007.
meillo@117 127
meillo@217 128 One finds \exim\ on its homepage \citeweb{exim:homepage}. The standard literature is \person{Hazel}'s \exim\ book \cite{hazel01}.
meillo@117 129
meillo@117 130
meillo@117 131
meillo@120 132 \subsubsection*{qmail}
meillo@89 133 \label{sec:qmail}
meillo@217 134 \qmail\ is seen by its community as ``a modern SMTP server which makes sendmail obsolete'' \citeweb{qmail:homepage2}. It was written by Daniel~J.\ \person{Bernstein} starting in 1995. His primary goal was to create a secure \MTA\ to replace the popular, but vulnerable, \sendmail. %fixme: ref
meillo@89 135
meillo@132 136 \qmail\ first introduced many innovative concepts in \mta\ design and is generally seen as the first security-aware \MTA\ developed. %fixme:ref
meillo@117 137 %fixme: what about mmdf?
meillo@89 138
meillo@132 139 Since November 2007, \qmail\ is released in the \name{public domain} which makes it \freesw. The latest release is 1.03 from July 1998.
meillo@89 140
meillo@155 141 The programs homepages are \citeweb{qmail:homepage1} and \citeweb{qmail:homepage2}. Further information about \qmail\ is available with Dave \person{Sill}'s ``Life with qmail'' \cite{lifewithqmail}.
meillo@89 142
meillo@89 143
meillo@117 144
meillo@120 145 \subsubsection*{postfix}
meillo@89 146 \label{sec:postfix}
meillo@217 147 The \postfix\ project started in 1999 at \name{IBM research}, then called \name{VMailer} or \name{IBM Secure Mailer}. Wietse \person{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.
meillo@89 148
meillo@132 149 Today \postfix\ is taken by many \unix\ systems and \gnulinux\ distributions as default \MTA.
meillo@89 150
meillo@132 151 The latest stable version is numbered 2.5.5 from August 2008. \postfix\ is covered by the \name{IBM Public License 1.0} which is a \freesw\ license.
meillo@89 152
meillo@217 153 Additional information can be retrieved from the program's homepage \citeweb{postfix:homepage}. \person{Dent}'s \postfix\ book \cite{dent04} claims to be ``the definitive guide'', and it is.
meillo@89 154
meillo@89 155
meillo@89 156
meillo@89 157
meillo@89 158
meillo@89 159
meillo@120 160 \section{Comparison of MTAs}
meillo@89 161
meillo@155 162 This section does not try to provide an overall \MTA\ comparison, because this is already done by others. Remarkable comparisons are the one by Dan \person{Shearer} \cite{shearer06} and a discussion on the mailing list \name{plug@lists.q-linux.com} \cite{plug:mtas}. Tabulary overviews may be found at \citeweb{mailsoftware42}, \citeweb{wikipedia:comparison-of-mail-servers}, and \cite[section 1.9]{lifewithqmail}.
meillo@89 163
meillo@217 164 Here provided is an overview on important properties of the four previously introduced \MTA{}s. The data comes from the above stated sources and is collected in table \ref{tab:mta-comparison}.
meillo@126 165
meillo@117 166 \begin{table}
meillo@217 167 % FIXME: improve table data!!!
meillo@126 168 \begin{center}
meillo@126 169 \input{input/mta-comparison.tex}
meillo@126 170 \end{center}
meillo@126 171 \caption{Comparison of MTAs}
meillo@126 172 \label{tab:mta-comparison}
meillo@117 173 \end{table}
meillo@89 174
meillo@89 175
meillo@201 176 \subsubsection*{Architecture}
meillo@89 177
meillo@132 178 Architecture is most important when comparing \MTA{}s. Many other properties of a program depend on its architecture. %fixme: add ref?
meillo@211 179 Munawar \person{Hafiz} \cite{hafiz05} discusses in detail on \mta\ architecture, comparing \sendmail, \qmail, \postfix, and \name{sendmail X}. Jonathan \person{de Boyne Pollard}'s \MTA\ review \cite{jdebp} is a source too.
meillo@89 180
meillo@132 181 Two different architecture types show off: monolithic and modular \mta{}s.
meillo@130 182
meillo@217 183 Monolithic \MTA{}s are \sendmail, \name{smail}, \exim, and \masqmail. They all consist of one single \emph{setuid root}\footnote{\emph{setuid root} lets a program run with the rights of its owner, here root. This is considered to be a security risk often. Thus it it should be avoided if possible.} binary which does all the work.
meillo@130 184
meillo@217 185 Modular \MTA{}s are \NAME{MMDF}, \qmail, \postfix, and \name{MeTA1}. They consist of several programs, each doing a part of the overall job. The different programs run with the least permissions the need, and \emph{setuid root} can be avoided.
meillo@130 186
meillo@217 187 The architecture does not directly define the program's security, but ``[t]he goal of making a software secure can be better achieved by making the design simple and easier to understand and verify''\cite[chapter 6]{hafiz05}. \exim, though being monolithic, has a fairly clean security record. But it is very hard to keep the security up, as the program growth. Wietse \person{Venema} (the author of \postfix) says, it was the architecture that enabled \postfix\ to grow without running into security problems. \cite[page 13]{venema:postfix-growth}
meillo@130 188
meillo@217 189 The modular design, with each sub-program doing one part of the overall job, conforms to the \name{Unix Philosophy}. The Unix Philosophy \cite{gancarz95} demands ``small is beautiful'' and ``make each program do one thing well''. Monolithic \MTA{}s fail here.
meillo@130 190
meillo@132 191 Today modular \mta\ architectures are the state-of-the-art.
meillo@89 192
meillo@89 193
meillo@217 194 \subsubsection*{Spam checking and content processing}
meillo@89 195
meillo@217 196 << FIXME >> % fixme
meillo@89 197
meillo@89 198
meillo@217 199 \subsubsection*{Future requirements}
meillo@89 200
meillo@217 201 In chapter \ref{chap:market-analysis}, it was tried to figure out trends and future requirements for \MTA{}s. The four programs are compared on these (possible) future requirements now.
meillo@126 202
meillo@217 203 The first trend was provider independence, requiring easy configuration. \postfix\ seems to do best here. It used primary two configuration files (\path{master.cf} and \path{main.cf}) which are easy to manage. \sendmail\ appears to have a bad position. Its configuration file \path{sendmail.cf} is cryptic and very complex (it has legendary Turing-completeness) thus it needs simplification wrappers around it to provide easier configuration. There exist the \name{m4} macros to generate \path{sendmail.cf}, but adjusting the generated result by hand appears to be nessesary for non-trivial configurations. \qmail's configuration files are simple, but the whole system is complex to set up; it requires various system users and is hardly usable without applying several patches to add basic functionality. \name{netqmail} is the community effort to help here. \exim\ has only one single configuration file (\path{exim.conf}), but it suffers most from its flexibility---like \sendmail. Flexibility and easy configuration are almost always contrary goals.
meillo@217 204
meillo@217 205 As second trend, the decreasing nessesarity for high performance was identified. This goes along with the move of \MTA{}s from service providers to home servers. \postfix\ focuses much on performance, this might not be an important point then. Of course there still will be the need for high performance \MTA{}s, but a growing share of the market will not require high performance. Performance is related to simplicity, which effects security. Increasing performance does in most times decrease the other two. Simple \mta{}s not aiming for highest performance are what is needed in future. The simple of \qmail, still being fast, seems to be a good example.
meillo@217 206
meillo@217 207 The third trend---even more security awareness---is addressed by each of the four programs. It seems as if all widely used \mta{}s provide good security nowadays. Even \sendmail\ can be considered secure today. %fixme:ref
meillo@217 208 But the modular architecture, used by \qmail\ and \postfix, is generally seen to be conceptually more secure, however. %fixme: ref
meillo@132 209 \sendmail's creators have started \name{MeTA1}, a modular \MTA\ merging the best of \qmail\ and \postfix, to replace the old \sendmail. It will be interesting to watch \exim's future---will it become modular too?
meillo@126 210
meillo@126 211
meillo@93 212
meillo@193 213 \section{Result}
meillo@193 214
meillo@193 215 %fixme: write a result here
meillo@89 216
meillo@89 217
meillo@117 218
meillo@117 219
meillo@132 220 %todo: my own poll (?)
meillo@117 221
meillo@117 222
meillo@132 223 %<< complexity >> << security >> << simplicity of configuration and administration >> << flexibility of configuration and administration >> << code size >> << code quality >> << documentation (amount and quality) >> << community (amount and quality) >> << used it myself >> << had problems with it >>
meillo@117 224
meillo@117 225
meillo@132 226 %<< quality criteria >> << standards of any kind >> << how to compare? >> << (bewertungsmatrix) objectivity >> << how many criteria for ``good''? >>
meillo@133 227