Mercurial > docs > diploma
annotate thesis/attic/old/1-Masqmail.tex @ 383:f180f38d4ca9
corrected the last part of ch05
author | meillo@marmaro.de |
---|---|
date | Fri, 06 Feb 2009 12:09:07 +0100 (2009-02-06) |
parents | 2aad3d950640 |
children |
rev | line source |
---|---|
34 | 1 \chapter{\masqmail} |
27 | 2 |
3 %TODO: have text by oliver here? | |
4 | |
5 | |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
6 \section{Target field} |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
7 Its original author, Oliver Kurth, sees \masqmail\ so: |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
8 \begin{quote} |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
9 MasqMail is a mail server designed for hosts that do not have a permanent internet connection eg. a home network or a single host at home. It has special support for connections to different ISPs. It replaces sendmail or other MTAs such as qmail or exim. |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
10 \end{quote} |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
11 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
12 \masqmail\ is inteded to cover a specific niche: non-permanent internet connection and different \NAME{ISP}s. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
13 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
14 Although it can basically replace other \MTA{}s, it is not generally aimed to do so. The package description of \debian\citeweb{packages.debian:masqmail} states this more clearly by changing the last sentence to: |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
15 \begin{quote} |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
16 In these cases, MasqMail is a slim replacement for full-blown MTAs such as sendmail, exim, qmail or postfix. |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
17 \end{quote} |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
18 \masqmail\ is a good replacement ``in these cases'', but not generally, since is lacks features essential for running on mail servers. It is primarily not secure enough for being accessable from untrusted locations. |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
19 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
20 The program is best used in home networks, which are non-permanently connected to the internet. \masqmail\ sends mail to local destinations, like users on the same machine and on other machines in the local net, immediately. Email to recipients outside the local net are queued when offline and sent when a online connection gets established. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
21 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
22 Further more does \masqmail\ respect online connections through different \NAME{ISP}s; a common thing for dial-up connections. In particular can different sender addresses be set, dependent on the \NAME{ISP} that is used. This prevents mail to be likely classified as spam. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
23 |
27 | 24 |
25 | |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
26 \section{Typical usage} |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
27 This section describes situations that make senseful use of \masqmail. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
28 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
29 A home network consisting of some workstations without a server. The network is connected to the internet by dial-up or broadband. Going online is initiated by computers inside the local net. \NAME{IP} addresses change at least once every day. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
30 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
31 Every workstation would be equiped with \masqmail. Mail transfer within the same machine or within the local net works straight forward. Outgoing mail to the internet is sent, to the concerning \NAME{ISP} for relaying, whenever the router goes online. Receiving of mail from outside needs to be done by a mail fetch program, like the \masqmail\ internal \NAME{POP3} client or \name{fetchmail} for example. The configuration for \masqmail\ would be the same on every computer, except the hostname. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
32 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
33 For the same network but having a server, one could have \masqmail\ running on the server and using simple forwarders (see \ref{subsec:relay-only}) to the server on the workstations. This setup does only support mail transfer to the server, but not back to a workstation; also sending mail to another user on the same workstation is not possible. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
34 |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
35 A better setup is to run \masqmail\ on every machine %FIXME |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
36 |
27 | 37 |
38 | |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
39 \section{What makes it special} |
27 | 40 |
74
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
41 As main advantage, \masqmail\ makes it easy to set up an \MTA\ on workstations or notebooks without the need to do complex configuration or to be an mail server expert. |
6843dfd6c4fa
added new texts to masqmail chapter and some more
meillo@marmaro.de
parents:
62
diff
changeset
|
42 |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
43 Workstations use %FIXME |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
44 |
27 | 45 |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
46 \section{Alternatives?} |
58 | 47 % http://anfi.homeunix.org/sendmail/dialup10.html |
27 | 48 |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
49 |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
50 \section{Structure} |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
51 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. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
52 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
53 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+. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
54 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
55 %masqmail: mailq, mailrm, runq, rmail, smtpd/in.smtpd |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
56 %sendmail: hoststat, mailq, newaliases, purgestat, smtpd |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
57 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
58 \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. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
59 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
60 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. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
61 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
62 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. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
63 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
64 \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. |
27 | 65 |
66 | |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
67 \section{Features} |
83
2dd80fecdf13
mentioned the version regarded about features
meillo@marmaro.de
parents:
78
diff
changeset
|
68 This overview regards \masqmail version 0.2.21, the state this document starts off. |
2dd80fecdf13
mentioned the version regarded about features
meillo@marmaro.de
parents:
78
diff
changeset
|
69 |
78
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
70 First of all \masqmail\ is an \MTA. Therefor it accepts mail on the command line and via \SMTP. Mail queueing and alias expansion is supported. \masqmail\ is able to deliver mail to local mailboxes (in \name{mbox} or \name{maildir} format) or pass it to a \name{mail delivery agent} (like \name{procmail}). Mail destinated to remote locations is sent via \SMTP. Outgoing \SMTP\ connections feature \name{SMTP-Auth} and \name{SMTP-after-POP} authentication, but incoming \SMTP\ does not. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
71 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
72 As \masqmail\ is focused on non-permanent Internet connections, online state can be queried by three methods: reading from a file, reading the output of a command, or by asking an \name{mserver}. Each method may return a string indicating one of the available routes being online, or returning nothing to indicate offline state. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
73 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
74 Delivery to recipients on the local host or in local nets is done at once; delivery to recipients on the Internet is only done when being online, and queued otherwise. Each online route may have a different mail server to which mail is relayed. Return address headers are modified appropriate if wished. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
75 |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
76 Additional to the \mta\ job, \masqmail\ also offers mail retrieval services with being a \NAME{POP3} client. Thus it can fetch mail from remote locations, dependent on the active online route. |
3148ed044103
wrote about structure and features of masqmail; quotation -> quote
meillo@marmaro.de
parents:
74
diff
changeset
|
77 |
27 | 78 |
79 | |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
80 \section{History} |
27 | 81 %TODO: let oliver prove read it! |
82 %FIXME: add references | |
84 | 83 %FIXME: where does the name come from: masqdialer (guessed) |
26
fb9ba63f6957
changed to new thesis structure; moved text pieces away; updated project plan
meillo@marmaro.de
parents:
diff
changeset
|
84 |
47 | 85 The date of the first release (version 0.0.1) is unknown. |
86 The only information available is, that it was packaged for \debian\ at 15\nth\ of September in 1999. | |
87 Further releases were made every few weeks or month during 2000, 2001 and 2002. | |
88 Development ended in mid-2003 in a hard stop. | |
62 | 89 The last ordinary release known to me is version 0.2.20, released on 4\nth\ of June in 2003. |
27 | 90 |
47 | 91 During the time of development, Oliver released 53 versions. |
92 That means a new release in less than every 20 days in average! | |
27 | 93 |
94 Mentionable are the four \emph{beta} releases of version 0.1.8 (named with the trailing letters `a' to `d') in winter 2000/2001 and the security-fix 0.1.15.1 in 2002. | |
95 | |
47 | 96 One extra release (version 0.2.21) was made by him in November 2005. |
97 This one is only available from the \debian\ pool. | |
98 Comparing it to version 0.2.20 shows, that no source code was altered. | |
99 Only building documents (like Makefiles) and \debian\ packageing documents were changed. | |
100 That leeds to the assumption that this last release was specificly created for the needs of \debian---to fix some errors in the package. | |
27 | 101 |
47 | 102 In May 2000 the minor version number increased to `1'. |
103 Nothing special is mentioned in the documentation about that. | |
104 When it increased again to start the 0.2.x releases, Oliver titled them as the ``development branch'' of \masqmail. | |
105 At that second time, he started developing the 0.2.x ``development branch'', continuing to work on the 0.1.x series. | |
106 His parallel work on both branches lasted for four month, and one additional last release, numbered 0.1.17, one more year later. | |
27 | 107 |