docs/master

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