meillo@0: .H0 "Work Report meillo@0: .P meillo@0: foo meillo@0: .P meillo@0: bar meillo@0: meillo@12: .H1 "Removal of Code Relicts meillo@0: .P meillo@12: The code base of mmh originates in the late 70s, had been extensively meillo@12: worked on in the mid 80s, and had been partly reorganized and extended meillo@12: in the 90s. Relicts of all those times had gathered in the code base. meillo@12: My goal was to remove any ancient code parts. One part of the task was meillo@12: converting obsolete code constructs to standard constructs, the other part meillo@12: was dropping obsolete functions. meillo@12: .P meillo@12: As I'm not even thirty years old and have no more than seven years of meillo@12: Unix experience, I needed to learn about the history in retroperspective. meillo@12: Older people likely have used those ancient constructs themself meillo@12: and have suffered from their incompatiblities and have longed for meillo@12: standardization. Unfortunately, I have only read that others had done so. meillo@12: This put me in a much more difficult positions when working on the old meillo@12: code. I needed to recherche what other would have known by heart from meillo@12: experience. All my programming experience comes from a time past ANSI C meillo@12: and past POSIX. Although I knew about the times before, I took the meillo@12: current state implicitely for granted most of the time. meillo@12: .P meillo@12: Being aware of meillo@12: these facts, I rather let people with more historic experience solve the meillo@12: task of converting the ancient code constructs to standardized ones. meillo@12: Luckily, Lyndon Nerenberg focused on this task at the nmh project. meillo@12: He converted large parts of the code to POSIX constructs, removing meillo@12: the conditionals compilation for now standardized features. meillo@12: I'm thankful for this task being solved. I only pulled the changes into meillo@12: mmh. meillo@12: .P meillo@12: The other task of dropping ancient functionality to remove old code, meillo@12: I did myself, though. My position to strip mmh to the bare minimum of meillo@12: frequently used features is much more revolutional than the nmh community meillo@12: sees it. Without the need to justify my decisions, I was able to quickly meillo@12: remove code I considered ancient. The need to discuss my decisions with meillo@12: peers likely would have slowed this process down. Of course, I did research meillo@12: if a particular feature really should be dropped. Having not had any meillo@12: contact to this feature within my computer life was a first indicator to meillo@12: drop it, but I also asked others and searched the literature for modern meillo@12: usage of the feature. If it appeared to be truly ancient, I dropped it. meillo@12: The reason for dropping is always part of the commit message in the meillo@12: version control system. Thus, it is easy for others to check their meillo@12: view on the topic with mine and possibly to argue for reinclusion. meillo@12: meillo@12: .U2 "MMDF maildrop support meillo@12: .P meillo@12: I did drop any support for the MMDF maildrop format. This type of format meillo@12: is conceptionally similar to the mbox format, but uses four bytes with meillo@12: value 1 (\fL^A^A^A^A\fP) as message delimiter, meillo@12: instead of the string ``\fLFrom\0\fP''. meillo@12: Due to the similarity and mbox being the de-facto standard maildrop meillo@12: format on Unix, but also due to the larger influence of Sendmail than MMDF, meillo@12: the MMDF maildrop format had vanished. meillo@12: .P meillo@12: The simplifications within the code were only moderate. Switches could meillo@12: be removed from tools like meillo@12: .L packf , meillo@12: which generate packed mailboxes. Only one packed mailbox format remained: meillo@12: mbox. meillo@12: The most important changes affect the equally named mail parsing routine in meillo@12: .L sbr/m_getfld.c . meillo@12: The direct MMDF code had been removed, but as now only one packed mailbox meillo@12: format is left, code structure simplifications are likely possible. meillo@12: The reason why they are still outstanding is the heavily optimized code meillo@12: of \fLm_getfld()\fP. Changes beyond a small local scope \(en meillo@12: which restructuring in its core is \(en cause a high risk of damaging meillo@12: the intricate workings of the optimized code. This problem is know meillo@12: to the developers of nmh, too. They also avoid touching this minefield meillo@12: if possible. meillo@12: meillo@12: .U2 "UUCP Bang Paths meillo@12: .P meillo@12: More questionably than the former topic is the removal of support for the meillo@12: UUCP bang path address style. However, the user may translate the bang meillo@12: paths on retrieval to Internet addresses and the other way on posting meillo@12: messages. The former can be done my an MDA like procmail; the latter meillo@12: by a sendmail wrapper. This would ensure that any address handling would meillo@12: work as expected. However, it might just work well without any meillo@12: such modifications, as mmh does not touch addresses much, in general. meillo@12: But I can't ensure as I have never used an environment with bang paths. meillo@12: Also, the behavior might break at any point in further development. meillo@12: meillo@12: .U2 "Hardcopy terminal support meillo@12: .P meillo@12: More of a funny anecdote is the remaining of a check for printing to a meillo@12: hardcopy terminal until Spring 2012, when I finally removed it. meillo@12: I surely would be very happy to see such a terminal in action, maybe meillo@12: actually being able to work on it, but I fear my chances are null. meillo@12: .P meillo@12: The check only prevented a pager to be placed between the outputting meillo@12: program (\fLmhl\fP) and the terminal. This could have been ensured with meillo@12: the \fL-nomoreproc\fP at the command line statically, too. meillo@12: meillo@12: .U2 "Removed support for header fields meillo@12: .P meillo@12: The `Encrypted' header had been introduced by RFC\^822, but already meillo@12: marked legacy in RFC 2822. It was superseded by FIXME. meillo@12: Mmh does no more support this header. meillo@12: .P meillo@12: `Content-MD5' headers were introduced by RFC\^1864. They provide only meillo@12: a verification of data corruption during the transfer. By no means can meillo@12: they ensure verbatim end-to-end delivery of the contents. This is clearly meillo@12: stated in the RFC. The proper approach to provide verificationability meillo@12: of content in an end-to-end relationship is the use of digital cryptography meillo@12: (RFCs FIXME). On the other hand, transfer protocols should ensure the meillo@12: integrity of the transmission. In combinations these two approaches meillo@12: make the `Content-MD5' header field useless. In consequence, I removed meillo@12: the support for it. By this removal, MD5 computation is not needed meillo@12: anywhere in mmh. Hence, over 500 lines of code were removed by this one meillo@12: change. Even if the `Content-MD5' header field is useful sometimes, meillo@12: I value its usefulnes less than the improvement in maintainability, caused meillo@12: by the removal. meillo@12: meillo@12: meillo@0: meillo@0: .H1 "Paths to ... meillo@0: .P meillo@0: foo meillo@0: meillo@0: .H1 "Path Notations meillo@0: .P meillo@0: foo meillo@0: meillo@0: .H1 "Attachments meillo@0: .P meillo@0: foo meillo@0: meillo@0: .H1 "Blind Carbon Copies meillo@0: .P meillo@0: foo meillo@0: meillo@0: .H1 "Good Defaults meillo@0: .P meillo@0: foo meillo@0: meillo@0: .H1 "Modularization meillo@0: .P meillo@0: foo meillo@0: meillo@0: .H1 "Code style meillo@0: .P meillo@0: foo