# HG changeset patch # User markus schnalke # Date 1342123491 -7200 # Node ID 9317d789cef932b833ca75d54d366203a05aa7e4 # Parent ff303d85477131d13684e00a29d2ee392ec1ccac Various improvements and rework. diff -r ff303d854771 -r 9317d789cef9 discussion.roff --- a/discussion.roff Thu Jul 12 20:01:46 2012 +0200 +++ b/discussion.roff Thu Jul 12 22:04:51 2012 +0200 @@ -401,7 +401,7 @@ .P Removing .Pn msh -together with the truly archaic code relicts +together with the truly archaic code relics .Pn vmh and .Pn wmh @@ -1028,11 +1028,29 @@ .H2 "Command Line Switches .P -The command line switches of MH tools is similar to the X Window style. +The command line switches of MH tools are similar to the X Window style. .\" XXX ref -They are words, introduced by a single dash. -For example: -.Cl "-truncate" . +They consist of a single dash (`\fL-\fP') followed by a word. +To ease typing, the word can be abbreviated, given the remaining +prefix remains unambiguous. +If no other switch starts with the letter `t', then any of +.Cl "-truncate" , +.Cl "-trunc" , +.Cl "-tr" , +and +.Cl "-t +is equal. +As a result, switches can neither be grouped (as in +.Cl "ls -ltr" ) +nor can switch arguments be appended directly to the switch (as in +.Cl "sendmail -q30m" ). +Many switches have negating counter-parts, which start with `no'. +For example +.Cl "-notruncate +inverts the +.Cl "-truncate +switch. +They exist to override the effect of default switches in the profile. Every program in mmh has two generic switches: .Sw -help , to print a short message on how to use the program, and @@ -1652,7 +1670,7 @@ increasingly extended. New features entered the project and became alternatives to the existing behavior. -Relicts from several decades have gathered in the code base, +Relics from several decades have gathered in the code base, but seldom obsolete features were dropped. This section describes the removing of old code and the modernizing of the default setup. @@ -1661,7 +1679,7 @@ .Cf code-style . -.H2 "Code Relicts +.H2 "Code Relics .P My position regarding the removal of obsolete functions of mmh, .\" XXX ``in order to remove old code,'' diff -r ff303d854771 -r 9317d789cef9 input/mh-session --- a/input/mh-session Thu Jul 12 20:01:46 2012 +0200 +++ b/input/mh-session Thu Jul 12 22:04:51 2012 +0200 @@ -6,7 +6,7 @@ 2 2365-05-15 02:17 "Jean-Luc Picard" Good advice VE .VS -$ f(CBshowfP fI(display the current message, i.e. the one marked with `+')fP +$ f(CBshowfP fI(display the current message, i.e. the one marked with `+')fP Date: Wed, 04 Jul 2012 23:42:00 +0200 From: Bob To: meillo@marmaro.de @@ -24,11 +24,11 @@ (quotation freely rearranged) VE .VS -$ f(CBrefile +quotesfP fI(move the current message to the folder `quotes')fP +$ f(CBrefile +quotesfP fI(move the current message to the folder `quotes')fP Create folder "/home/meillo/Mail/quotes"? y VE .VS -$ f(CBnextfP fI(display the next message; the same as `fLshow nfP')fL +$ f(CBnextfP fI(display the next message; equal to `fLshow nfP')fL Date: Sat, 15 May 2365 02:17:00 +0000 From: "Jean-Luc Picard" To: meillo@marmaro.de @@ -39,16 +39,17 @@ And all this may mean something. VE .VS -$ f(CBreplfP fI(reply to this message)fP - fI(the reply is composed in the editor)fP +$ f(CBreplfP fI(reply to this message)fP +[...] fI(the reply is composed in an editor session)fP + What now? f(CBsendfP VE .VS -$ f(CBfolderfP fI(print information on the current folder)fP +$ f(CBfolderfP fI(print information on the current folder)fP inbox+ has 1 message (2-2); cur=2 VE .VS -$ f(CBscanfP fI(list the messages in the current folder)fP +$ f(CBscanfP fI(list the messages in the current folder)fP 2+ 2365-05-15 02:17 "Jean-Luc Picard" Good advice VE .VS diff -r ff303d854771 -r 9317d789cef9 intro.roff --- a/intro.roff Thu Jul 12 20:01:46 2012 +0200 +++ b/intro.roff Thu Jul 12 22:04:51 2012 +0200 @@ -20,7 +20,7 @@ .Id mh .P MH is a conceptual email system design and its concrete implementation. -Notably, MH had started as a design proposal at RAND Corporation, +MH had started as a design proposal at RAND Corporation, where the first implementation followed later. In spirit, MH is similar to Unix, which influenced the world more in being a set of system design concepts @@ -39,13 +39,13 @@ shapiro gaines mh proposal .] to superseed RAND's old monolithic \fIMail System\fP (MS). -More than one year later, in late 1978, Bruce Borden returned to the +One year later, in 1978, Bruce Borden picked up on the proposal and implemented a prototype, which he called \fIMail Handler\fP (MH). Before the prototype's existence, the concept was believed to be practically unusable. But the prototype \(en written in only three weeks \(en -proved successful and replaced MS within six months.\& +proved successful and replaced MS thereafter.\& .[ [ rand note design of mh .], p. 4] @@ -58,32 +58,31 @@ rand note design of mh .], p. 4] RAND had put the code into the public domain by then. -MH was developed at UCI at the time when the Internet appeared, -the BSD started to include TCP/IP networking, +MH was developed at UCI at the same time when the Internet appeared, +BSD started to support TCP/IP networking, and Eric Allman wrote Sendmail. MH was extended as emailing became more featured. The development of MH was closely related to the development of email RFCs. In the advent of the \fIMultipurpose Internet Mail Extensions\fP (MIME), MH was one of the first implementations of the new email standard. -MH grew to provide anything necessary for emailing. .P In the nineties, the Internet became popular and in December 1996, Richard Coleman initiated the \fINew Mail Handler\fP (nmh) project. -Nmh is a fork of MH 6.8.3 and bases strongly on the +Nmh is a fork of MH 6.8.3 and bases heavily on the \fILBL changes\fP by Van Jacobson, Mike Karels and Craig Leres. .[ lbl changes .] Colman intended to modernize MH and improve its portability and MIME handling capabilities. -This should be done openly within the Internet community. The development of MH at UCI stopped after the 6.8.4 release in February 1996, soon after the development of nmh had started. -Today, nmh has almost completely replaced the original MH. -Some systems might still provide old MH, but mainly for historical reasons. +Today, nmh is developed openly in the Internet community. +It has almost completely replaced the original MH. +Some systems might still provide the old MH, but hardly for good reasons. .P -In the last years, the changes in nmh were mostly maintenance work. -However, the development was revived in December 2011 +In the last years, the majority of changes in nmh was maintenance work. +Nevertheless, the development was revived in December 2011 and stayed busy since then. @@ -140,34 +139,11 @@ with different default values. Form templates for new messages and replies, as well as format files to adjust the output of tools are easily exchanged in the profile. +Almost every part of the system can be adjusted to personal preference. .P -Switches consist of a single dash (`\fL-\fP') followed by a word. -To ease typing, the word can be abbreviated, given the remaining -prefix remains unambiguous. -If no other switch starts with the letter `t', then any of -.Cl "-truncate" , -.Cl "-trunc" , -.Cl "-tr" , -and -.Cl "-t -is equal. -As a result, switches can neither be grouped (as in -.Cl "ls -ltr" ) -nor can switch arguments be appended directly to the switch (as in -.Cl "sendmail -q30m" ). -Many switches have negating counter-parts, which start with `no'. -For example -.Cl "-notruncate -inverts the -.Cl "-truncate -switch. -They exist to override the effect of default switches in the profile. -.P -The system is well scriptable and extensible. -Almost every part of the system can be adjusted to personal preference. +The whole system is well scriptable and extensible. New MH tools are built out of or on top of existing ones quickly. -Furthermore, MH encourages the user to tailor, extend, and automate -the system. +MH encourages the user to tailor, extend, and automate the system. As the MH tool chest was modeled after the Unix tool chest, the properties of the latter apply to the former as well. @@ -185,22 +161,22 @@ .[ hegardt mh for beginners .] -are old, but they still teach the basics. -Rose and Romine introduce MH deeper and more technical in two dozen pages. +are old, but still they teach the concepts and basics, +which remained unchanged. +Rose and Romine have written an excellent introduction on a more +technical level, with pointers to advanced usage. .[ rose romine real work .] -For a more recent introduction, it is strongly recommended to have -a look at the \fIMH Book\fP. +For a more recent document, it is strongly recommended to have +a look at the \fIMH Book\fP, .[ [ peek mh book .], Part II] -The online version of the book was updated on in May 2006. +especially at its online version. .P -Following here is an example mail handling session. -Although it uses mmh, it is mostly compatible with nmh and the -original MH. -Details might vary but the look and feel is the same. +Following here is a sample mail handling session with mmh. +Details might vary to MH and nmh but the look and feel is the same. .so input/mh-session @@ -209,66 +185,59 @@ .P In order to understand the condition, goals and dynamics of a project, one needs to know the reasons behind them. -This section explains the background. +This section gives background information. .P MH predates the Internet; -it comes from times before networking was universal, +it comes from times before networking was universal; it comes from times when emailing was small, short and simple. -Then it grew, spread and adapted to the changes email went through. -Its core-concepts, however, remained the same. +Then, MH grew, spread and adapted to the changes email went through. +Its core concepts, however, remained the same. During the eighties, students at UCI actively worked on MH. They added new features and optimized the code for the systems popular at that time. -All this still was in times before POSIX and ANSI C. +This was in times before POSIX and ANSI C. As large parts of the code stem from this time, today's nmh source code still contains many ancient parts. BSD-specific code and constructs tailored for hardware of that time are frequent. .P -Nmh started about a decade after the POSIX and ANSI C standards were -established. A more modern coding style entered the code base, but still -a part of the developers came from ``the old days''. The developer -base became more diverse, thus broadening the range of different -coding styles. +Nmh started about one decade after the POSIX and ANSI C standards were +released. +A more modern coding style entered the code base but still +a part of the developers were ``of the old type''. +The developer base became more diverse, +thus broadening the range of different coding styles. Programming practices from different decades merged in the project. As several peers added code, the system became more a conglomeration of single tools rather than a homogeneous of-one-cast mail system. -Still, the existing basic concepts held it together. +For that, leadership would have been necessary. +Nevertheless, MH's basic concepts held the project together. They were mostly untouched throughout the years. .P -Despite the separation of the tool chest approach at the surface -\(en a collection of small, separate programs \(en -on the source code level, it is much more interwoven. -Several separate components were compiled into one program +Though clearly separated on the surface +\(en as a collection of small, separate programs \(en +the source code turns out to be fairly interwoven. +Multiple separate components are compiled into a program for efficiency reasons. -This led to intricate innards. -While clearly separated on the outside, -the programs turned out to be fairly interwoven inside. -.\" XXX FIXME rewrite... -.\" nicht zweimal ``interwoven'' -.\" Unfortunately, the clear separation on the outside turned out to be -.\" fairly interwoven inside. +This leads to intricate innards. .P -The advent of MIME raised the complexity of email by a magnitude. -This is visible in nmh. The MIME-related parts are the most complex ones. +It is visible in nmh that +the advent of MIME raised the complexity of email by a magnitude. +The MIME-related parts are the most complex ones. It is also visible that MIME support was added on top of the old MH core. MH's tool chest style made this easily possible and encourages such approaches, but unfortunately, it led to duplicated functions -and half-hearted implementation of the concepts. +and half-hearted implementation of concepts. .P -To provide backward-compatibility, it is a common understanding not to -change the default settings. -In consequence, the user needs to activate modern features explicitly +To provide backward-compatibility, it is a common understanding +in the nmh community to not change the default settings. +In consequence, users need to activate modern features explicitly to be able to use them. -This puts a burden on new users, because out-of-the-box nmh remains -in the same ancient style. -If nmh is seen to be a back-end, -then this compatibility surely is important. -However, at the same time, new users have difficulties using nmh for -modern emailing. -The small but mature community around nmh needs little change +The ancient style in which fresh nmh setups remain to appear +causes difficulties for new users, as modern email features require +additional configuration. +The small but mature community around nmh, however, needs little change as they have had their convenient setups for decades. -.\" XXX Explain more .H1 "mmh @@ -276,9 +245,9 @@ I started to work on my experimental version in October 2011, basing my work on nmh version \fInmh-1.3-dev\fP. At that time no more than three commits were made to nmh -since the beginning of the year, the latest one being -.Ci a01a41d031c796b526329a4170eb23f0ac93b949 -on 2011-04-13. +since the beginning of 2011, the latest one being +.Ci a01a41d031c796b526329a4170eb23f0ac93b949 , +commited on 2011-04-13. In December, when I announced my work in progress on the nmh-workers mailing list, .[ @@ -291,7 +260,7 @@ .] After long years of stagnation, nmh became actively developed again. Hence, while I was working on mmh, the community was working on nmh, -in parallel. +in parallel but unrelated. .P The name \fImmh\fP may stand for \fImodern mail handler\fP, because the project tries to modernize nmh. @@ -305,7 +274,7 @@ .] which is Anselm Garbe's personal window manager \(en targeted to satisfy Garbe's personal needs whenever conflicts appear. -Dwm had retained its lean elegance and its focused character, whereas +Dwm has retained its lean elegance and its focused character, whereas its community-driven predecessor \fIwmii\fP .[ wmii website @@ -318,42 +287,40 @@ .P MH is the most important of very few email systems in a tool chest style. Tool chests are powerful because they can be perfectly automated and -extended. They allow arbitrary kinds of front-ends to be -implemented on top of them quickly and without internal knowledge. +extended. +They allow the implementation of arbitrary kinds of front-ends +on top of the tool chest quickly and without internal knowledge. Additionally, tool chests are easier to maintain than monolithic programs. -As there are few tool chests for emailing and as MH-like ones are the most -popular among them, they should be developed further. -This keeps their -conceptional elegance and unique scripting qualities available to users. -Mmh creates a modern and convenient entry point to MH-like systems -for new and interested users. +MH-like email tool chests should be kept alive as they fill a market +niche by providing conceptional elegance and unique scripting qualities. +Mmh tries to create a modern and convenient entry point to MH-like +systems for new and interested users. .P The mmh project is motivated by deficits of nmh and -my wish for general changes, combined -with the nmh community's reluctancy to change. -.P -At that time, nmh had not adjusted to modern emailing needs well enough. +by my wish for general changes. +At the time the mmh project started, nmh had not yet adjusted to +modern emailing needs well enough. The default setup was completely unusable for modern emailing. Too much setup work was required. -Several modern features were already available but the community -did not want to have them as default. -Mmh is a way to change this. +Several modern features were already available, +but the community did not want to have them active by default. +Mmh is my way to change this. .P -In my eyes, MH's concepts could be exploited even better and -the style of the tools could be improved. Both would simplify -and generalize the system, providing cleaner interfaces and more -software leverage at the same time. -Mmh is a way to demonstrate this. +In my eyes, MH's concepts could be exploited better and +the style of the tools could be improved. +Both would simplify and generalize the system, providing cleaner +interfaces and greater software leverage at the same time. +Mmh is my way to demonstrate this. .P -In providing several parts of an email system, nmh can hardly +In providing multiple parts of the email system, nmh can hardly compete with the large specialized projects that focus -on only one of the components. -The situation can be improved by concentrating the development power +on one of the components only. +The situation could be improved by concentrating the development power on the most unique part of MH and letting the user pick his preferred set of other mail components. Today's pre-packaged software components encourage this model. -Mmh is a way to go for this approach. +Mmh is my way to provide this. .P It is worthwhile to fork nmh for the development of mmh, because the two projects focus on different goals and differ in @@ -363,7 +330,7 @@ .[ nmh-workers schnalke understanding nmh .] -In developing a separate experimental version new approaches can +In developing a separate experimental version, new approaches can easily be tried out without the need to discuss changes beforehand. In fact, revolutionary changes are hardly possible otherwise. .P @@ -379,10 +346,9 @@ Any effort needs to be targeted towards a specific goal in order to be successful. Therefore, a description of an imagined typical mmh user follows. -Mmh should satisfy his needs. -Actually, as mmh is my personal version of MH, this is a description -of myself. -Writing software for oneself is a reliable way to produce software +Actually, as mmh is my personal version of MH, +this is sort of a description of myself. +Developing software for one's own is a reliable way to produce software that matches the user's desires. .P The target user of mmh likes Unix and its philosophy. @@ -392,24 +358,24 @@ productivity by scripting the mail system. He uses modern email features, such as attachments, non-ASCII text, digital signatures and message encryption in a natural way. -He is able to set up mail system components, -and like to have the choice to pick the ones he prefers. +He is able to set up mail system components +and likes to pick the ones he prefers. He has a reasonably modern operating system that complies to the POSIX and ANSI C standards. .P The typical user invokes mmh commands directly in an interactive -shell session, but he uses them to automate mail handling tasks as well. +shell session, even on workstations where graphical front-ends could +be added. Likely, he runs his mail setup on a server machine, to which he connects via ssh. -He might also have a local mmh installation on his workstation. -Still, he tend to use mmh directly in the shell instead -of using graphical front-ends. -He definitely wants to be flexible and thus be able to change +He might automate mail processing with mmh tools +but definitely he uses the tools to build better tools. +In any case, he wants to have the flexibility to change his setup to suit his needs. .P The typical mmh user is a programmer. -He likes to, occasionally, take the opportunity of free software to put -hands on and get involved in the software he uses. +He likes to, occasionally, make use of the opportunity of free software +by putting hands on and getting involved in software he uses. In consequence, he likes small and clean code bases and cares for code quality. In general, he believes that: @@ -420,36 +386,33 @@ .BU Code optimizations for anything but readability should be avoided. .BU +Removed code is debugged code. +.BU Having a lot of choice is bad. -.BU -Removed code is debugged code. -.U2 "Goals -.P -The general goals for the mmh project are the following: +.U2 "Goals of the mmh Project .IP "Streamlining Mmh should be stripped down to its core, which is the user agent (MUA). The feature set should be distilled to the indispensable ones, effectively removing corner cases. Parts that do not add to the main task of being a conceptionally appealing user agent should be removed. -This includes the mail submission and mail retrieval facilities. +This includes the mail transfer and mail retrieval facilities. Choice should be reduced to the main options. All tools should be tightly shaped. .IP "Modernizing Mmh's feature set needs to become more modern. -Better support for attachments, digital signatures and message encryption -should be added. +Better support for attachments, digital signatures, and message +encryption should be added. MIME support should be integrated deeper and more naturally. The modern email features need to be readily available, out-of-the-box. -On the other hand, -bulletin board support and similar obsolete facilities can be dropped out. -Likewise, ancient technologies should not be supported any further. -The available concepts need to be expanded as far as possible. +On the other hand, obsolete facilities can be dropped out and +ancient technologies need not be further supported. +The available concepts should be expanded as far as possible. A small set of concepts should recur consistently. .IP "Styling -Mmh's source code needs to be updated to modern standards. +Mmh's source code should be updated to modern standards. Standardized library functions should replace non-standard versions whenever possible. Code should be separated into distinct modules when feasible. diff -r ff303d854771 -r 9317d789cef9 preface.roff --- a/preface.roff Thu Jul 12 20:01:46 2012 +0200 +++ b/preface.roff Thu Jul 12 22:04:51 2012 +0200 @@ -86,8 +86,8 @@ I had to discover that the community was reluctant to change. Its wish for compatibility was much stronger than its wish for convenient out-of-the-box setups \(en in contrast to my opinion. -This, once again, led to long discussions. -I came to understand their point of view, but it was different to mine. +Once again, this led to long discussions. +I came to understand their point of view, but it is different from mine. At the end of my three-month project, I had become familiar with nmh's code base and community, I had improved the project in minor ways, @@ -173,7 +173,7 @@ The reader is expected to know the format of email messages and the structure of email transfer systems, at least on a basic level. It's advisable to have cross-read RFC\|821 and RFC\|822. -Furthermore, basic understanding of MIME [RFC\|2045\(enRFC\|2049] +Furthermore, basic understanding of MIME [RFC\|2045\(en2049] is good to have. The Wikipedia provides good introduction-level information about email. .[ @@ -247,23 +247,15 @@ In this case it is a reference to the man page of .Pn cat , which is in section one of the Unix manual. -Internet technologies are specified by \fIRequests for Comments\fP (RFCs). -Throughout the document, they are referenced similar to ``RFC\|821''. +\fIRequests for Comments\fP (RFCs), which describe the working +of the Internet, are referenced as ``RFC\|821''. A list of relevant RFCs is located at the end of the document. Literature is cited in brackets, such as .[ ``[ kernighan pike unix programming env .]]''. -Citations of email messages and websites are in the same style -but distinguished by a prefix. -For example: -.[ ``[ -website mmh -.]]'' -and -.[ ``[ -nmh-workers mmh announce -.]]''. +Citations of email messages and websites are distinguished by +``mail:'' and ``web:'' prefixes. All references are collected at the end of the document. .P This document describes practical programming work.