comparison thesis/tex/2-MailTransferAgents.tex @ 109:de590ff06051

changes suggested by schaeffter
author meillo@marmaro.de
date Wed, 26 Nov 2008 09:51:53 +0100
parents 6e2eaf91e59f
children
comparison
equal deleted inserted replaced
108:9ec16cd54ab6 109:de590ff06051
1 \chapter{Mail transfer agents} 1 \chapter{Mail transfer agents}
2 2
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. 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.
4 4
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. 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.
6
7 \section{Advantages of \MTA{}s}
8
9 << why are they important? >> %FIXME
10 6
11 7
12 \section{Types of \MTA{}s} 8 \section{Types of \MTA{}s}
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}.} 9 ``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}.}
14 10
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? 37 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?
42 38
43 This group is of importance in this document. The programs selected for the comparison are ``real \MTA{}s''. 39 This group is of importance in this document. The programs selected for the comparison are ``real \MTA{}s''.
44 40
45 41
46
47 \subsection*{Programs to sort out}
48
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.
50 42
51 \subsection*{Non-\emph{sendmail-compatible} \MTA{}s} 43 \subsection*{Non-\emph{sendmail-compatible} \MTA{}s}
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. 44 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.
53 45
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. 46 Hence all \MTA{}s not having a \emph{sendmail-compatible} interface or not offering it as a compatibility addon, will not be covered here.
251 % names: are they good? 243 % names: are they good?
252 % check the significant number of characters. (intern: 31char, extern: 6char caseless; ProgC p.184) 244 % check the significant number of characters. (intern: 31char, extern: 6char caseless; ProgC p.184)
253 245
254 246
255 247
256 \subsubsection*{masqmail stuff}
257
258 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+.
259
260 %masqmail: mailq, mailrm, runq, rmail, smtpd/in.smtpd
261 %sendmail: hoststat, mailq, newaliases, purgestat, smtpd
262
263 \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.
264
265 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.
266
267 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.
268
269 \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.