rev |
line source |
meillo@89
|
1 \chapter{Mail transfer agents}
|
meillo@89
|
2
|
meillo@89
|
3 After having read about the history of electronic mail and the basics of \mta{}s in the last chapter, this chapter introduces a group of \mta{}s. Among them, the already mentioned \sendmail. The selected group will be delimited against other groups of \MTA{}s, which are described as well.
|
meillo@89
|
4
|
meillo@89
|
5 The chosen programs will be presented to the reader in a short overview and with the most important facts. The next chapter will show a comparison of these programs in several disciplines.
|
meillo@89
|
6
|
meillo@99
|
7 \section{Advantages of \MTA{}s}
|
meillo@99
|
8
|
meillo@99
|
9 << why are they important? >> %FIXME
|
meillo@99
|
10
|
meillo@89
|
11
|
meillo@89
|
12 \section{Types of \MTA{}s}
|
meillo@89
|
13 ``Mail transfer agent'' is a term covering a variety of programs. One thing is common to them: they transfer email from one \emph{thing} to another. These \emph{things} can be hosts, meaning independent machines, or protocols like \NAME{SMTP} and \NAME{UUCP}, between which mail is transfered.\footnote{\sendmail{}'s initial purpose was moving mail between \NAME{UUCP}, \NAME{SMTP}, and \name{Berknet}.}
|
meillo@89
|
14
|
meillo@89
|
15 Beside this common property, \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
|
16
|
meillo@89
|
17 Following are groups of \mta{}s that will \emph{not} be regarded further.
|
meillo@89
|
18
|
meillo@92
|
19 \subsection*{Relay-only \MTA{}s}
|
meillo@89
|
20 \label{subsec:relay-only}
|
meillo@89
|
21 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.
|
meillo@89
|
22
|
meillo@89
|
23 Most \MTA{}s can be configured to act as such a \name{forwarder}. But this is usually an additional functionality.
|
meillo@89
|
24
|
meillo@89
|
25 One would use such a program 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 a \name{relay-only} \MTA, while there is one \name{mail server} that acts as a \name{smart host}. The ``dumb'' clients send mail to this one \name{mail server} which does all the work.
|
meillo@89
|
26
|
meillo@89
|
27 Examples for that group are: \name{nullmailer}, \name{ssmtp} and \name{esmtp}.
|
meillo@89
|
28
|
meillo@89
|
29
|
meillo@92
|
30 \subsection*{Groupware}
|
meillo@89
|
31 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 actual funktionality. Modules for mail transfer, file storage, calendars, resource management, instant messaging, etc., are commonly available.
|
meillo@89
|
32
|
meillo@89
|
33 One would use one of these program suites if the main work to do is not mail transfer, but providing integrated communication facilities and team working support for a group of people. The most common scenario are companies. They have \name{groupware} running to provide adequate services for their teams to work efficently. But one may use \name{groupware} on the home server for his family members also.
|
meillo@89
|
34
|
meillo@89
|
35 Examples are: \name{Lotus Notes}, \name{Microsoft Exchange}, \name{OpenGroupware.org} and \name{eGroupWare}.
|
meillo@89
|
36
|
meillo@89
|
37
|
meillo@92
|
38 \subsection*{``Real'' \MTA{}s}
|
meillo@89
|
39 There is a third type of \mta{}s in between the minimalistic \name{relay-only} \MTA{}s and the bloated \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''.
|
meillo@89
|
40
|
meillo@89
|
41 Common to them is their focus on transfering email, while being able to act as \name{smart host}. Their variety ranges from ones mostly restricted to mail transfer (\name{qmail}) to others already having interfaces for adding further mail processing modules (\name{postfix})---thus everything in between the other two groups. %FIXME: are postfix and qmail good examples?
|
meillo@89
|
42
|
meillo@89
|
43 This group is of importance in this document. The programs selected for the comparison are ``real \MTA{}s''.
|
meillo@89
|
44
|
meillo@89
|
45
|
meillo@89
|
46
|
meillo@92
|
47 \subsection*{Programs to sort out}
|
meillo@89
|
48
|
meillo@89
|
49 \name{Mail transfer agent}s can be segmented in various ways, apart from the classification above. Groups of programs wiproperties significantly different from \masqmail\ will be sorted out now.
|
meillo@89
|
50
|
meillo@92
|
51 \subsection*{Non-\emph{sendmail-compatible} \MTA{}s}
|
meillo@89
|
52 Due to \sendmail's significance---described in section \ref{sec:sendmail}---compatiblity interfaces for \sendmail\ are of importance for \unix\ \MTA{}s. Being not \emph{sendmail-compatible} does not need to matter for some fields of action, but makes the program ineligible for serving as a general purpose \MTA\ on \unix\ systems.
|
meillo@89
|
53
|
meillo@89
|
54 Hence all \MTA{}s not having a \emph{sendmail-compatible} interface or not offering it as a compatibility addon, will not be covered here.
|
meillo@89
|
55
|
meillo@89
|
56 An Examples here is \name{Apache James}. %FIXME: check if correct
|
meillo@89
|
57
|
meillo@89
|
58
|
meillo@92
|
59 \subsection*{Non-free software}
|
meillo@89
|
60 Only programs being \freesw\ are regarded, because comparing \freesw\ with proprietary or commercial software is not what typical users of programs like \masqmail\ do. Comparison with those 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, need to be compared against other projects of similar shape.
|
meillo@89
|
61
|
meillo@89
|
62 The comparison should be seen from \masqmail's point of view, so non-free software is out of the way.
|
meillo@89
|
63
|
meillo@89
|
64
|
meillo@89
|
65
|
meillo@89
|
66 \section{Popular \MTA{}s}
|
meillo@89
|
67 The programs remaining are \emph{sendmail-compatible} ``smart'' \MTA{}s that focus on mail transfer and are \freesw. One would not use a program for a job it is not suited for. Therefor only \mta{}s that are mostly similar to \masqmail\ are regarded.
|
meillo@89
|
68
|
meillo@89
|
69 For the comparision, five programs are taken. These are: \sendmail, \name{qmail}, \name{postfix}, \name{exim}, and \masqmail. The four alternatives to \masqmail\ are the most important representatives of the regarded group. % FIXME: add ref that affirm that
|
meillo@89
|
70
|
meillo@89
|
71 \name{courier-mta} is also a member of this group, being even closer to \name{groupware} than \name{postfix}. It is excluded here, because the \NAME{IMAP} and webmail parts of the mail server suite are more in focus than its \MTA. Common mail server setups even bundle \name{courier-imap} with \name{postfix}.
|
meillo@89
|
72
|
meillo@89
|
73 Other members are: \name{smail}, \name{zmailer}, \name{mmdf}, and more; they all are less important and rarely used.
|
meillo@89
|
74
|
meillo@89
|
75 Following is a small introduction to each of the five programs chosen for comparision.
|
meillo@89
|
76
|
meillo@92
|
77 \subsection*{\sendmail}
|
meillo@89
|
78 \label{sec:sendmail}
|
meillo@89
|
79 \sendmail\ is the most popular \mta. Since it was one of the first \MTA{}s and was shipped by many vendors of \unix\ systems.
|
meillo@89
|
80
|
meillo@89
|
81 The program was written by Eric Allman as the successor of his program \name{delivermail}. \sendmail\ was first released with \NAME{BSD} 4.1c in 1983. 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.
|
meillo@89
|
82
|
meillo@89
|
83 \sendmail\ is focused on transfering mails between different protocols and networks, this lead to a very flexible (though complex) configuration.
|
meillo@89
|
84
|
meillo@89
|
85 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 of \name{Sendmail, Inc.}.
|
meillo@89
|
86
|
meillo@89
|
87 Further development will go into the project \name{MeTA1} which succeeds \sendmail.
|
meillo@89
|
88
|
meillo@89
|
89 More information can be found on the \sendmail\ homepage \citeweb{sendmail:homepage} and on \citeweb{wikipedia:sendmail} and \citeweb{jdebp}.
|
meillo@89
|
90
|
meillo@89
|
91
|
meillo@92
|
92 \subsection*{\name{qmail}}
|
meillo@89
|
93 \label{sec:qmail}
|
meillo@89
|
94 \name{qmail} is seen by its community as ``a modern SMTP server which makes sendmail obsolete''. It was written by Daniel~J.\ Bernstein starting in 1995. His primary goal was to create a secure \MTA\ to replace the popular, but vulnerable, \sendmail.
|
meillo@89
|
95
|
meillo@89
|
96 \name{qmail} first introduced may innovative concepts in \mta\ design and is generally seen as the first security-aware \MTA\ developed.
|
meillo@89
|
97
|
meillo@89
|
98 Since November 2007, \name{qmail} is released in the \name{public domain} which makes it \freesw. The latest release is 1.03 from July 1998.
|
meillo@89
|
99
|
meillo@89
|
100 The programs homepages are \citeweb{qmail:homepage1} and \citeweb{qmail:homepage2}. Further information about \name{qmail} is available on \citeweb{lifewithqmail}, \citeweb{wikipedia:qmail} and \citeweb{jdebp}.
|
meillo@89
|
101
|
meillo@89
|
102
|
meillo@92
|
103 \subsection*{\name{postfix}}
|
meillo@89
|
104 \label{sec:postfix}
|
meillo@89
|
105 The \name{postfix} project was started in 1999 at \name{IBM research}, then called \name{VMailer} or \name{IBM Secure Mailer}. 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, \name{postfix} was mainly designed after qmail's architecture to gain security. But in contrast to \name{qmail} it aims much more on being fast and full-featured.
|
meillo@89
|
106
|
meillo@89
|
107 Today \name{postfix} is taken by many \unix systems and \gnulinux distributions as default \MTA.
|
meillo@89
|
108
|
meillo@89
|
109 The latest stable version is numbered 2.5.5 from August 2008. \name{postfix} is covered by the \name{IBM Public License 1.0} which is a \freesw\ license.
|
meillo@89
|
110
|
meillo@89
|
111 Additional information is available on the program's homepage \citeweb{postfix:homepage}, on \citeweb{jdebp} and \citeweb{wikipedia:postfix}.
|
meillo@89
|
112
|
meillo@89
|
113
|
meillo@92
|
114 \subsection*{\name{exim}}
|
meillo@89
|
115 \label{sec:exim}
|
meillo@89
|
116 \name{exim} was started in 1995 by Philip Hazel at the \name{University of Cambridge}. Its age is about the same as \name{qmail}'s, but the architecture is totally different.
|
meillo@89
|
117
|
meillo@89
|
118 While \name{qmail} took a completely new approach, \name{exim} forked of \name{smail-3}, and therefor is monolitic like that and like \sendmail. But having no separation of the individual components of the system, like \name{qmail} and \name{postfix} have, did not hurt. Its security is comparably good.
|
meillo@89
|
119
|
meillo@89
|
120 \name{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 check programs are provided by design.
|
meillo@89
|
121
|
meillo@89
|
122 The program is \freesw, released under the \GPL. The latest stable version is 4.69 from December 2007.
|
meillo@89
|
123
|
meillo@89
|
124 One finds \name{exim} on its homepage \citeweb{exim:homepage}. More information about it can be retrieved from \citeweb{wikipedia:exim} and \citeweb{jdebp}.
|
meillo@89
|
125
|
meillo@89
|
126
|
meillo@92
|
127 \subsection*{\masqmail}
|
meillo@89
|
128 \label{sec:masqmail}
|
meillo@89
|
129 The \masqmail\ program was written by Oliver Kurth, starting in 1999. His aim was to create a small \mta\ which is especially focused on computers with dial-up connections to the internet. \masqmail\ is easy configurable for situations which are rarely solveable with the common \MTA{}s.
|
meillo@89
|
130
|
meillo@89
|
131 \masqmail\ queues mail for destinations outside the local network if no connection to the internet is online. If the machine goes online, this mail is sent. Mail to local machines is sent immediately.
|
meillo@89
|
132
|
meillo@89
|
133 While the other \MTA{}s are more general purpose \MTA{}s, \masqmail\ aims on special situations only. Nevertheless can it handle ordinary mail transfers too.
|
meillo@89
|
134
|
meillo@89
|
135 \masqmail\ is released under the \GPL, which makes it \freesw. The latest stable version is 0.2.21 from November 2005.
|
meillo@89
|
136
|
meillo@89
|
137 The program's new homepage \citeweb{masqmail:homepage} provides further information about this \MTA.
|
meillo@89
|
138
|
meillo@89
|
139
|
meillo@89
|
140
|
meillo@89
|
141
|
meillo@89
|
142 \section{Comparison of \MTA{}s}
|
meillo@89
|
143
|
meillo@89
|
144 % http://shearer.org/MTA_Comparison
|
meillo@89
|
145 % http://www.geocities.com/mailsoftware42/
|
meillo@89
|
146 % http://fanf.livejournal.com/50917.html
|
meillo@89
|
147 % http://archives.neohapsis.com/archives/postfix/2006-07/1762.html
|
meillo@89
|
148 % http://www.oreillynet.com/lpt/a/6849
|
meillo@89
|
149 % http://www.mailradar.com/mailstat/
|
meillo@89
|
150
|
meillo@89
|
151 \subsection{First release}
|
meillo@89
|
152 sendmail: 1983
|
meillo@89
|
153
|
meillo@89
|
154 postfix: 1999
|
meillo@89
|
155
|
meillo@89
|
156 qmail: 1996 (first beta 0.70), 1997 (first general 1.0)
|
meillo@89
|
157
|
meillo@89
|
158 exim: 1995
|
meillo@89
|
159
|
meillo@89
|
160 masqmail: 1999
|
meillo@89
|
161
|
meillo@89
|
162 exchange: 1993
|
meillo@89
|
163
|
meillo@89
|
164
|
meillo@89
|
165 \subsection{Lines of code (with sloccount on debian packages)}
|
meillo@89
|
166 sendmail: 93k
|
meillo@89
|
167
|
meillo@89
|
168 postfix: 92k
|
meillo@89
|
169
|
meillo@89
|
170 qmail: 18k
|
meillo@89
|
171
|
meillo@89
|
172 exim: 54k
|
meillo@89
|
173
|
meillo@89
|
174 masqmail: 14k
|
meillo@89
|
175
|
meillo@89
|
176 exchange: (no source available)
|
meillo@89
|
177
|
meillo@89
|
178
|
meillo@89
|
179 \subsection{Architecture}
|
meillo@89
|
180 sendmail: monolitic
|
meillo@89
|
181
|
meillo@89
|
182 postfix: modular
|
meillo@89
|
183
|
meillo@89
|
184 qmail: modular
|
meillo@89
|
185
|
meillo@89
|
186 exim: monolitic
|
meillo@89
|
187
|
meillo@89
|
188 masqmail: monolitic
|
meillo@89
|
189
|
meillo@92
|
190 Like its anchestor \sendmail, \masqmail\ is a monolitic program. It consists of only one \emph{setuid root}\footnote{Runs as user root, no matter which user invoked it.}\index{setuid root} binary file, named \path{masqmail}. All functionality is included in it; of course some more comes from dynamic libraries linked.
|
meillo@92
|
191
|
meillo@92
|
192
|
meillo@89
|
193 exchange: (unknown)
|
meillo@89
|
194
|
meillo@89
|
195
|
meillo@89
|
196 \subsection{Design goals}
|
meillo@89
|
197 sendmail: flexibility
|
meillo@89
|
198
|
meillo@89
|
199 postfix: performance and security
|
meillo@89
|
200
|
meillo@89
|
201 qmail: security
|
meillo@89
|
202
|
meillo@89
|
203 exim: general, flexible \& extensive facilities for checking
|
meillo@89
|
204
|
meillo@89
|
205 masqmail: for non-permanent internet connection
|
meillo@89
|
206
|
meillo@89
|
207 exchange: groupware
|
meillo@89
|
208
|
meillo@89
|
209
|
meillo@89
|
210 \subsection{Market share (by Bernstein in 2001)}
|
meillo@89
|
211 sendmail: 42\%
|
meillo@89
|
212
|
meillo@89
|
213 postfix: 1.6\%
|
meillo@89
|
214
|
meillo@89
|
215 qmail: 17\%
|
meillo@89
|
216
|
meillo@89
|
217 exim: 1.6\%
|
meillo@89
|
218
|
meillo@89
|
219 masqmail: (unknown)
|
meillo@89
|
220
|
meillo@89
|
221 exchange: 18\%
|
meillo@89
|
222
|
meillo@89
|
223
|
meillo@89
|
224
|
meillo@89
|
225
|
meillo@99
|
226 \subsection{complexity}
|
meillo@89
|
227
|
meillo@99
|
228 \subsection{security}
|
meillo@89
|
229
|
meillo@99
|
230 \subsection{simplicity of configuration and administration}
|
meillo@89
|
231
|
meillo@99
|
232 \subsection{flexibility of configuration and administration}
|
meillo@89
|
233
|
meillo@99
|
234 \subsection{code size}
|
meillo@89
|
235
|
meillo@99
|
236 \subsection{code quality}
|
meillo@89
|
237
|
meillo@99
|
238 \subsection{documentation (amount and quality)}
|
meillo@89
|
239
|
meillo@99
|
240 \subsection{community (amount and quality)}
|
meillo@89
|
241
|
meillo@99
|
242 \subsection{used it myself}
|
meillo@89
|
243
|
meillo@99
|
244 \subsection{ had problems with it}
|
meillo@89
|
245
|
meillo@89
|
246
|
meillo@89
|
247
|
meillo@89
|
248
|
meillo@99
|
249 << quality criteria >> %FIXME
|
meillo@99
|
250
|
meillo@99
|
251 << standards of any kind >> %FIXME
|
meillo@99
|
252
|
meillo@99
|
253 << how to compare? >> %FIXME
|
meillo@99
|
254
|
meillo@99
|
255 << (bewertungsmatrix) objectivity >> %FIXME
|
meillo@99
|
256
|
meillo@99
|
257 << how many criterias for ``good''? >> %FIXME
|
meillo@99
|
258
|
meillo@93
|
259
|
meillo@93
|
260
|
meillo@93
|
261
|
meillo@89
|
262
|
meillo@89
|
263
|
meillo@92
|
264 \subsubsection*{masqmail stuff}
|
meillo@89
|
265
|
meillo@92
|
266 The \masqmail\ executable can be called under various names for \name{sendmail-compatibility} reasons. This is commonly organized by creating symbolic links with with different names to the \masqmail\ executable. These are \path{/usr/lib/sendmail} and \path{/usr/sbin/sendmail} because many programs expect a \mta\ to be located there. Further more \sendmail\ provides shortcuts by calling it with a different name instead of supplying command line arguments. The best known of it is \path{mailq}, which is equivilent to calling the \MTA\ with the argument \verb+-bq+. \masqmail\ reacts to the names \path{mailq}, \path{smtpd}, \path{mailrm}, \path{runq}, \path{rmail}, and \path{in.smtpd}. The last four are an addition to \sendmail. Not implemented is the name \path{newaliases} because it is not relevant to \masqmail. To provide the command nonetheless, one may write a shell script located at \path{/usr/bin/newaliases}, that simply invokes \verb+masqmail -bi+.
|
meillo@89
|
267
|
meillo@92
|
268 %masqmail: mailq, mailrm, runq, rmail, smtpd/in.smtpd
|
meillo@92
|
269 %sendmail: hoststat, mailq, newaliases, purgestat, smtpd
|
meillo@89
|
270
|
meillo@92
|
271 \masqmail\ is written in the \NAME{C} programming language. The program, as of version 0.2.21, consists of 34 source code and eight header files, containing about 9,000 lines of code\footnote{Measured with \name{sloccount} by David A.\ Wheeler.}. Additionally, it includes a \name{base64} implementation (about 300 lines) and \name{md5} code (about 150 lines). For systems that do not provide \name{libident}, this library is distributed as well (circa 600 lines); an available shared library however has higher precedence in linking.
|
meillo@89
|
272
|
meillo@92
|
273 The only mandatory dependency is \name{glib}---a cross-platform software utility library, originated in the \NAME{GTK+} project. It provides safer replacements for many standard library functions. (The unsafe \verb+sprintf()+ is one example.) Also it offers handy data containers, easy-to-use implementations of data structures, and much more.
|
meillo@89
|
274
|
meillo@92
|
275 With \masqmail\ comes the small tool \path{mservdetect}; it helps setting up a configuration that uses the \name{mserver} system to detect the online state. Two other binaries get compiled for testing purposes: \path{readtest} and \path{smtpsend}. All three programms use \masqmail\ source code; they only add a file with a \verb+main()+ function each.
|
meillo@89
|
276
|
meillo@92
|
277 \masqmail\ does not provide an interface for modules with additional functionality. There exists no add-on or module system. But the code is separated by function to the various source files, and some functional parts can be included or excluded by defining symbols. This means adding some argument (like \verb+--enable-maildir+) to the \verb+configure+ call. Thus the concerning code gets not removed by the preprocessor.
|