docs/master

view intro.roff @ 223:1fa5a74bf138

Reworked References structure: Collect them all in one Chapter. Have list of websites separately.
author markus schnalke <meillo@marmaro.de>
date Sun, 15 Jul 2012 19:16:35 +0200
parents 9317d789cef9
children 157c92fc1597
line source
1 .RN 1
2 .H0 "Introduction
3 .Id introduction
5 .P
6 MH is a set of mail handling tools with a common concept, similar to
7 the Unix tool chest, which is a set of file handling tools with a common
8 concept. \fInmh\fP is the currently most popular implementation of an
9 MH-like mail handling system.
10 This thesis describes an experimental version of nmh, named \fImmh\fP.
11 .P
12 This chapter introduces MH, its history, concepts and how it is used.
13 It describes nmh's code base and community to give the reader
14 a better understanding of the state of mmh when it started off.
15 Furthermore, this chapter outlines the mmh project itself,
16 describing the motivation for it and its goals.
19 .H1 "MH \(en the Mail Handler
20 .Id mh
21 .P
22 MH is a conceptual email system design and its concrete implementation.
23 MH had started as a design proposal at RAND Corporation,
24 where the first implementation followed later.
25 In spirit, MH is similar to Unix, which
26 influenced the world more in being a set of system design concepts
27 than in being a specific software product.
28 The ideas behind Unix are summarized in the \fIUnix philosophy\fP.
29 .[
30 gancarz unix philosophy
31 .]
32 MH follows this philosophy.
34 .U2 "History
35 .P
36 In 1977 at RAND Corporation, Norman Shapiro and Stockton Gaines
37 proposed the design of a new mail handling system,
38 .[
39 shapiro gaines mh proposal
40 .]
41 to superseed RAND's old monolithic \fIMail System\fP (MS).
42 One year later, in 1978, Bruce Borden picked up on the
43 proposal and implemented a prototype, which he called
44 \fIMail Handler\fP (MH).
45 Before the prototype's existence, the concept was
46 believed to be practically unusable.
47 But the prototype \(en written in only three weeks \(en
48 proved successful and replaced MS thereafter.\&
49 .[ [
50 rand note design of mh
51 .], p. 4]
52 .P
53 In the early eighties,
54 the University of California at Irvine (UCI) started to use MH.
55 Marshall T. Rose and John L. Romine then became the driving force.
56 They took over the development and pushed MH forward.
57 .[ [
58 rand note design of mh
59 .], p. 4]
60 RAND had put the code into the public domain by then.
61 MH was developed at UCI at the same time when the Internet appeared,
62 BSD started to support TCP/IP networking,
63 and Eric Allman wrote Sendmail.
64 MH was extended as emailing became more featured.
65 The development of MH was closely related to the development of email RFCs.
66 In the advent of the \fIMultipurpose Internet Mail Extensions\fP (MIME),
67 MH was one of the first implementations of the new email standard.
68 .P
69 In the nineties, the Internet became popular and in December 1996,
70 Richard Coleman initiated the \fINew Mail Handler\fP (nmh) project.
71 Nmh is a fork of MH 6.8.3 and bases heavily on the
72 \fILBL changes\fP by Van Jacobson, Mike Karels and Craig Leres.
73 .[
74 lbl changes
75 .]
76 Colman intended to modernize MH and improve its portability and
77 MIME handling capabilities.
78 The development of MH at UCI stopped after the 6.8.4 release in
79 February 1996, soon after the development of nmh had started.
80 Today, nmh is developed openly in the Internet community.
81 It has almost completely replaced the original MH.
82 Some systems might still provide the old MH, but hardly for good reasons.
83 .P
84 In the last years, the majority of changes in nmh was maintenance work.
85 Nevertheless, the development was revived in December 2011
86 and stayed busy since then.
89 .U2 "Concepts
90 .P
91 MH consists of a set of tools, each covering a specific task of
92 email handling, such as composing a message, replying to a message,
93 refiling a message to a different folder, listing the messages in a folder.
94 The tools are invoked directly from the Unix shell.
95 .[
96 a rand note design of mh
97 .]
98 .P
99 The tools operate on a common mail storage, which consists of
100 \fImail folders\fP (directories) and \fPmessages\fP (regular files).
101 Each message is stored in a separate file.
102 .[
103 a rand note design of mh
104 .]
105 The files are named with ascending numbers in each folder.
106 The specific format of the mail storage characterizes MH in the same way
107 as the format of the file system characterizes Unix.
108 .P
109 MH tools maintain a \fIcontext\fP, which includes for instance the
110 current mail folder.
111 Processes in Unix have a similar context, containing the current working
112 directory, for instance. In contrast, the process context is maintained
113 by the Unix kernel automatically, whereas MH tools need to maintain the MH
114 context themselves.
115 The user can have one MH context or multiple ones; he can even share it
116 with others.
117 .P
118 Messages are named by their numeric filename,
119 but they can have symbolic names, as well.
120 These are either one of six system-controlled position names
121 and a shorthand for the range of all messages,
122 or user-settable group names for arbitrary sets of messages.
123 These names are called sequences.
124 Automatically updated position names exist for the
125 first, last, previous, next, current message, and for the number
126 one beyond the last message.
127 (In mmh, the names of these sequences are abbreviated to the
128 first character.)
129 User-definded sequences can be bound to the folder containing the
130 messages (\fIpublic sequences\fP) or to the user's context
131 (\fIprivate sequences\fP).
132 .P
133 The user's \fIprofile\fP is the file that contains his MH configuration.
134 Default switches for the individual tools can be specified to
135 adjust them to the user's personal preferences.
136 These switches will be automatically supplied whenever the specific
137 tool is invoked.
138 Additionally, a single command can be linked under different names
139 with different default values.
140 Form templates for new messages and replies, as well as format files
141 to adjust the output of tools are easily exchanged in the profile.
142 Almost every part of the system can be adjusted to personal preference.
143 .P
144 The whole system is well scriptable and extensible.
145 New MH tools are built out of or on top of existing ones quickly.
146 MH encourages the user to tailor, extend, and automate the system.
147 As the MH tool chest was modeled after the Unix tool chest, the
148 properties of the latter apply to the former as well.
152 .U2 "Using MH
153 .P
154 Many tutorials to using MH
155 .[
156 rose sweet mh tutorial
157 .]
158 .[
159 moss jackson user's guide for mh
160 .]
161 .[
162 hegardt mh for beginners
163 .]
164 are old, but still they teach the concepts and basics,
165 which remained unchanged.
166 Rose and Romine have written an excellent introduction on a more
167 technical level, with pointers to advanced usage.
168 .[
169 rose romine real work
170 .]
171 For a more recent document, it is strongly recommended to have
172 a look at the \fIMH Book\fP,
173 .[ [
174 peek mh book
175 .], Part II]
176 especially at its online version.
177 .P
178 Following here is a sample mail handling session with mmh.
179 Details might vary to MH and nmh but the look and feel is the same.
181 .so input/mh-session
184 .H1 "nmh
185 .P
186 In order to understand the condition, goals and dynamics of a project,
187 one needs to know the reasons behind them.
188 This section gives background information.
189 .P
190 MH predates the Internet;
191 it comes from times before networking was universal;
192 it comes from times when emailing was small, short and simple.
193 Then, MH grew, spread and adapted to the changes email went through.
194 Its core concepts, however, remained the same.
195 During the eighties, students at UCI actively worked on MH.
196 They added new features and optimized the code for the systems
197 popular at that time.
198 This was in times before POSIX and ANSI C.
199 As large parts of the code stem from this time, today's nmh source code
200 still contains many ancient parts.
201 BSD-specific code and constructs tailored for hardware of that time
202 are frequent.
203 .P
204 Nmh started about one decade after the POSIX and ANSI C standards were
205 released.
206 A more modern coding style entered the code base but still
207 a part of the developers were ``of the old type''.
208 The developer base became more diverse,
209 thus broadening the range of different coding styles.
210 Programming practices from different decades merged in the project.
211 As several peers added code, the system became more a conglomeration
212 of single tools rather than a homogeneous of-one-cast mail system.
213 For that, leadership would have been necessary.
214 Nevertheless, MH's basic concepts held the project together.
215 They were mostly untouched throughout the years.
216 .P
217 Though clearly separated on the surface
218 \(en as a collection of small, separate programs \(en
219 the source code turns out to be fairly interwoven.
220 Multiple separate components are compiled into a program
221 for efficiency reasons.
222 This leads to intricate innards.
223 .P
224 It is visible in nmh that
225 the advent of MIME raised the complexity of email by a magnitude.
226 The MIME-related parts are the most complex ones.
227 It is also visible that MIME support was added on top of the old MH core.
228 MH's tool chest style made this easily possible and encourages
229 such approaches, but unfortunately, it led to duplicated functions
230 and half-hearted implementation of concepts.
231 .P
232 To provide backward-compatibility, it is a common understanding
233 in the nmh community to not change the default settings.
234 In consequence, users need to activate modern features explicitly
235 to be able to use them.
236 The ancient style in which fresh nmh setups remain to appear
237 causes difficulties for new users, as modern email features require
238 additional configuration.
239 The small but mature community around nmh, however, needs little change
240 as they have had their convenient setups for decades.
243 .H1 "mmh
244 .P
245 I started to work on my experimental version in October 2011,
246 basing my work on nmh version \fInmh-1.3-dev\fP.
247 At that time no more than three commits were made to nmh
248 since the beginning of 2011, the latest one being
249 .Ci a01a41d031c796b526329a4170eb23f0ac93b949 ,
250 commited on 2011-04-13.
251 In December, when I announced my work in progress on the
252 nmh-workers mailing list,
253 .[
254 nmh-workers mmh announce December
255 .]
256 nmh's community became active, all of a sudden.
257 This movement was heavily pushed by Paul Vixie's ``edginess'' comment.
258 .[
259 nmh-workers vixie edginess
260 .]
261 After long years of stagnation, nmh became actively developed again.
262 Hence, while I was working on mmh, the community was working on nmh,
263 in parallel but unrelated.
264 .P
265 The name \fImmh\fP may stand for \fImodern mail handler\fP,
266 because the project tries to modernize nmh.
267 Personally however, I prefer to call mmh \fImeillo's mail handler\fP,
268 emphasizing that the project is my version of nmh,
269 following my visions and preferences.
270 (My login name is \fImeillo\fP.)
271 This project model was inspired by \fIdwm\fP,
272 which is Anselm Garbe's personal window manager \(en
273 targeted to satisfy Garbe's personal needs whenever conflicts appear.
274 Dwm has retained its lean elegance and its focused character, whereas
275 its community-driven predecessor \fIwmii\fP had grown fat over time.
276 The development of mmh should remain focused.
279 .U2 "Motivation
280 .P
281 MH is the most important of very few email systems in a tool chest style.
282 Tool chests are powerful because they can be perfectly automated and
283 extended.
284 They allow the implementation of arbitrary kinds of front-ends
285 on top of the tool chest quickly and without internal knowledge.
286 Additionally, tool chests are easier to maintain than monolithic
287 programs.
288 MH-like email tool chests should be kept alive as they fill a market
289 niche by providing conceptional elegance and unique scripting qualities.
290 Mmh tries to create a modern and convenient entry point to MH-like
291 systems for new and interested users.
292 .P
293 The mmh project is motivated by deficits of nmh and
294 by my wish for general changes.
295 At the time the mmh project started, nmh had not yet adjusted to
296 modern emailing needs well enough.
297 The default setup was completely unusable for modern emailing.
298 Too much setup work was required.
299 Several modern features were already available,
300 but the community did not want to have them active by default.
301 Mmh is my way to change this.
302 .P
303 In my eyes, MH's concepts could be exploited better and
304 the style of the tools could be improved.
305 Both would simplify and generalize the system, providing cleaner
306 interfaces and greater software leverage at the same time.
307 Mmh is my way to demonstrate this.
308 .P
309 In providing multiple parts of the email system, nmh can hardly
310 compete with the large specialized projects that focus
311 on one of the components only.
312 The situation could be improved by concentrating the development power
313 on the most unique part of MH and letting the user pick his preferred
314 set of other mail components.
315 Today's pre-packaged software components encourage this model.
316 Mmh is my way to provide this.
317 .P
318 It is worthwhile to fork nmh for the development of mmh,
319 because the two projects focus on different goals and differ in
320 fundamental questions.
321 The nmh community's reluctance regarding change conflicts
322 with my strong desire for it.
323 .[
324 nmh-workers schnalke understanding nmh
325 .]
326 In developing a separate experimental version, new approaches can
327 easily be tried out without the need to discuss changes beforehand.
328 In fact, revolutionary changes are hardly possible otherwise.
329 .P
330 The mmh project provides the basis on which the aforementioned
331 ideas can be implemented and demonstrated,
332 without the need to change the nmh project or its community.
333 Of course, the results of the mmh project shall improve nmh, in the end.
334 By no means it is my intent to work against the nmh project.
337 .U2 "Target Field
338 .P
339 Any effort needs to be targeted towards a specific goal
340 in order to be successful.
341 Therefore, a description of an imagined typical mmh user follows.
342 Actually, as mmh is my personal version of MH,
343 this is sort of a description of myself.
344 Developing software for one's own is a reliable way to produce software
345 that matches the user's desires.
346 .P
347 The target user of mmh likes Unix and its philosophy.
348 He appreciates to use programs that are conceptionally appealing.
349 He is familiar with the command line and enjoys its power.
350 He is capable of shell scripting and wants to improve his
351 productivity by scripting the mail system.
352 He uses modern email features, such as attachments,
353 non-ASCII text, digital signatures and message encryption in a natural way.
354 He is able to set up mail system components
355 and likes to pick the ones he prefers.
356 He has a reasonably modern operating system that complies to the
357 POSIX and ANSI C standards.
358 .P
359 The typical user invokes mmh commands directly in an interactive
360 shell session, even on workstations where graphical front-ends could
361 be added.
362 Likely, he runs his mail setup on a server machine,
363 to which he connects via ssh.
364 He might automate mail processing with mmh tools
365 but definitely he uses the tools to build better tools.
366 In any case, he wants to have the flexibility to change
367 his setup to suit his needs.
368 .P
369 The typical mmh user is a programmer.
370 He likes to, occasionally, make use of the opportunity of free software
371 by putting hands on and getting involved in software he uses.
372 In consequence, he likes small and clean code bases and cares for
373 code quality.
374 In general, he believes that:
375 .BU
376 The elegance of source code is most important.
377 .BU
378 Concepts are more important than concrete implementations.
379 .BU
380 Code optimizations for anything but readability should be avoided.
381 .BU
382 Removed code is debugged code.
383 .BU
384 Having a lot of choice is bad.
387 .U2 "Goals of the mmh Project
388 .IP "Streamlining
389 Mmh should be stripped down to its core, which is the user agent (MUA).
390 The feature set should be distilled to the indispensable ones,
391 effectively removing corner cases.
392 Parts that do not add to the main task of being a conceptionally
393 appealing user agent should be removed.
394 This includes the mail transfer and mail retrieval facilities.
395 Choice should be reduced to the main options.
396 All tools should be tightly shaped.
397 .IP "Modernizing
398 Mmh's feature set needs to become more modern.
399 Better support for attachments, digital signatures, and message
400 encryption should be added.
401 MIME support should be integrated deeper and more naturally.
402 The modern email features need to be readily available, out-of-the-box.
403 On the other hand, obsolete facilities can be dropped out and
404 ancient technologies need not be further supported.
405 The available concepts should be expanded as far as possible.
406 A small set of concepts should recur consistently.
407 .IP "Styling
408 Mmh's source code should be updated to modern standards.
409 Standardized library functions should replace non-standard versions
410 whenever possible.
411 Code should be separated into distinct modules when feasible.
412 Time and space optimizations should to be replaced by
413 clear and readable code.
414 A uniform programming style should prevail.
415 The whole system should appear to be of-one-style;
416 it should feel like being cast as one.