comparison thesis/tex/1-Introduction.tex @ 245:da83360f8442

restructurated and added content
author meillo@marmaro.de
date Sun, 11 Jan 2009 20:21:35 +0100
parents d60e5843db7f
children 724cc6057105
comparison
equal deleted inserted replaced
244:f17b115bbd26 245:da83360f8442
5 5
6 << the overall goal of the document >> 6 << the overall goal of the document >>
7 7
8 8
9 9
10 \section{What's an MTA?} 10
11 11
12 The basic job of a \mta\ is to transport mail from senders to recipients. This is the definition of such kind of software, and this is how \MTA{}s are generally seen \cite[page 19]{dent04} \cite[pages 3-5]{hafiz05}. 12
13 13 \section{Email prerequisites}
14 An \MTA\ therefore needs at least a mail receiving facility and a mail sending facility. 14
15 email and everything is defined in RFCs
16
17
18 \subsubsection{Mail agents}
19
20 \paragraph{MTA}
21 \name{Mail Tranfer Agents} are for electronic mail what post offices are for snail mail. The basic job is to transport mail from senders to recipients, or more pedantic: from \MTA\ to \MTA. This is the definition of such kind of software, and this is how \MTA{}s are generally seen \cite[page 19]{dent04} \cite[pages 3-5]{hafiz05}. \MTA{}s are explained in more detail in chapter \ref{chap:mail-transfer-agents}.
22
23
24 \paragraph{MUA}
25 \name{Mail User Agents} the software the user deals with. It is the program he uses to write and read email. The \NAME{MUA} passes outgoing mail to the next \MTA, and it displays the contents of the user's mailbox. Well known \NAME{MUA}s are \name{Mozilla Thunderbird} and \name{mutt} on \unix\ systems, and \name{Microsoft Outlook} on \name{Windows}.
26
27
28 \paragraph{MDA}
29 \name{Mail Delivery Agents} correspond to postmen in the real world. They receive mail, to recipients they are responsible for, from an \MTA, and deliver it to the mailboxes of the recipients. Many \MTA{}s include an own \NAME{MDA}, but specialized ones exist: \name{procmail} and \name{maildrop} are examples.
30
31
15 32
16 << structure diagram of an MTA (and of masqmail) >> 33 << structure diagram of an MTA (and of masqmail) >>
34
35
36
37 \subsubsection{Mail transfer with SMTP}
38
39 Today most of the email is transfered using the \name{Simple Mail Transfer Protocol} (short: \SMTP), which is defined in \RFC821 and the successors \RFC2821 and \RFC5321. A good entry point for further information is \citeweb{wikipedia:smtp}.
40
41 A selection of important concepts of \SMTP\ is explained here.
42
43 First the \name{store and forward} transfer method. This means mail messages are sent from \MTA\ to \MTA\ until the final \MTA\ (the one which is responsible for the recipient) is reached. The message is gets stored for some time on each \MTA, until it is forwarded to the next \MTA.
44
45 This leads to the concept of \name{responsibility}. A mail message is always in the responsibility of one system. First it is the \NAME{MUA}. After it was transfered to the first \MTA, he takes the responsibility for the message over. The \NAME{MUA} can then delete its copy of the message. This is the same for each transfer, from \MTA\ to \MTA\ and finally from \MTA\ to the \NAME{MDA}, the message gets transfered and if this was successful, the responsibility for the message is transfered as well. The responsibility chain ends at the user's mailbox, where he himself has control on the message again.
46
47 A third concept is about failure handling. At any step on the way, an \MTA\ may get a message he is unable to handle. In such a case, this receiving \MTA\ will \name{reject} the message before it takes responsibility for it. The sending \MTA\ still has responsibility for the message and may try other ways of sending the message. If none succeeds, the \MTA\ will send a \name{bounce message} back to the original sender with information on the type of failure. Bounces are only sent if the failure is expected to be permanent, and if after many tries the transfer still was not successful.
48
49
50
51 \subsubsection{Mail messages}
52
53 Mail messages consist of three parts that with defined format. It is defined in \RFC822, and the successors \RFC2822 and \RFC5322.
54
55 A message consists of \name{envelope} and \name{content}. This concept is derived from the real world, so it is easy to understand. The envelope is what is used to route the message from sender to recipient. It contains the sender's address and addresses of one or more recipients. Envelopes are generated (using mail header data) by \MTA{}s, the user has not to deal with them.
56
57 The content of the message is again split into two part: The \name{header} and the \name{body}. The header of an email message is similar to the header of a (formal) letter. It spans the first lines of the content up to the first empty line. The header consists of several lines, called \name{header lines} or simply \name{headers}. They specify the sender, the address(es) of the recipient(s), the date, and possibly further information. Their order is irrelevant. Headers are named after the colon separated start of those lines, for example the \texttt{Date:} header. This header can write the header himself, but normally the \NAME{MUA} does this job.
58
59 Finally the body is the payload of the message. It is under full control of the user. From the view point of the \SMTP\ protocol, only 7-bit \NAME{ASCII} is allowed to in it, but arbitrary content can be included by encoding it to 7-bit \NAME{ASCII}. \NAME{MIME} is the common \SMTP\ extension to handle such convertion automatically in \NAME{MUA}s.
60
61 Following is a sample mail message.
62
63 \input{input/sample-email.txt}
64
65
17 66
18 67
19 68
20 69
21 70
34 83
35 \masqmail\ is released under the \GPL, which makes it \freesw. The latest stable version is 0.2.21 from November 2005. 84 \masqmail\ is released under the \GPL, which makes it \freesw. The latest stable version is 0.2.21 from November 2005.
36 85
37 The program's new homepage \citeweb{masqmail:homepage} provides further information about this \MTA. 86 The program's new homepage \citeweb{masqmail:homepage} provides further information about this \MTA.
38 87
39 88 << specify the really important external documents here >> %FIXME
40 \subsubsection*{Target field} 89
90
91
92 \subsection{Target field / When to use \masqmail}
41 93
42 Its original author, Oliver \person{Kurth}, sees \masqmail\ so: 94 Its original author, Oliver \person{Kurth}, sees \masqmail\ so:
43 \begin{quote} 95 \begin{quote}
44 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. 96 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.
45 \end{quote} 97 \end{quote}
56 108
57 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. 109 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.
58 110
59 111
60 112
61 \subsubsection*{Typical usage}
62 This section describes situations that make senseful use of \masqmail.
63
64 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.
65
66 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.
67
68 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.
69
70 A better setup is to run \masqmail\ on every machine %FIXME
71
72
73 \subsubsection{Online detection and routes}
74 \label{sec:masqmail-routes}
75
76 ---
77
78 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.
79
80 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.
81
82 ---
83
84 \masqmail\ focuses on non-permanent online connections, thus a concept of online routes is used. One may configure any number of routes to send mail. Each route can have criteria, like matching \texttt{From:} or \texttt{To:} headers, to determine if some message is allowed to be sent over it. Mail to destinations outside the local network gets queued until an online connections is available.
85
86
87
88
89 113
90 \subsubsection*{\masqmail's main goal} 114 \subsubsection*{\masqmail's main goal}
91 115
92 \masqmail\ does have similar requirements, by being a \sendmail\ replacement, which is a basic goal of the project. The main difference is that \masqmail\ is intended to be used on workstations and in small networks, but \sendmail, \qmail, and \postfix\ are designed to run on large mail servers to handle masses of email. The author of \masqmail, \person{Kurth}, in contrast, warns on the old project's website \citeweb{masqmail:homepage2} about using it to accept connections from the Internet, because of the risk to be an open relay: 116 \masqmail\ does have similar requirements, by being a \sendmail\ replacement, which is a basic goal of the project. The main difference is that \masqmail\ is intended to be used on workstations and in small networks, but \sendmail, \qmail, and \postfix\ are designed to run on large mail servers to handle masses of email. The author of \masqmail, \person{Kurth}, in contrast, warns on the old project's website \citeweb{masqmail:homepage2} about using it to accept connections from the Internet, because of the risk to be an open relay:
93 \begin{quote} 117 \begin{quote}
112 136
113 \masqmail\ shall be a complete \mta. It shall be able to replace ones like \sendmail. 137 \masqmail\ shall be a complete \mta. It shall be able to replace ones like \sendmail.
114 138
115 139
116 140
117 141 \subsubsection*{Typical usage}
118 142 This section describes situations that make senseful use of \masqmail.
119 143
120 144 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.
121 145
122 \section{Existing code base} 146 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.
147
148 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.
149
150 A better setup is to run \masqmail\ on every machine %FIXME
151
152
153
154
155
156
157 \subsection{When not to use \masqmail}
158
159 ...
160
161
162
163
164
165
166
167
168
169
170 \subsection{Features}
123 171
124 Here regarded is version 0.2.21 of \masqmail. This is the last version released by Oliver \person{Kurth}, and the basis for my thesis. 172 Here regarded is version 0.2.21 of \masqmail. This is the last version released by Oliver \person{Kurth}, and the basis for my thesis.
125 173
126 174
127 \subsubsection*{The source code} 175 \subsubsection*{The source code}
154 202
155 Additional to the \mta\ job, \masqmail\ also offers mail retrieval services by being a \NAME{POP3} client. It can fetch mail from different remote locations, dependent on the active online connection. 203 Additional to the \mta\ job, \masqmail\ also offers mail retrieval services by being a \NAME{POP3} client. It can fetch mail from different remote locations, dependent on the active online connection.
156 204
157 205
158 206
159 207 \subsubsection*{Online detection and routes}
160 208 \label{sec:masqmail-routes}
161 209
162 210 ---
163 211
164 212 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.
165 213
166 \subsubsection*{What makes it special} 214 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.
215
216 ---
217
218 \masqmail\ focuses on non-permanent online connections, thus a concept of online routes is used. One may configure any number of routes to send mail. Each route can have criteria, like matching \texttt{From:} or \texttt{To:} headers, to determine if some message is allowed to be sent over it. Mail to destinations outside the local network gets queued until an online connections is available.
219
220
221
222
223
224
225
226
227
228
229 \section{Why \masqmail?}
167 230
168 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. 231 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.
169 232
170 Workstations use %FIXME 233 Workstations use %FIXME
171 234
172 \textbf{Alternatives?} 235 \textbf{Alternatives?}
173 % http://anfi.homeunix.org/sendmail/dialup10.html 236 http://anfi.homeunix.org/sendmail/dialup10.html
174 237
175 238
176 239 << explain why masqmail is old and why it is interesting/important however! >>
177 << explain why masqmail is old and why it is interesting/important however! >> %FIXME
178 240
179 << why is it worth to revive masqmail? >> 241 << why is it worth to revive masqmail? >>
180 242
181 243
182 244
245
246
247
248
183 \section{Problems to solve} 249 \section{Problems to solve}
184 250
185 << what problems has masqmail? >> %FIXME 251 << what problems has masqmail? >>
186 252
187 << what's the intention of this document? >> %FIXME 253 << what's the intention of this document? >>
188 254
189 << why is it worth the effort? >> %FIXME 255 << why is it worth the effort? >>
190 256
191 257
192 \section{What is not covered here} 258
259
260
261 \section{Delimitation}
193 262
194 << limit against stuff not covered here >> 263 << limit against stuff not covered here >>
195 264
196 265
197 \section{Further reading} 266
198 267
199
200 << specify the really important external documents here >> %FIXME
201
202 << write about the bundled CD, and tell what's included >> %FIXME
203
204 \NAME{RFC}s, other books, source code, websites
205
206
207