# HG changeset patch # User markus schnalke # Date 1338557617 -7200 # Node ID 6a92e0208de0382fd2db36cfe6b559f57c737e18 # Parent cd50590902d301dea897668fc86f248c95095b39 Wrote about the removal of the mail transfer facilities. diff -r cd50590902d3 -r 6a92e0208de0 ch03.roff --- a/ch03.roff Fri Jun 01 12:42:52 2012 +0200 +++ b/ch03.roff Fri Jun 01 15:33:37 2012 +0200 @@ -9,8 +9,6 @@ .H1 "Stream-lining - -.H2 "Removal of non-MUA Tools .P MH had been considered an all-in-one system for mail handling. The community around nmh has a similar understanding. @@ -31,6 +29,120 @@ available resources should be concentrated at the point where MH is most unique. This is clearly the MUA part. .P +The goal for mmh was to remove peripheral parts and stream-line +it for the MUA task. + + +.H2 "Removal of Mail Transfer Facilities +.P +In contrast to nmh, which also provides mail submission and mail retrieval +facilities, mmh is a MUA only. +.P +The MSA is called ``Message Transfer Service'' (MTS) in nmh. +The facility establishes TCP/IP connections and speaks SMTP to submit +messages for relay to the outside world. +This part is implemented in the +.Pn post +command. +Demanded by the changes in +emailing, this part of nmh required changes in the last years. +Encrypted connections needed to be supported, hence SASL was introduced +into nmh. This added complexity to the nmh without improving it in +its core functions. Also, keeping up with recent developments in +this field needs requires development power and specialists. +Mmh cuts this whole facility off and depends on an external MTA instead. +The only outgoing interface available to mmh is the +.Pn sendmail +command. +Almost any MTA provides a +.Pn sendmail +command. +It not, any program can be substituted if it reads the +message from the standard input, extracts the recipient addresses +from the message header and does not conflict +with sendmail-specific command line arguments. +.P +To retrieve mail, the +.Pn inc +command in nmh has the ability to establish TCP/IP connections +and speaks POP3 to retrieve mail from remote servers. +As with mail submission, here encrypted connections are required +today, thus SASL support was added. +As POP3 is superseded by IMAP more and more, support for message +retrieval through IMAP will become necessary to be added soon. +Mmh has no support for retrieving mail from remote locations. +It depends on an external tool to cover this task. +There are two ways for messages to enter mmh's mail storage: +Incorporate them with +.Pn inc +from the system maildrop, or with +.Pn rcvstore +from the standard input. +.P +In consequence, mmh includes neither networking nor SASL code anymore. +Two large separate functional units are removed. +They account for about XXX lines of code and XXX libraries. +.P +With the removal of the MSA and MRA, mmh converted from an all-in-one +mail system to the core: the MUA. +Following the Unix philosophy, it focuses on one job and to do that well. +Now, of course, mmh depends on third-party software. +An external MTA/MSA is required to transfer mail to the outside world; +an external MRA is required to retrieve mail from remote machines. +There exist excellent implementations of such software, +which do this specific task likely much better than the internal +versions of nmh do it. Also, this provides the choice for the best +suiting one of the available implementation. +.P +As it had already been possible to use an external MSA or MRA, +why not keep the internal version for convenience? +If this would question the sense in having a fall-back pager in all +the command line tools, in case +.Pn more +or +.Pn less +wouldn't be available, the answer is intuitively seen. +Now, an MSA or MRA is clearly more complex than a text pager, but +still the concept holds: If programs become complex, split them; +if projects become complex, split them. +Complexity is demanded by the problem to solve. Decades ago, +emailing had been small and simple. +(Remember, +.Pn /bin/mail +had once covered anything there was to email.) +As the complexity in emailing increased, MH remainded mostly unchanged. +Nontheless, in nmh the POP server, which the original MH had included, +was removed. Now is the time to take one step further and remove +the MSA and MRA. +Not only does it decrease the code amount of the project, +but more important, it removes the whole field of message transfer +with all its implications from the project. +.P +Users of MH are usually able to set up an external MSA and MRA. +Also, the popular MSAs and MRAs have large communities and a lot +of documentation available. +.P +Choices for MSAs range from the full-featured +.I Postfix +over mid-size solutions like +.I masqmail +and +.I dma +to small forwarders like +.I ssmtp +and +.I nullmailer . +Choices for MRAs include +.I fetchmail , +.I getmail , +.I mpop +and +.I fdm . + + + +.H2 "Removal of non-MUA Tools +.P Several of nmh's tools were removed from mmh because they didn't match the main focus of adding to the MUA's task. .P @@ -99,9 +211,6 @@ .Pn wmh , saved more than 7\|000 lines of C code \(en a major achievement. -.U2 "Removal of the MTS -.P - .H2 "mhshow show Merge .P