docs/master

view ch01.roff @ 32:6a9abf543297

Rework in the Introduction (about MH).
author markus schnalke <meillo@marmaro.de>
date Mon, 14 May 2012 17:10:43 +0200
parents 6c63083b4c19
children 22ae3981a76b
line source
1 .H0 "Introduction
2 .P
3 This chapter introduces MH, its history, concepts and how it is used.
4 Then, it describes nmh's code base and community to give the reader
5 a better understanding of the state from which mmh started off.
6 Further more, this chapter lists the motivation and goals of the mmh project.
7 This chapter introduces MH, nmh and mmh to the reader and outlines
8 the mmh project itself.
11 .H1 "MH \(en the Mail Handler
12 .P
13 MH is an electronic mail system, originating in the RAND Corporation.
14 Most important for this thesis is that MH defines a mail handling concept.
15 In fact, MH had started as a design proposal, not as an implementation,
16 and in spirit it had remained this way. This is similar to Unix, which
17 influenced the world rather in being a set of system design concepts
18 than in being a specific software product.
19 .P
20 XXX Link to the Unix phil.
21 .P
22 XXX comparision to monolithic mail systems.
23 .P
24 XXX Differenciation of MUA and mail system.
26 .U2 "History
27 .P
28 MH is an electronic mail system, originating in the RAND Corporation.
29 In 1977 at RAND Corporation, Norman Shapiro and Stockton Gaines
30 had proposed the design
31 of a new mail handling system, called ``Mail Handler'' (MH),
32 to superseed RAND's old monolithic ``Mail System'' (MS).
33 Two years later, in 1979, Bruce Borden took the proposal and implemented a
34 prototype of MH.
35 Before the prototype had been available, the concept was
36 believed to be practically unusable because of being too slow.
37 But the prototype proved successful and replaced MS thereafter.
38 In replacing MS, MH became an all-in-one mail system.
39 .P
40 A decade later, the University of California at Irvine had started to use MH.
41 They also took over its development and pushed MH forward.
42 This was the time when the Internet appeared, UCB implemented
43 the TCP/IP stack, and Allman wrote Sendmail.
44 MH was extended as emailing got more features.
45 The development of MH was closely related to the development of email
46 RFCs. In the advent of MIME, MH was the first implementation of this new
47 email standard.
48 .P
49 In the nineties, MH had been moved into the public domain, making it
50 attractive to Free Software developers.
51 The Internet had started to become popular and in 1997,
52 Richard Coleman initiated the ``New Mail Handler'' (nmh) project,
53 a fork of MH, based on the \fILBL changes\fP by Van Jacobson, Mike Karels
54 and Craig Leres.
55 Colman intended to modernize MH and improve its portability and
56 MIME handling capabilities.
57 This should be done openly within the Internet community.
58 The development of MH stopped soon after the development of nmh had started.
59 Today, nmh almost completely replaced the original MH.
61 .U2 "Concepts
62 .P
63 MH is a toolchest, modelled after the Unix toolchest. It consists of a
64 set of tools, each covering a specific task of email handling. The programs
65 operate on a common mail storage. The specific format of the mail storage
66 characterizes MH in the same way like the format of the file system
67 characterizes Unix.
68 The mail storage consists of \fImail folders\fP (directories) and
69 \fPmessages\fP (regular files).
70 Each message is stored in a separate file in the format it had been
71 received (i.e. transfer format). The files are named with ascending numbers
72 in each folder.
73 MH tools maintain a \fIcontext\fP, which includes
74 the current mail folder and current message.
75 Processes in Unix have a similar context, containing the current working
76 directory, for instance. In contrast, the process context is maintained
77 by the Unix kernel automatically, whereas MH tools need to maintain the MH
78 context themselves.
79 The user can have one MH context or multiple ones, he can even share it
80 with other users.
81 Messages can have symbolic names. These can be automatically updated
82 position names like being the next or the last message,
83 or user-settable group names for arbitrary sets of messages.
84 These names are called sequences.
85 Sequences can be bound to the folder or to the context.
86 .P
87 New MH tools are built out of or on top of existing ones easily \(en
88 a property common to toolchests.
89 Multiple versions of the same command with different default values
90 are created very easily. This provides shortcuts and tayloring.
91 Form templates for new messages or for replies are easily exchangable.
92 Generally, output is adjustable with format files.
93 The configuration is stored in a file that is called the user's \fIprofile\fP.
94 MH encourages the user to taylor and automate the mail handling.
95 Almost everypart of the system can be adjusted to personal preference.
96 The system is well scriptable and extendable.
97 As the MH toolchest was modelled after the Unix toolchest, the
98 properties of the latter apply to the former as well.
100 .U2 "Versions
101 .P
102 Three versions of MH are available today:
103 .IP "Old MH"
104 In most cases this version had been replaced by nmh,
105 but some systems might still provide old MH.
106 The main reasons to still use old MH are historical reasons.
107 MH provides hardly any benefits over nmh.
108 The development of old MH has stopped after the 6.8.4 release in
109 February 1996.
110 .IP nmh\0
111 The most widespread version of MH was forked off version 6.8.3 in December
112 1996. It is based on the \fILBL changes\fP.
113 Backward-compatibility to old MH is provided by having new featues deactivated
114 by default. In consequence, the user needs to activate them explicitely to
115 be able to use them.
116 Throughout the previous years, the work on nmh was mostly maintenance work.
117 Development revived in December 2011 and stayed busy since then.
118 .IP mmh
119 This descendent of nmh is the subject of this thesis.
120 It had started as an experimental version, but became de facto a fork.
122 .U2 "Example Session
123 .P
124 Following is an example mail handling session with mmh.
125 It should be mostly compatible with nmh and old MH.
126 Details might vary but the look'n'feel is the same.
127 .P
128 XXX shell mail handling session follows ...
131 .H1 "nmh: Code and Community
132 .P
133 In order to understand the state, goals and dynamics of a project,
134 one needs to know its history. MH comes from a time before the
135 Internet, a time before networking became universal, a time when
136 emailing was small, short and simple. Then it grew, spread and
137 adopted to the changes. The core-concepts, however, remained the
138 same. During the XXX a small group of students at the University of
139 California, actively worked on MH. They added features and optimized,
140 like it is common for scientific work. This is still in pre-ANSI C
141 times. The source code contains many ancient parts. Code constructs
142 specific to BSD or hardware of that time are usual.
143 .P
144 Nmh started eight years after the ANSI C standard had been
145 established. A more modern coding style entered the code base. Still
146 a part of the developers come from ``the old days''. The developer
147 base became more diverse and thus the code. Programming practices
148 from different decades merged into the project. Different coding
149 styles came together. It appears as if multiple peers added code
150 parts, resulting in a conclomeration rather than an homogenic
151 of-one-cast mail system. Still, the basic concepts hold it together.
152 They were mostly untouched throughout the years.
153 .P
154 Although, at the surface, nmh is a toolchest, meaning a collection
155 of completely modularized small programs, on the source code level,
156 it is much more interweaved. Parts of the basic functions are
157 collected in a MH standard library, which is good, but often
158 separate functions are compiled into programs, for effiency reasons.
159 This lead to intricate innards.
160 The advent of MIME rose the complexity of email by a magnitude. This
161 is visible in nmh. The MIME-related parts are the most complex ones.
162 It's also visible that MIME support had been added on top of the
163 old MH later. The MH style made this easily possible, but it
164 also lead to duplicated functions (e.g. \fLshow\fP, \fLmhshow\fP)
165 and had not been thoroughly included into the concepts (e.g. the
166 user-visible access to whole messages and MIME parts are inherently
167 different).
168 .P
169 For compatibility's sake, it is a common understanding to have the
170 default settings to be compatible, requiring any new feature to be
171 explicitely enabled. This puts a burden on new users, because nmh
172 out-of-the-box keeps staying in the same ancient style, where users
173 usually want to have it practical for modern emailing.
174 But of course, this depends on if nmh is seen to be a front-end or a
175 back-end.
178 .H1 "mmh
179 .P
180 I started to work on my experimental version, which I call
181 \fImmh\fP (for \fImeillo's mail handler\fP), in Fall 2011.
182 In December, when I announced that I would work on an experimental
183 version, the activity in nmh suddenly rose. Suddently the community
184 started to move.
185 After long years of mostly idling, nmh became actively developed again.
186 What a great result!
187 Hence, while I was working on mmh, the community was working on nmh
188 too. My own work went in parallel and mostly unrelated.
189 .P
190 Because of several circumstances, my experimental version is rather
191 a fork today, although this may change again in the future.
193 .U2 "Motivation
194 .P
195 XXX
197 .U2 "Why it is worth it
198 .P
199 XXX
201 .U2 "Target Field
202 .P
203 XXX Target field and scenarios
204 .P
205 The target user in mind likes Unix and its philosophy.
206 He likes to use programs that are conceptionally appealing.
207 He's familiar with the command line and enjoys its power.
208 He is at least capable of shell scripting and wants to improve his
209 productivity by scripting the mail system.
210 His computer and operating system are from post-ANSI C times.
211 He likes to attach files, exchanges text containing non-ASCII
212 characters, signs or encrypts his messages.
213 He does not use bulletin boards anymore, nor non-mbox style mail
214 drops, nor does he rely on compatibility to nmh.
215 He already has and MTA/MSA and MRA running or is able to set them
216 up.
217 He does not want to have to read a book in order to make his MUA
218 usable.
219 .P
220 XXX Limitations
222 .U2 "The Vision
223 .P
224 The general goals of the mmh project are the following:
225 .BU
226 I believe that mmh should be perfectly suited for modern emailing,
227 out-of-the-box.
228 .BU
229 I care less about compatibility and more about conceptionally elegant
230 approaches.
231 .BU
232 I care for general, clear, and simple concepts.
233 .BU
234 I like to create an of-one-style email system. It should feel like
235 cast as one.
236 .BU
237 I plan to remove any optimizations that rises obscurity, unless it
238 appears to be neccessary to make mmh usable at all.
240 .U2 "Work to do
241 .BU
242 Remove the MTA and MRA facilities. Mmh shall concentrate on the MUA
243 task. Mail shall enter mmh's mail storage via the system mail drop
244 and it shall leave mmh via the local \fLsendmail\fP command.
245 .BU
246 Remove any further functions that are not related to mmh's main task.
247 Bulletin board support is on example. Also remove support for ancient
248 technologies, like hardcopy terminals.
249 .BU
250 Refactor the source code to meet modern style criteria. Use
251 standardized library functions when possible.
252 .BU
253 Replace performance optimizations by clear and readable code.
254 .BU
255 Reduce the feature set to the commonly used one, removing
256 corner-cases. Set sane default values.
257 .BU
258 Add better attachment support. Add support for digital signatures and
259 encryption.
260 .BU
261 Merge \fLshow\fP and \fLmhshow\fP into one single mail display program.
262 Integrate MIME support deeper and more natural into MH.
263 .BU
264 Provide a ready-to-use setup out-of-the-box.
267 .H1 "Goals of this Thesis
269 .U2 "Methods
270 .P
271 foo