rev |
line source |
meillo@58
|
1 .H0 "Discussion
|
meillo@0
|
2 .P
|
meillo@58
|
3 This main chapter discusses the practical work done in the mmh project.
|
meillo@58
|
4 It is structured along the goals to achieve. The concrete work done
|
meillo@58
|
5 is described in the examples of how the general goals were achieved.
|
meillo@87
|
6 The discussion compares the current version of mmh with the state of
|
meillo@87
|
7 nmh just before the mmh project started, i.e. Fall 2011.
|
meillo@87
|
8 Current changes of nmh will be mentioned only as side notes.
|
meillo@87
|
9 .\" XXX where do I discuss the parallel development of nmh?
|
meillo@58
|
10
|
meillo@58
|
11
|
meillo@58
|
12
|
meillo@58
|
13 .H1 "Stream-lining
|
meillo@58
|
14
|
meillo@0
|
15 .P
|
meillo@58
|
16 MH had been considered an all-in-one system for mail handling.
|
meillo@58
|
17 The community around nmh has a similar understanding.
|
meillo@87
|
18 In fundamental difference, mmh shall be a MUA only.
|
meillo@87
|
19 I believe that the development of all-in-one mail systems is obsolete.
|
meillo@87
|
20 Today, email is too complex to be fully covered by single projects.
|
meillo@87
|
21 Such a project won't be able to excel in all aspects.
|
meillo@87
|
22 Instead, the aspects of email should be covered my multiple projects,
|
meillo@87
|
23 which then can be combined to form a complete system.
|
meillo@87
|
24 Excellent implementations for the various aspects of email exist already.
|
meillo@87
|
25 Just to name three examples: Postfix is a specialized MTA,
|
meillo@87
|
26 Procmail is a specialized MDA, and Fetchmail is a specialized MRA.
|
meillo@87
|
27 I believe that it is best to use such specilized tools instead of
|
meillo@87
|
28 providing the same function again as a side-component in the project.
|
meillo@58
|
29 .P
|
meillo@87
|
30 Doing something well, requires to focus on a small set of specific aspects.
|
meillo@87
|
31 Under the assumption that focused development produces better results
|
meillo@87
|
32 in the particular area, specialized projects will likely be superior
|
meillo@87
|
33 in their field of focus.
|
meillo@87
|
34 Hence, all-in-one mail system projects \(en no matter if monolithic
|
meillo@87
|
35 or modular \(en will never be the best choice in any of the fields.
|
meillo@87
|
36 Even in providing the best consistent all-in-one system they are likely
|
meillo@87
|
37 to be beaten by projects that focus only on integrating existing mail
|
meillo@87
|
38 components to a homogenious system.
|
meillo@87
|
39 .P
|
meillo@87
|
40 The limiting resource in Free Software community development
|
meillo@87
|
41 is usually man power.
|
meillo@87
|
42 If the development power is spread over a large development area,
|
meillo@87
|
43 it becomes even more difficult to compete with the specialists in the
|
meillo@87
|
44 various fields.
|
meillo@87
|
45 The concrete situation for MH-based mail systems is even tougher,
|
meillo@87
|
46 given the small and aged community, including both developers and users,
|
meillo@87
|
47 it has.
|
meillo@87
|
48 .P
|
meillo@87
|
49 In consequence, I believe that the available development resources
|
meillo@87
|
50 should be focused on the point where MH is most unique.
|
meillo@87
|
51 This is clearly the user interface \(en the MUA.
|
meillo@87
|
52 Peripheral parts should be removed to stream-line mmh for the MUA task.
|
meillo@60
|
53
|
meillo@60
|
54
|
meillo@87
|
55 .H2 "Removal of the Mail Transfer Facilities
|
meillo@60
|
56 .P
|
meillo@60
|
57 In contrast to nmh, which also provides mail submission and mail retrieval
|
meillo@87
|
58 agents, mmh is a MUA only.
|
meillo@66
|
59 This general difference in the view on the character of nmh
|
meillo@76
|
60 initiated the development of mmh.
|
meillo@66
|
61 Removing the mail transfer facilities had been the first work task
|
meillo@76
|
62 in the mmh project.
|
meillo@60
|
63 .P
|
meillo@66
|
64 The MSA is called \fIMessage Transfer Service\fP (MTS) in nmh.
|
meillo@76
|
65 The facility established network connections and spoke SMTP to submit
|
meillo@60
|
66 messages for relay to the outside world.
|
meillo@76
|
67 This part was implemented by the
|
meillo@60
|
68 .Pn post
|
meillo@60
|
69 command.
|
meillo@87
|
70 The changes in emailing in the last years
|
meillo@87
|
71 demanded changes in this part of nmh too.
|
meillo@76
|
72 Encryption and authetication for network connections
|
meillo@87
|
73 needed to be supported, hence TLS and SASL were introduced into nmh.
|
meillo@87
|
74 This added complexity to nmh without improving it in its core functions.
|
meillo@87
|
75 Also, keeping up with recent developments in the field of
|
meillo@87
|
76 mail transfer requires development power and specialists.
|
meillo@87
|
77 In mmh this whole facility was simply cut off.
|
meillo@76
|
78 .Ci f6aa95b724fd8c791164abe7ee5468bf5c34f226
|
meillo@76
|
79 .Ci fecd5d34f65597a4dfa16aeabea7d74b191532c3
|
meillo@76
|
80 .Ci 156d35f6425bea4c1ed3c4c79783dc613379c65b
|
meillo@87
|
81 Instead, mmh depends on an external MSA.
|
meillo@60
|
82 The only outgoing interface available to mmh is the
|
meillo@60
|
83 .Pn sendmail
|
meillo@87
|
84 command, which almost any MSA provides.
|
meillo@87
|
85 If not, a wrapper program can be written.
|
meillo@87
|
86 It must read the message from the standard input, extract the
|
meillo@87
|
87 recipient addresses from the message header, and hand the message
|
meillo@87
|
88 over to the MSA.
|
meillo@87
|
89 For example, a wrapper script for qmail would be:
|
meillo@87
|
90 .VS
|
meillo@87
|
91 #!/bin/sh
|
meillo@87
|
92 # ignore command line arguments
|
meillo@87
|
93 exec qmail-inject
|
meillo@87
|
94 VE
|
meillo@87
|
95 The requirement to parse the recipient addresses out of the message header
|
meillo@87
|
96 is likely to be removed in the future.
|
meillo@87
|
97 Then mmh would give the recipient addresses as command line arguments.
|
meillo@87
|
98 This is clearly the better interface, but mmh does not provide it yet.
|
meillo@87
|
99 .\" XXX implement it
|
meillo@60
|
100 .P
|
meillo@60
|
101 To retrieve mail, the
|
meillo@60
|
102 .Pn inc
|
meillo@76
|
103 command established network connections
|
meillo@76
|
104 and spoke POP3 to retrieve mail from remote servers.
|
meillo@76
|
105 As with mail submission, the network connections required encryption and
|
meillo@87
|
106 authentication, thus TLS and SASL were added.
|
meillo@87
|
107 Support for message retrieval through IMAP will become necessary
|
meillo@87
|
108 to be added soon, too, and so on for any changes in mail transfer.
|
meillo@76
|
109 Mmh has dropped the support for retrieving mail from remote locations.
|
meillo@76
|
110 .Ci ab7b48411962d26439f92f35ed084d3d6275459c
|
meillo@76
|
111 Instead, it depends on an external tool to cover this task.
|
meillo@87
|
112 In mmh there exist two paths for messages to enter mmh's mail storage:
|
meillo@87
|
113 (1) Mail can be incorporate with
|
meillo@60
|
114 .Pn inc
|
meillo@87
|
115 from the system maildrop, or (2) with
|
meillo@60
|
116 .Pn rcvstore
|
meillo@87
|
117 by reading them, one at a time, from the standard input.
|
meillo@60
|
118 .P
|
meillo@60
|
119 With the removal of the MSA and MRA, mmh converted from an all-in-one
|
meillo@87
|
120 mail system to being a MUA only.
|
meillo@87
|
121 Following the Unix philosophy, it now focuses on one job and
|
meillo@76
|
122 tries to do that one well.
|
meillo@76
|
123 Not only the programs follow that tenet but also the project itself does so.
|
meillo@60
|
124 Now, of course, mmh depends on third-party software.
|
meillo@87
|
125 An external MSA is required to transfer mail to the outside world;
|
meillo@60
|
126 an external MRA is required to retrieve mail from remote machines.
|
meillo@60
|
127 There exist excellent implementations of such software,
|
meillo@76
|
128 which do this specific task likely better than the internal
|
meillo@87
|
129 versions had done it.
|
meillo@87
|
130 Also, the best suiting programs can be freely chosen.
|
meillo@60
|
131 .P
|
meillo@60
|
132 As it had already been possible to use an external MSA or MRA,
|
meillo@60
|
133 why not keep the internal version for convenience?
|
meillo@76
|
134 The question whether there is sense in having a fall-back pager in all
|
meillo@76
|
135 the command line tools, for the cases when
|
meillo@60
|
136 .Pn more
|
meillo@60
|
137 or
|
meillo@60
|
138 .Pn less
|
meillo@76
|
139 aren't available, appears to be ridiculous.
|
meillo@87
|
140 Now, an MSA or MRA is more complex than a text pager
|
meillo@87
|
141 and not necessarily available but still the concept of orthogonal
|
meillo@87
|
142 design holds: ``Write programs that do one thing and do it well.''
|
meillo@87
|
143 .[
|
meillo@87
|
144 mcilroy unix phil
|
meillo@87
|
145 p. 53
|
meillo@87
|
146 .]
|
meillo@87
|
147 .[
|
meillo@87
|
148 mcilroy bstj foreword
|
meillo@87
|
149 .]
|
meillo@87
|
150 Here, this part of the Unix philosophy was applied not only
|
meillo@87
|
151 to the programs but to the project itself.
|
meillo@87
|
152 In other words:
|
meillo@87
|
153 ``Develop projects that focus on one thing and do it well.''
|
meillo@87
|
154 Projects grown complex should be split for the same reasons programs grown
|
meillo@87
|
155 complex should be split.
|
meillo@87
|
156 If it is conceptionally more elegant to have the MSA and MRA
|
meillo@87
|
157 separate projects then they should be separated.
|
meillo@87
|
158 This is the case here, in my opinion.
|
meillo@87
|
159 The RFCs propose this separation by clearly distinguishing the different
|
meillo@87
|
160 mail handling tasks.
|
meillo@87
|
161 .[
|
meillo@87
|
162 rfc 821
|
meillo@87
|
163 .]
|
meillo@87
|
164 The small interfaces between the mail agents support the separation.
|
meillo@76
|
165 .P
|
meillo@87
|
166 In the beginning, email had been small and simple.
|
meillo@76
|
167 (\c
|
meillo@60
|
168 .Pn /bin/mail
|
meillo@76
|
169 had once covered anything there was to email and still had been small
|
meillo@76
|
170 and simple.)
|
meillo@76
|
171 Then the essential complexity of email increased.
|
meillo@87
|
172 (Essential complexity is the complexity defined by the problem itself.\0
|
meillo@87
|
173 .[[
|
meillo@87
|
174 brooks no silver bullet
|
meillo@87
|
175 .]])
|
meillo@87
|
176 Email systems reacted to this change: They grew.
|
meillo@87
|
177 RFCs started to introduce mail agents and separated the various tasks
|
meillo@87
|
178 because the existing tasks became more extensive and new tasks appeared.
|
meillo@87
|
179 Again, email systems grew, or they split parts off.
|
meillo@76
|
180 In nmh, for instance, the POP server, which the original MH had included,
|
meillo@76
|
181 was removed.
|
meillo@87
|
182 Now is the time to go one step further and remove the MSA and MRA, too.
|
meillo@87
|
183 Not only does this decrease the code size of the project,
|
meillo@87
|
184 but, more important, it unburdens mmh of the whole field of
|
meillo@87
|
185 message transfer with all its implications for the project.
|
meillo@87
|
186 There's no more need to concern with changes in network transfer.
|
meillo@76
|
187 This independence is received by depending on an external program
|
meillo@76
|
188 that covers the field.
|
meillo@76
|
189 Today, this is a reasonable exchange.
|
meillo@60
|
190 .P
|
meillo@87
|
191 Function can be added in three different ways:
|
meillo@87
|
192 .BU
|
meillo@87
|
193 Implementing the function originally in the project.
|
meillo@87
|
194 .BU
|
meillo@87
|
195 Depending on a library that provides the function.
|
meillo@87
|
196 .BU
|
meillo@87
|
197 Depending on a program that provides the function.
|
meillo@87
|
198 .P
|
meillo@87
|
199 Whereas adding the function originally to the project increases the
|
meillo@76
|
200 code size most and requires most maintenance and development work,
|
meillo@87
|
201 it makes the project most independent of other software.
|
meillo@87
|
202 Using libraries or external programs require less maintenance work
|
meillo@87
|
203 but introduces dependencies on external software.
|
meillo@87
|
204 Programs have the smallest interfaces and provide the best separation
|
meillo@87
|
205 but possibly limit the information exchange.
|
meillo@87
|
206 External libraries are stronger connected than external programs,
|
meillo@87
|
207 thus information can be exchanged more flexible.
|
meillo@87
|
208 Adding code to a project increases maintenance work.
|
meillo@87
|
209 .\" XXX ref
|
meillo@87
|
210 Implementing complex functions originally in the project will add
|
meillo@87
|
211 a lot of code.
|
meillo@87
|
212 This should be avoided if possible.
|
meillo@66
|
213 Hence, the dependencies only change in kind, not in their existence.
|
meillo@66
|
214 In mmh, library dependencies on
|
meillo@66
|
215 .Pn libsasl2
|
meillo@66
|
216 and
|
meillo@66
|
217 .Pn libcrypto /\c
|
meillo@66
|
218 .Pn libssl
|
meillo@66
|
219 were treated against program dependencies on an MSA and an MRA.
|
meillo@87
|
220 This also meant treating build-time dependencies against run-time
|
meillo@87
|
221 dependencies.
|
meillo@66
|
222 Besides program dependencies providing the stronger separation
|
meillo@66
|
223 and being more flexible, they also allowed
|
meillo@66
|
224 over 6\|000 lines of code to be removed from mmh.
|
meillo@66
|
225 This made mmh's code base about 12\|% smaller.
|
meillo@87
|
226 Reducing the project's code size by such an amount without actually
|
meillo@87
|
227 losing functionality is a convincing argument.
|
meillo@87
|
228 Actually, as external MSAs and MRAs are likely superior to the
|
meillo@87
|
229 project's internal versions, the common user even gains functionality.
|
meillo@66
|
230 .P
|
meillo@76
|
231 Users of MH should not have problems to set up an external MSA and MRA.
|
meillo@60
|
232 Also, the popular MSAs and MRAs have large communities and a lot
|
meillo@60
|
233 of documentation available.
|
meillo@87
|
234 Choices for MSAs range from full-featured MTAs like
|
meillo@60
|
235 .I Postfix
|
meillo@87
|
236 over mid-size MTAs like
|
meillo@60
|
237 .I masqmail
|
meillo@60
|
238 and
|
meillo@60
|
239 .I dma
|
meillo@60
|
240 to small forwarders like
|
meillo@60
|
241 .I ssmtp
|
meillo@60
|
242 and
|
meillo@60
|
243 .I nullmailer .
|
meillo@60
|
244 Choices for MRAs include
|
meillo@60
|
245 .I fetchmail ,
|
meillo@60
|
246 .I getmail ,
|
meillo@60
|
247 .I mpop
|
meillo@60
|
248 and
|
meillo@60
|
249 .I fdm .
|
meillo@60
|
250
|
meillo@60
|
251
|
meillo@60
|
252 .H2 "Removal of non-MUA Tools
|
meillo@60
|
253 .P
|
meillo@87
|
254 One goal of mmh is to remove the tools that are not part of the MUA's task.
|
meillo@87
|
255 Further more, any tools that don't improve the MUA's job significently
|
meillo@87
|
256 should be removed.
|
meillo@87
|
257 Loosely related and rarely used tools distract from the lean appearance.
|
meillo@87
|
258 They require maintenance work without adding much to the core task.
|
meillo@87
|
259 On removing these tools, the project shall become more stream-lined
|
meillo@87
|
260 and focused.
|
meillo@76
|
261 In mmh the following tools are not available anymore:
|
meillo@62
|
262 .BU
|
meillo@58
|
263 .Pn conflict
|
meillo@87
|
264 was removed
|
meillo@76
|
265 .Ci 8b235097cbd11d728c07b966cf131aa7133ce5a9
|
meillo@87
|
266 because it is a mail system maintenance tool that is not MUA-related.
|
meillo@87
|
267 It even checked
|
meillo@58
|
268 .Fn /etc/passwd
|
meillo@58
|
269 and
|
meillo@58
|
270 .Fn /etc/group
|
meillo@87
|
271 for consistency, which is completely unrelated to email.
|
meillo@87
|
272 A tool like
|
meillo@87
|
273 .Pn conflict
|
meillo@87
|
274 is surely useful, but it should not be shipped with mmh.
|
meillo@76
|
275 .\" XXX historic reasons?
|
meillo@62
|
276 .BU
|
meillo@58
|
277 .Pn rcvtty
|
meillo@87
|
278 was removed
|
meillo@87
|
279 .Ci 14767c94b3827be7c867196467ed7aea5f6f49b0
|
meillo@87
|
280 because its usecase of writing to the user's terminal
|
meillo@76
|
281 on receiving of mail is obsolete.
|
meillo@87
|
282 If users like to be informed of new mail, the shell's
|
meillo@58
|
283 .Ev MAILPATH
|
meillo@87
|
284 variable or graphical notifications are technically more appealing.
|
meillo@62
|
285 Writing directly to a terminals is hardly ever wanted today.
|
meillo@62
|
286 If though one wants to have it this way, the standard tool
|
meillo@58
|
287 .Pn write
|
meillo@58
|
288 can be used in a way similar to:
|
meillo@82
|
289 .VS
|
meillo@58
|
290 scan -file - | write `id -un`
|
meillo@82
|
291 VE
|
meillo@62
|
292 .BU
|
meillo@58
|
293 .Pn viamail
|
meillo@87
|
294 was removed
|
meillo@87
|
295 .Ci eda72d6a7a7c20ff123043fb7f19c509ea01f932
|
meillo@87
|
296 when the new attachment system was activated, because
|
meillo@58
|
297 .Pn forw
|
meillo@76
|
298 could then cover the task itself.
|
meillo@62
|
299 The program
|
meillo@58
|
300 .Pn sendfiles
|
meillo@62
|
301 was rewritten as a shell script wrapper around
|
meillo@58
|
302 .Pn forw .
|
meillo@76
|
303 .Ci 0e82199cf3c991a173e0ac8aa776efdb3ded61e6
|
meillo@62
|
304 .BU
|
meillo@58
|
305 .Pn msgchk
|
meillo@87
|
306 was removed
|
meillo@87
|
307 .Ci bb9360ead7eb7a3fedcce2eeedfc660014e41dbe ,
|
meillo@87
|
308 because it lost its use case when POP support was removed.
|
meillo@76
|
309 A call to
|
meillo@58
|
310 .Pn msgchk
|
meillo@87
|
311 provided hardly more information than:
|
meillo@82
|
312 .VS
|
meillo@58
|
313 ls -l /var/mail/meillo
|
meillo@82
|
314 VE
|
meillo@87
|
315 It did distinguished between old and new mail, but
|
meillo@87
|
316 this detail information and can be retrieved with
|
meillo@76
|
317 .Pn stat (1),
|
meillo@62
|
318 too.
|
meillo@62
|
319 A very small shell script could be written to output the information
|
meillo@76
|
320 in a similar way, if truly necessary.
|
meillo@76
|
321 As mmh's
|
meillo@76
|
322 .Pn inc
|
meillo@87
|
323 only incorporates mail from the user's local maildrop,
|
meillo@62
|
324 and thus no data transfers over slow networks are involved,
|
meillo@76
|
325 there's hardly any need to check for new mail before incorporating it.
|
meillo@62
|
326 .BU
|
meillo@58
|
327 .Pn msh
|
meillo@87
|
328 was removed
|
meillo@76
|
329 .Ci 916690191222433a6923a4be54b0d8f6ac01bd02
|
meillo@87
|
330 because the tool was in conflict with the philosophy of MH.
|
meillo@76
|
331 It provided an interactive shell to access the features of MH,
|
meillo@76
|
332 but it wasn't just a shell, tailored to the needs of mail handling.
|
meillo@76
|
333 Instead it was one large program that had several MH tools built in.
|
meillo@76
|
334 This conflicts with the major feature of MH of being a tool chest.
|
meillo@76
|
335 .Pn msh 's
|
meillo@76
|
336 main use case had been accessing Bulletin Boards, which have seized to
|
meillo@62
|
337 be popular.
|
meillo@62
|
338 .P
|
meillo@62
|
339 Removing
|
meillo@58
|
340 .Pn msh ,
|
meillo@76
|
341 together with the truly archaic code relicts
|
meillo@58
|
342 .Pn vmh
|
meillo@58
|
343 and
|
meillo@58
|
344 .Pn wmh ,
|
meillo@62
|
345 saved more than 7\|000 lines of C code \(en
|
meillo@66
|
346 about 15\|% of the project's original source code amount.
|
meillo@76
|
347 .P
|
meillo@76
|
348 Having less code (with equal readability, of course)
|
meillo@76
|
349 for the same functionality is an advantage.
|
meillo@63
|
350 Less code means less bugs and less maintenance work.
|
meillo@76
|
351 As
|
meillo@63
|
352 .Pn rcvtty
|
meillo@63
|
353 and
|
meillo@63
|
354 .Pn msgchk
|
meillo@87
|
355 are assumed to be rarely used and can be implemented in different ways,
|
meillo@87
|
356 why should one keep them?
|
meillo@76
|
357 Removing them stream-lines mmh.
|
meillo@63
|
358 .Pn viamail 's
|
meillo@63
|
359 use case is now partly obsolete and partly covered by
|
meillo@63
|
360 .Pn forw ,
|
meillo@76
|
361 hence there's no reason to still maintain it.
|
meillo@63
|
362 .Pn conflict
|
meillo@76
|
363 is not related to the mail client, and
|
meillo@63
|
364 .Pn msh
|
meillo@63
|
365 conflicts with the basic concept of MH.
|
meillo@76
|
366 Theses two tools might still be useful, but they should not be part of mmh.
|
meillo@63
|
367 .P
|
meillo@76
|
368 Finally, there's
|
meillo@76
|
369 .Pn slocal .
|
meillo@76
|
370 .Pn slocal
|
meillo@76
|
371 is an MDA and thus not directly MUA-related.
|
meillo@78
|
372 It should be removed, because including it is a violation
|
meillo@78
|
373 of the idea that mmh is a MUA only.
|
meillo@78
|
374 It should become a separate project.
|
meillo@87
|
375 However,
|
meillo@76
|
376 .Pn slocal
|
meillo@76
|
377 provides rule-based processing of messages, like filing them into
|
meillo@76
|
378 different folders, which is otherwise not available in mmh.
|
meillo@87
|
379 Although
|
meillo@76
|
380 .Pn slocal
|
meillo@87
|
381 does neither pull in dependencies nor does it include a separate
|
meillo@87
|
382 technical area (cf. Sec. XXX),
|
meillo@87
|
383 still it accounts for about 1\|000 lines of code that need to be maintained.
|
meillo@76
|
384 As
|
meillo@76
|
385 .Pn slocal
|
meillo@76
|
386 is almost self-standing, it should be split off into a separate project.
|
meillo@76
|
387 This would cut the strong connection between the MUA mmh and the MDA
|
meillo@76
|
388 .Pn slocal .
|
meillo@87
|
389 For anyone not using MH,
|
meillo@87
|
390 .Pn slocal
|
meillo@87
|
391 would become yet another independent MDA, like
|
meillo@87
|
392 .I procmail .
|
meillo@87
|
393 The need to install a complete MH system to have
|
meillo@87
|
394 .Pn slocal
|
meillo@87
|
395 would be gone.
|
meillo@76
|
396 Likewise, mmh users could decide to use
|
meillo@76
|
397 .I procmail
|
meillo@87
|
398 without having a second, unused MDA,
|
meillo@87
|
399 .Pn slocal ,
|
meillo@76
|
400 installed.
|
meillo@76
|
401 That's conceptionally the best solution.
|
meillo@76
|
402 Yet,
|
meillo@76
|
403 .Pn slocal
|
meillo@87
|
404 is not split off.
|
meillo@87
|
405 I feel unsure with removing it from mmh.
|
meillo@87
|
406 Hence, I defer the decision over
|
meillo@87
|
407 .Pn slocal .
|
meillo@87
|
408 In the meanwhile
|
meillo@78
|
409 .Pn slocal
|
meillo@87
|
410 does not hurt because it is unrelated to the rest of mmh.
|
meillo@0
|
411
|
meillo@58
|
412
|
meillo@76
|
413 .H2 "\fLshow\fP and \fPmhshow\fP
|
meillo@58
|
414 .P
|
meillo@69
|
415 Since the very beginning \(en already in the first concept paper \(en
|
meillo@58
|
416 .Pn show
|
meillo@62
|
417 had been MH's message display program.
|
meillo@58
|
418 .Pn show
|
meillo@76
|
419 mapped message numbers and sequences to files and invoked
|
meillo@58
|
420 .Pn mhl
|
meillo@76
|
421 to have the files formated.
|
meillo@76
|
422 For MIME, this approach wasn't sufficient anymore.
|
meillo@58
|
423 MIME messages can consist of multiple parts, some of which aren't
|
meillo@62
|
424 directly displayable, and text content might be encoded in
|
meillo@58
|
425 foreign charsets.
|
meillo@58
|
426 .Pn show 's
|
meillo@76
|
427 understanding of messages and
|
meillo@58
|
428 .Pn mhl 's
|
meillo@58
|
429 limited display facilities couldn't cope with the task any longer.
|
meillo@62
|
430 .P
|
meillo@76
|
431 Instead of extending these tools, additional tools were written from scratch
|
meillo@58
|
432 and then added to the MH tool chest. Doing so is encouraged by the
|
meillo@58
|
433 tool chest approach. The new tools could be added without interfering
|
meillo@78
|
434 with the existing ones.
|
meillo@78
|
435 Modular design is a great advantage for extending a system.
|
meillo@62
|
436 First, the new MIME features were added in form of the single program
|
meillo@58
|
437 .Pn mhn .
|
meillo@58
|
438 The command
|
meillo@82
|
439 .Cl "mhn -show 42
|
meillo@58
|
440 would show the MIME message numbered 42.
|
meillo@58
|
441 With the 1.0 release of nmh in February 1999, Richard Coleman finished
|
meillo@58
|
442 the split of
|
meillo@58
|
443 .Pn mhn
|
meillo@58
|
444 into a set of specialized programs, which together covered the
|
meillo@62
|
445 multiple aspects of MIME. One of these resulting tools was
|
meillo@69
|
446 .Pn mhshow ,
|
meillo@69
|
447 which replaced the
|
meillo@82
|
448 .Cl "mhn -show
|
meillo@62
|
449 call.
|
meillo@76
|
450 It was capable to display a MIME message appropriately.
|
meillo@62
|
451 .P
|
meillo@76
|
452 From then on, two message display tools were part of nmh:
|
meillo@76
|
453 .Pn show
|
meillo@76
|
454 and
|
meillo@76
|
455 .Pn mhshow .
|
meillo@76
|
456 Because the user should not need to invoke the right tool
|
meillo@69
|
457 whether the message uses MIME or not,
|
meillo@69
|
458 .Pn show
|
meillo@69
|
459 was extended to automatically hand the job over to
|
meillo@69
|
460 .Pn mhshow
|
meillo@69
|
461 if displaying the message would be beyond
|
meillo@69
|
462 .Pn show 's
|
meillo@69
|
463 abilities.
|
meillo@69
|
464 In consequence, the user would invoke
|
meillo@69
|
465 .Pn show
|
meillo@69
|
466 (possibly through
|
meillo@69
|
467 .Pn next
|
meillo@69
|
468 or
|
meillo@69
|
469 .Pn prev )
|
meillo@69
|
470 and get the message printed with either
|
meillo@69
|
471 .Pn show
|
meillo@69
|
472 or
|
meillo@69
|
473 .Pn mhshow ,
|
meillo@69
|
474 whatever was more appropriate.
|
meillo@69
|
475 (There was also a switch for
|
meillo@69
|
476 .Pn show
|
meillo@69
|
477 to never invoke
|
meillo@76
|
478 .Pn mhshow .
|
meillo@76
|
479 .Pn show
|
meillo@76
|
480 was able to display MIME messages if they contained only a single text
|
meillo@76
|
481 part.)
|
meillo@69
|
482 .P
|
meillo@69
|
483 Having two similar tools for essentially the same task is redundant.
|
meillo@76
|
484 The development of both programs needed to be in sync,
|
meillo@76
|
485 to ensure that the programs behaved in a similar way,
|
meillo@76
|
486 because they were used like a single tool.
|
meillo@76
|
487 Different behavior would have surprised the user.
|
meillo@69
|
488 .P
|
meillo@69
|
489 Today, non-MIME messages are rather seen to be a special case of
|
meillo@69
|
490 MIME messages, than MIME messages are seen to be an extension to
|
meillo@76
|
491 original email.
|
meillo@69
|
492 As
|
meillo@69
|
493 .Pn mhshow
|
meillo@69
|
494 had already be able to display non-MIME messages, it was natural
|
meillo@69
|
495 to drop
|
meillo@69
|
496 .Pn show
|
meillo@69
|
497 in favor of using
|
meillo@69
|
498 .Pn mhshow
|
meillo@69
|
499 exclusively.
|
meillo@76
|
500 This decision followed the idea of orthogonal design.
|
meillo@76
|
501 For convenience,
|
meillo@76
|
502 .Pn mhshow
|
meillo@76
|
503 was then renamed to
|
meillo@76
|
504 .Pn show .
|
meillo@72
|
505 .Ci 4c1efddfd499300c7e74263e57d8aa137e84c853
|
meillo@69
|
506 .P
|
meillo@76
|
507 To prepare for this transition,
|
meillo@69
|
508 .Pn mhshow
|
meillo@69
|
509 was reworked to behave more like
|
meillo@69
|
510 .Pn show
|
meillo@69
|
511 first.
|
meillo@76
|
512 (Section XXX describes this rework from a different perspective.)
|
meillo@69
|
513 Once the tools behaved similar, the replacing became a natural decision.
|
meillo@69
|
514 In mmh,
|
meillo@69
|
515 .Pn show
|
meillo@69
|
516 is the one single message display program again, but it handles
|
meillo@69
|
517 MIME messages as well as non-MIME messages.
|
meillo@76
|
518 Now, there's only one program to maintain, and users don't need to deal
|
meillo@69
|
519 with the existance of two display programs.
|
meillo@69
|
520 .P
|
meillo@76
|
521 There's one reason why removing the old
|
meillo@69
|
522 .Pn show
|
meillo@69
|
523 hurts: It had been such a simple program.
|
meillo@69
|
524 Its lean elegance is missing to
|
meillo@69
|
525 .Pn mhshow ,
|
meillo@69
|
526 i.e. the new
|
meillo@69
|
527 .Pn show .
|
meillo@69
|
528 But there is no chance, because supporting MIME causes essentially
|
meillo@69
|
529 higher complexity.
|
meillo@58
|
530
|
meillo@58
|
531
|
meillo@58
|
532 .H2 "Removal of Configure Options
|
meillo@58
|
533 .P
|
meillo@76
|
534 Customization is a double-edged sword.
|
meillo@76
|
535 It allows better suiting setups, but not for free.
|
meillo@76
|
536 There is the cost of code complexity to be able to customize.
|
meillo@76
|
537 There is the cost of less tested setups, because there are
|
meillo@72
|
538 more possible setups and especially corner-cases.
|
meillo@76
|
539 And, there is the cost of choice itself.
|
meillo@76
|
540 The code complexity directly affects the developers.
|
meillo@72
|
541 Less tested code affects both, users and developers.
|
meillo@76
|
542 The problem of choice affects the users, for once by having to
|
meillo@76
|
543 choose, but also by complexer interfaces that require more documentation.
|
meillo@72
|
544 Whenever options add little advantages, they should be considered for
|
meillo@72
|
545 removal.
|
meillo@72
|
546 I have reduced the number of project-specific configure options from
|
meillo@72
|
547 fifteen to three.
|
meillo@74
|
548
|
meillo@76
|
549 .U3 "Mail Transfer Facilities
|
meillo@74
|
550 .P
|
meillo@85
|
551 With the removal of the mail transfer facilities five configure
|
meillo@85
|
552 options vanished:
|
meillo@85
|
553 .P
|
meillo@85
|
554 The switches
|
meillo@85
|
555 .Sw --with-tls
|
meillo@85
|
556 and
|
meillo@85
|
557 .Sw --with-cyrus-sasl
|
meillo@85
|
558 had activated the support for transfer encryption and authetication.
|
meillo@85
|
559 This is not needed anymore.
|
meillo@85
|
560 .Ci fecd5d34f65597a4dfa16aeabea7d74b191532c3
|
meillo@85
|
561 .Ci 156d35f6425bea4c1ed3c4c79783dc613379c65b
|
meillo@85
|
562 .P
|
meillo@85
|
563 The configure switch
|
meillo@85
|
564 .Sw --enable-pop
|
meillo@85
|
565 activated the message retrieval facility.
|
meillo@85
|
566 The code area that would be conditionally compiled in for TLS and SASL
|
meillo@85
|
567 support had been small.
|
meillo@85
|
568 The conditionally compiled code area for POP support had been much larger.
|
meillo@85
|
569 Whereas the code base changes would only slightly change on toggling
|
meillo@85
|
570 TLS or SASL support, it changed much on toggling POP support.
|
meillo@85
|
571 The changes in the code base could hardly be overviewed.
|
meillo@85
|
572 By having POP support togglable a second code base had been created,
|
meillo@85
|
573 one that needed to be tested.
|
meillo@85
|
574 This situation is basically similar for the conditional TLS and SASL
|
meillo@85
|
575 code, but there the changes are minor and can yet be overviewed.
|
meillo@85
|
576 Still, conditional compilation of a code base creates variations
|
meillo@85
|
577 of the original program.
|
meillo@85
|
578 More variations require more testing and maintenance work.
|
meillo@85
|
579 .P
|
meillo@85
|
580 Two other options only specified default configuration values:
|
meillo@85
|
581 .Sw --with-mts=[smtp|sendmail]
|
meillo@85
|
582 defined the default transport service.
|
meillo@85
|
583 In mmh this fixed to
|
meillo@85
|
584 .Ar sendmail .
|
meillo@85
|
585 .Ci f6aa95b724fd8c791164abe7ee5468bf5c34f226
|
meillo@85
|
586 With
|
meillo@85
|
587 .Sw --with-smtpservers=[server1...]
|
meillo@85
|
588 default SMTP servers for the
|
meillo@85
|
589 .Ar smtp
|
meillo@85
|
590 transport service could be specified.
|
meillo@72
|
591 .Ci 128545e06224233b7e91fc4c83f8830252fe16c9
|
meillo@85
|
592 Both of them became irrelevant.
|
meillo@72
|
593
|
meillo@74
|
594 .U3 "Backup Prefix
|
meillo@74
|
595 .P
|
meillo@76
|
596 The backup prefix is the string that was prepended to message
|
meillo@76
|
597 filenames to tag them as deleted.
|
meillo@76
|
598 By default it had been the comma character `\f(CW,\fP'.
|
meillo@78
|
599 In July 2000, Kimmo Suominen introduced
|
meillo@78
|
600 the configure option
|
meillo@78
|
601 .Sw --with-hash-backup
|
meillo@78
|
602 to change the default to the hash symbol `\f(CW#\fP'.
|
meillo@78
|
603 The choice was probably personal preference, because first, the
|
meillo@78
|
604 option was named
|
meillo@78
|
605 .Sw --with-backup-prefix.
|
meillo@78
|
606 and had the prefix symbol as argument.
|
meillo@78
|
607 Because giving the hash symbol as argument caused to many problems
|
meillo@78
|
608 for configure,
|
meillo@78
|
609 the option was limited to use the hash symbol as the default prefix.
|
meillo@78
|
610 This makes me believe, that the choice for the hash was personal preference.
|
meillo@78
|
611 Being it related or not, words that start with the hash symbol
|
meillo@78
|
612 introduce a comment in the Unix shell.
|
meillo@72
|
613 Thus, the command line
|
meillo@72
|
614 .Cl "rm #13 #15
|
meillo@72
|
615 calls
|
meillo@72
|
616 .Pn rm
|
meillo@72
|
617 without arguments because the first hash symbol starts the comment
|
meillo@72
|
618 that reaches until the end of the line.
|
meillo@72
|
619 To delete the backup files,
|
meillo@72
|
620 .Cl "rm ./#13 ./#15"
|
meillo@72
|
621 needs to be used.
|
meillo@78
|
622 Using the hash as backup prefix can be seen as a precaution agains
|
meillo@78
|
623 data loss.
|
meillo@78
|
624 .P
|
meillo@72
|
625 I removed the configure option but added the profile entry
|
meillo@72
|
626 .Pe backup-prefix ,
|
meillo@72
|
627 which allows to specify an arbitrary string as backup prefix.
|
meillo@72
|
628 .Ci 6c40d481d661d532dd527eaf34cebb6d3f8ed086
|
meillo@76
|
629 Profile entries are the common method to change mmh's behavior.
|
meillo@76
|
630 This change did not remove the choice but moved it to a location where
|
meillo@72
|
631 it suited better.
|
meillo@76
|
632 .P
|
meillo@78
|
633 Eventually, however, the new trash folder concept
|
meillo@78
|
634 .Cf "Sec. XXX
|
meillo@78
|
635 obsoleted the concept of the backup prefix completely.
|
meillo@78
|
636 .Ci 8edc5aaf86f9f77124664f6801bc6c6cdf258173
|
meillo@72
|
637 (Well, there still are corner-cases to remove until the backup
|
meillo@72
|
638 prefix can be layed to rest, eventually.)
|
meillo@72
|
639 .\" FIXME: Do this work in the code!
|
meillo@76
|
640
|
meillo@76
|
641 .U3 "Editor and Pager
|
meillo@74
|
642 .P
|
meillo@74
|
643 The two configure options
|
meillo@74
|
644 .CW --with-editor=EDITOR
|
meillo@74
|
645 .CW --with-pager=PAGER
|
meillo@74
|
646 were used to specify the default editor and pager at configure time.
|
meillo@74
|
647 Doing so at configure time made sense in the Eighties,
|
meillo@76
|
648 when the set of available editors and pagers varied much across
|
meillo@76
|
649 different systems.
|
meillo@76
|
650 Today, the situation is more homegeneic.
|
meillo@74
|
651 The programs
|
meillo@74
|
652 .Pn vi
|
meillo@74
|
653 and
|
meillo@74
|
654 .Pn more
|
meillo@76
|
655 can be expected to be available on every Unix system,
|
meillo@74
|
656 as they are specified by POSIX since two decades.
|
meillo@74
|
657 (The specifications for
|
meillo@74
|
658 .Pn vi
|
meillo@74
|
659 and
|
meillo@74
|
660 .Pn more
|
meillo@74
|
661 appeared in
|
meillo@74
|
662 .[
|
meillo@74
|
663 posix 1987
|
meillo@74
|
664 .]
|
meillo@74
|
665 and,
|
meillo@74
|
666 .[
|
meillo@74
|
667 posix 1992
|
meillo@74
|
668 .]
|
meillo@74
|
669 respectively.)
|
meillo@74
|
670 As a first step, these two tools were hard-coded as defaults.
|
meillo@74
|
671 .Ci 5d43a99db70c12a673028c7758c20cbe3e13ef5f
|
meillo@74
|
672 Not changed were the
|
meillo@74
|
673 .Pe editor
|
meillo@74
|
674 and
|
meillo@74
|
675 .Pe moreproc
|
meillo@76
|
676 profile entries, which allowed the user to override the system defaults.
|
meillo@74
|
677 Later, the concept was reworked to respect the standard environment
|
meillo@74
|
678 variables
|
meillo@74
|
679 .Ev VISUAL
|
meillo@74
|
680 and
|
meillo@74
|
681 .Ev PAGER
|
meillo@76
|
682 if they are set.
|
meillo@74
|
683 Today, mmh determines the editor to use in the following order,
|
meillo@74
|
684 taking the first available and non-empty item:
|
meillo@74
|
685 .IP (1)
|
meillo@74
|
686 Environment variable
|
meillo@74
|
687 .Ev MMHEDITOR
|
meillo@74
|
688 .IP (2)
|
meillo@74
|
689 Profile entry
|
meillo@74
|
690 .Pe Editor
|
meillo@74
|
691 .IP (3)
|
meillo@74
|
692 Environment variable
|
meillo@74
|
693 .Ev VISUAL
|
meillo@74
|
694 .IP (4)
|
meillo@74
|
695 Environment variable
|
meillo@74
|
696 .Ev EDITOR
|
meillo@74
|
697 .IP (5)
|
meillo@74
|
698 Command
|
meillo@74
|
699 .Pn vi .
|
meillo@74
|
700 .P
|
meillo@76
|
701 .Ci f85f4b7ae62e3d05a945dcd46ead51f0a2a89a9b
|
meillo@76
|
702 .P
|
meillo@76
|
703 The pager to use is deteminded in a similar order,
|
meillo@74
|
704 also taking the first available and non-empty item:
|
meillo@74
|
705 .IP (1)
|
meillo@74
|
706 Environment variable
|
meillo@74
|
707 .Ev MMHPAGER
|
meillo@74
|
708 .IP (2)
|
meillo@74
|
709 Profile entry
|
meillo@74
|
710 .Pe Pager
|
meillo@74
|
711 (replaces
|
meillo@74
|
712 .Pe moreproc )
|
meillo@74
|
713 .IP (3)
|
meillo@74
|
714 Environment variable
|
meillo@74
|
715 .Ev PAGER
|
meillo@74
|
716 .IP (4)
|
meillo@74
|
717 Command
|
meillo@74
|
718 .Pn more .
|
meillo@74
|
719 .P
|
meillo@74
|
720 .Ci 0c4214ea2aec6497d0d67b436bbee9bc1d225f1e
|
meillo@74
|
721 .P
|
meillo@76
|
722 By respecting the
|
meillo@74
|
723 .Ev VISUAL /\c
|
meillo@74
|
724 .Ev EDITOR
|
meillo@74
|
725 and
|
meillo@74
|
726 .Ev PAGER
|
meillo@76
|
727 environment variables,
|
meillo@76
|
728 the new behavior confirms better to the common style on Unix systems.
|
meillo@76
|
729 Additionally, the new approach is more uniform and clearer to users.
|
meillo@72
|
730
|
meillo@74
|
731 .U3 "Locale
|
meillo@74
|
732 .P
|
meillo@74
|
733 The configure option
|
meillo@74
|
734 .Sw --disable-locale
|
meillo@85
|
735 was removed because POSIX provides locale support and there's
|
meillo@85
|
736 hardly any need to disable locale support.
|
meillo@74
|
737 .Ci ccf4f175ef4c4e7522f9510a4a1149c15d810dd9
|
meillo@72
|
738
|
meillo@76
|
739 .U3 "ndbm
|
meillo@72
|
740 .P
|
meillo@74
|
741 .Pn slocal
|
meillo@78
|
742 used to depend on
|
meillo@74
|
743 .I ndbm ,
|
meillo@74
|
744 a database library.
|
meillo@76
|
745 The database is used to store the `\fLMessage-ID\fP's of all
|
meillo@76
|
746 messages delivered.
|
meillo@74
|
747 This enables
|
meillo@74
|
748 .Pn slocal
|
meillo@74
|
749 to suppress delivering the same message to the same user twice.
|
meillo@74
|
750 (This features was enabled by the
|
meillo@74
|
751 .Sw -suppressdup
|
meillo@74
|
752 switch.)
|
meillo@74
|
753 .P
|
meillo@74
|
754 A variety of version of the database library exist.
|
meillo@78
|
755 .[
|
meillo@78
|
756 wolter unix incompat notes dbm
|
meillo@78
|
757 .]
|
meillo@74
|
758 Complicated autoconf code was needed to detect them correctly.
|
meillo@74
|
759 Further more, the configure switches
|
meillo@74
|
760 .Sw --with-ndbm=ARG
|
meillo@74
|
761 and
|
meillo@74
|
762 .Sw --with-ndbmheader=ARG
|
meillo@74
|
763 were added to help with difficult setups that would
|
meillo@78
|
764 not be detected automatically or correctly.
|
meillo@74
|
765 .P
|
meillo@74
|
766 By removing the suppress duplicates feature of
|
meillo@74
|
767 .Pn slocal ,
|
meillo@74
|
768 the dependency on
|
meillo@74
|
769 .I ndbm
|
meillo@78
|
770 vanished and 120 lines of complex autoconf code could be saved.
|
meillo@74
|
771 .Ci ecd6d6a20cb7a1507e3a20d6c4cb3a1cf14c6bbf
|
meillo@78
|
772 The change removed funtionality too, but that is minor to the
|
meillo@78
|
773 improvement by dropping the dependency and the complex autoconf code.
|
meillo@72
|
774
|
meillo@74
|
775 .U3 "mh-e Support
|
meillo@72
|
776 .P
|
meillo@74
|
777 The configure option
|
meillo@74
|
778 .Sw --disable-mhe
|
meillo@74
|
779 was removed when the mh-e support was reworked.
|
meillo@74
|
780 Mh-e is the Emacs front-end to MH.
|
meillo@76
|
781 It requires MH to provide minor additional functions.
|
meillo@76
|
782 The
|
meillo@76
|
783 .Sw --disable-mhe
|
meillo@76
|
784 configure option could switch these extensions off.
|
meillo@76
|
785 After removing the support for old versions of mh-e,
|
meillo@74
|
786 only the
|
meillo@74
|
787 .Sw -build
|
meillo@76
|
788 switches of
|
meillo@74
|
789 .Pn forw
|
meillo@74
|
790 and
|
meillo@74
|
791 .Pn repl
|
meillo@76
|
792 are left to be mh-e extensions.
|
meillo@76
|
793 They are now always built in because they add little code and complexity.
|
meillo@76
|
794 In consequence, the
|
meillo@74
|
795 .Sw --disable-mhe
|
meillo@76
|
796 configure option was removed
|
meillo@72
|
797 .Ci a7ce7b4a580d77b6c2c4d980812beb589aa4c643
|
meillo@74
|
798 Removing the option removed a second code setup that would have
|
meillo@74
|
799 needed to be tested.
|
meillo@76
|
800 This change was first done in nmh and thereafter merged into mmh.
|
meillo@76
|
801 .P
|
meillo@76
|
802 The interface changes in mmh require mh-e to be adjusted in order
|
meillo@76
|
803 to be able to use mmh as back-end.
|
meillo@76
|
804 This will require minor changes to mh-e, but removing the
|
meillo@76
|
805 .Sw -build
|
meillo@76
|
806 switches would require more rework.
|
meillo@72
|
807
|
meillo@74
|
808 .U3 "Masquerading
|
meillo@72
|
809 .P
|
meillo@74
|
810 The configure option
|
meillo@74
|
811 .Sw --enable-masquerade
|
meillo@76
|
812 could take up to three arguments:
|
meillo@76
|
813 `draft_from', `mmailid', and `username_extension'.
|
meillo@74
|
814 They activated different types of address masquerading.
|
meillo@74
|
815 All of them were implemented in the SMTP-speaking
|
meillo@74
|
816 .Pn post
|
meillo@76
|
817 command, which provided an MSA.
|
meillo@76
|
818 Address masquerading is an MTA's task and mmh does not cover
|
meillo@76
|
819 this field anymore.
|
meillo@76
|
820 Hence, true masquerading needs to be implemented in the external MTA.
|
meillo@74
|
821 .P
|
meillo@74
|
822 The
|
meillo@74
|
823 .I mmailid
|
meillo@74
|
824 masquerading type is the oldest one of the three and the only one
|
meillo@74
|
825 available in the original MH.
|
meillo@74
|
826 It provided a
|
meillo@74
|
827 .I username
|
meillo@74
|
828 to
|
meillo@74
|
829 .I fakeusername
|
meillo@76
|
830 mapping, based on the password file's GECOS field.
|
meillo@74
|
831 The man page
|
meillo@74
|
832 .Mp mh-tailor(5)
|
meillo@74
|
833 described the use case as being the following:
|
meillo@74
|
834 .QP
|
meillo@74
|
835 This is useful if you want the messages you send to always
|
meillo@74
|
836 appear to come from the name of an MTA alias rather than your
|
meillo@74
|
837 actual account name. For instance, many organizations set up
|
meillo@74
|
838 `First.Last' sendmail aliases for all users. If this is
|
meillo@74
|
839 the case, the GECOS field for each user should look like:
|
meillo@74
|
840 ``First [Middle] Last <First.Last>''
|
meillo@74
|
841 .P
|
meillo@74
|
842 As mmh sends outgoing mail via the local MTA only,
|
meillo@76
|
843 the best location to do such global rewrites is there.
|
meillo@74
|
844 Besides, the MTA is conceptionally the right location because it
|
meillo@74
|
845 does the reverse mapping for incoming mail (aliasing), too.
|
meillo@76
|
846 Further more, masquerading set up there is readily available for all
|
meillo@74
|
847 mail software on the system.
|
meillo@76
|
848 Hence, mmailid masquerading was removed.
|
meillo@74
|
849 .Ci 0836c8000ccb34b59410ef1c15b1b7feac70ce5f
|
meillo@74
|
850 .P
|
meillo@74
|
851 The
|
meillo@74
|
852 .I username_extension
|
meillo@76
|
853 masquerading type did not replace the username but would append a suffix,
|
meillo@76
|
854 specified by the
|
meillo@74
|
855 .Ev USERNAME_EXTENSION
|
meillo@76
|
856 environment variable, to it.
|
meillo@76
|
857 This provided support for the
|
meillo@74
|
858 .I user-extension
|
meillo@74
|
859 feature of qmail and the similar
|
meillo@74
|
860 .I "plussed user
|
meillo@74
|
861 processing of sendmail.
|
meillo@74
|
862 The decision to remove this username_extension masquerading was
|
meillo@74
|
863 motivated by the fact that
|
meillo@74
|
864 .Pn spost
|
meillo@76
|
865 hadn't supported it already.
|
meillo@76
|
866 .Ci 2abae0bfd0ad5bf898461e50aa4b466d641f23d9
|
meillo@76
|
867 Username extensions are possible in mmh, but less convenient to use.
|
meillo@76
|
868 .\" XXX format file %(getenv USERNAME_EXTENSION)
|
meillo@74
|
869 .P
|
meillo@74
|
870 The
|
meillo@74
|
871 .I draft_from
|
meillo@74
|
872 masquerading type instructed
|
meillo@74
|
873 .Pn post
|
meillo@84
|
874 to use the value of the
|
meillo@84
|
875 .Hd From
|
meillo@84
|
876 header field as SMTP envelope sender.
|
meillo@76
|
877 Sender addresses could be replaced completely.
|
meillo@74
|
878 .Ci b14ea6073f77b4359aaf3fddd0e105989db9
|
meillo@76
|
879 Mmh offers a kind of masquerading similar in effect, but
|
meillo@74
|
880 with technical differences.
|
meillo@76
|
881 As mmh does not transfer messages itself, the local MTA has final control
|
meillo@76
|
882 over the sender's address. Any masquerading mmh introduces may be reverted
|
meillo@76
|
883 by the MTA.
|
meillo@76
|
884 In times of pedantic spam checking, an MTA will take care to use
|
meillo@76
|
885 sensible envelope sender addresses to keep its own reputation up.
|
meillo@84
|
886 Nonetheless, the MUA can set the
|
meillo@84
|
887 .Hd From
|
meillo@84
|
888 header field and thereby propose
|
meillo@76
|
889 a sender address to the MTA.
|
meillo@74
|
890 The MTA may then decide to take that one or generate the canonical sender
|
meillo@74
|
891 address for use as envelope sender address.
|
meillo@74
|
892 .P
|
meillo@74
|
893 In mmh, the MTA will always extract the recipient and sender from the
|
meillo@84
|
894 message header (\c
|
meillo@74
|
895 .Pn sendmail 's
|
meillo@74
|
896 .Sw -t
|
meillo@74
|
897 switch).
|
meillo@84
|
898 The
|
meillo@84
|
899 .Hd From
|
meillo@84
|
900 header field of the draft may be set arbitrary by the user.
|
meillo@74
|
901 If it is missing, the canonical sender address will be generated by the MTA.
|
meillo@74
|
902
|
meillo@74
|
903 .U3 "Remaining Options
|
meillo@74
|
904 .P
|
meillo@74
|
905 Two configure options remain in mmh.
|
meillo@74
|
906 One is the locking method to use:
|
meillo@74
|
907 .Sw --with-locking=[dot|fcntl|flock|lockf] .
|
meillo@76
|
908 The idea of removing all methods except the portable dot locking
|
meillo@76
|
909 and having that one as the default is appealing, but this change
|
meillo@76
|
910 requires deeper technical investigation into the topic.
|
meillo@76
|
911 The other option,
|
meillo@74
|
912 .Sw --enable-debug ,
|
meillo@74
|
913 compiles the programs with debugging symbols and does not strip them.
|
meillo@74
|
914 This option is likely to stay.
|
meillo@72
|
915
|
meillo@72
|
916
|
meillo@58
|
917
|
meillo@63
|
918
|
meillo@58
|
919 .H2 "Removal of switches
|
meillo@58
|
920 .P
|
meillo@58
|
921
|
meillo@58
|
922
|
meillo@58
|
923
|
meillo@58
|
924
|
meillo@74
|
925 .H1 "Modernizing
|
meillo@58
|
926
|
meillo@58
|
927
|
meillo@58
|
928 .H2 "Removal of Code Relicts
|
meillo@0
|
929 .P
|
meillo@51
|
930 The code base of mmh originates from the late Seventies,
|
meillo@51
|
931 had been extensively
|
meillo@51
|
932 worked on in the mid Eighties, and had been partly reorganized and extended
|
meillo@51
|
933 in the Nineties. Relicts of all those times had gathered in the code base.
|
meillo@12
|
934 My goal was to remove any ancient code parts. One part of the task was
|
meillo@12
|
935 converting obsolete code constructs to standard constructs, the other part
|
meillo@12
|
936 was dropping obsolete functions.
|
meillo@12
|
937 .P
|
meillo@12
|
938 As I'm not even thirty years old and have no more than seven years of
|
meillo@51
|
939 Unix experience, I needed to learn about the history in retrospective.
|
meillo@51
|
940 Older people likely have used those ancient constructs themselves
|
meillo@51
|
941 and have suffered from their incompatibilities and have longed for
|
meillo@12
|
942 standardization. Unfortunately, I have only read that others had done so.
|
meillo@12
|
943 This put me in a much more difficult positions when working on the old
|
meillo@12
|
944 code. I needed to recherche what other would have known by heart from
|
meillo@12
|
945 experience. All my programming experience comes from a time past ANSI C
|
meillo@12
|
946 and past POSIX. Although I knew about the times before, I took the
|
meillo@51
|
947 current state implicitly for granted most of the time.
|
meillo@12
|
948 .P
|
meillo@12
|
949 Being aware of
|
meillo@12
|
950 these facts, I rather let people with more historic experience solve the
|
meillo@12
|
951 task of converting the ancient code constructs to standardized ones.
|
meillo@12
|
952 Luckily, Lyndon Nerenberg focused on this task at the nmh project.
|
meillo@12
|
953 He converted large parts of the code to POSIX constructs, removing
|
meillo@12
|
954 the conditionals compilation for now standardized features.
|
meillo@12
|
955 I'm thankful for this task being solved. I only pulled the changes into
|
meillo@12
|
956 mmh.
|
meillo@12
|
957 .P
|
meillo@20
|
958 The other task \(en dropping ancient functionality to remove old code \(en
|
meillo@12
|
959 I did myself, though. My position to strip mmh to the bare minimum of
|
meillo@12
|
960 frequently used features is much more revolutional than the nmh community
|
meillo@20
|
961 likes it. Without the need to justify my decisions, I was able to quickly
|
meillo@20
|
962 remove functionality I considered ancient.
|
meillo@20
|
963 The need to discuss my decisions with
|
meillo@20
|
964 peers likely would have slowed this process down. Of course, I researched
|
meillo@12
|
965 if a particular feature really should be dropped. Having not had any
|
meillo@12
|
966 contact to this feature within my computer life was a first indicator to
|
meillo@12
|
967 drop it, but I also asked others and searched the literature for modern
|
meillo@12
|
968 usage of the feature. If it appeared to be truly ancient, I dropped it.
|
meillo@12
|
969 The reason for dropping is always part of the commit message in the
|
meillo@12
|
970 version control system. Thus, it is easy for others to check their
|
meillo@12
|
971 view on the topic with mine and possibly to argue for reinclusion.
|
meillo@12
|
972
|
meillo@12
|
973 .U2 "MMDF maildrop support
|
meillo@12
|
974 .P
|
meillo@12
|
975 I did drop any support for the MMDF maildrop format. This type of format
|
meillo@12
|
976 is conceptionally similar to the mbox format, but uses four bytes with
|
meillo@12
|
977 value 1 (\fL^A^A^A^A\fP) as message delimiter,
|
meillo@18
|
978 instead of the string ``\fLFrom\ \fP''.
|
meillo@12
|
979 Due to the similarity and mbox being the de-facto standard maildrop
|
meillo@12
|
980 format on Unix, but also due to the larger influence of Sendmail than MMDF,
|
meillo@12
|
981 the MMDF maildrop format had vanished.
|
meillo@12
|
982 .P
|
meillo@12
|
983 The simplifications within the code were only moderate. Switches could
|
meillo@12
|
984 be removed from tools like
|
meillo@12
|
985 .L packf ,
|
meillo@12
|
986 which generate packed mailboxes. Only one packed mailbox format remained:
|
meillo@12
|
987 mbox.
|
meillo@12
|
988 The most important changes affect the equally named mail parsing routine in
|
meillo@12
|
989 .L sbr/m_getfld.c .
|
meillo@12
|
990 The direct MMDF code had been removed, but as now only one packed mailbox
|
meillo@12
|
991 format is left, code structure simplifications are likely possible.
|
meillo@12
|
992 The reason why they are still outstanding is the heavily optimized code
|
meillo@18
|
993 of
|
meillo@18
|
994 .Fu m_getfld() .
|
meillo@18
|
995 Changes beyond a small local scope \(en
|
meillo@12
|
996 which restructuring in its core is \(en cause a high risk of damaging
|
meillo@12
|
997 the intricate workings of the optimized code. This problem is know
|
meillo@12
|
998 to the developers of nmh, too. They also avoid touching this minefield
|
meillo@12
|
999 if possible.
|
meillo@12
|
1000
|
meillo@12
|
1001 .U2 "UUCP Bang Paths
|
meillo@12
|
1002 .P
|
meillo@12
|
1003 More questionably than the former topic is the removal of support for the
|
meillo@12
|
1004 UUCP bang path address style. However, the user may translate the bang
|
meillo@12
|
1005 paths on retrieval to Internet addresses and the other way on posting
|
meillo@12
|
1006 messages. The former can be done my an MDA like procmail; the latter
|
meillo@12
|
1007 by a sendmail wrapper. This would ensure that any address handling would
|
meillo@12
|
1008 work as expected. However, it might just work well without any
|
meillo@12
|
1009 such modifications, as mmh does not touch addresses much, in general.
|
meillo@12
|
1010 But I can't ensure as I have never used an environment with bang paths.
|
meillo@12
|
1011 Also, the behavior might break at any point in further development.
|
meillo@12
|
1012
|
meillo@12
|
1013 .U2 "Hardcopy terminal support
|
meillo@12
|
1014 .P
|
meillo@12
|
1015 More of a funny anecdote is the remaining of a check for printing to a
|
meillo@12
|
1016 hardcopy terminal until Spring 2012, when I finally removed it.
|
meillo@12
|
1017 I surely would be very happy to see such a terminal in action, maybe
|
meillo@12
|
1018 actually being able to work on it, but I fear my chances are null.
|
meillo@12
|
1019 .P
|
meillo@12
|
1020 The check only prevented a pager to be placed between the outputting
|
meillo@18
|
1021 program (\c
|
meillo@18
|
1022 .Pn mhl )
|
meillo@18
|
1023 and the terminal. This could have been ensured with
|
meillo@18
|
1024 the
|
meillo@82
|
1025 .Sw -nomoreproc
|
meillo@18
|
1026 at the command line statically, too.
|
meillo@12
|
1027
|
meillo@12
|
1028 .U2 "Removed support for header fields
|
meillo@12
|
1029 .P
|
meillo@84
|
1030 The
|
meillo@84
|
1031 .Hd Encrypted
|
meillo@84
|
1032 header field had been introduced by RFC\^822, but already
|
meillo@12
|
1033 marked legacy in RFC 2822. It was superseded by FIXME.
|
meillo@84
|
1034 Mmh does no more support this header field.
|
meillo@12
|
1035 .P
|
meillo@84
|
1036 Native support for
|
meillo@84
|
1037 .Hd Face
|
meillo@84
|
1038 header fields had been removed, as well.
|
meillo@84
|
1039 The feature is similar to the
|
meillo@84
|
1040 .Hd X-Face
|
meillo@84
|
1041 header field in its intent,
|
meillo@21
|
1042 but takes a different approach to store the image.
|
meillo@84
|
1043 Instead of encoding the image data directly into the header field,
|
meillo@84
|
1044 the it contains the hostname and UDP port where the image
|
meillo@21
|
1045 date could be retrieved.
|
meillo@84
|
1046 Neither
|
meillo@84
|
1047 .Hd X-Face
|
meillo@84
|
1048 nor the here described
|
meillo@84
|
1049 .Hd Face
|
meillo@84
|
1050 system
|
meillo@21
|
1051 \**
|
meillo@21
|
1052 .FS
|
meillo@21
|
1053 There is also a newer but different system, invented 2005,
|
meillo@84
|
1054 using
|
meillo@84
|
1055 .Hd Face
|
meillo@84
|
1056 headers.
|
meillo@84
|
1057 It is the successor of
|
meillo@84
|
1058 .Hd X-Face
|
meillo@84
|
1059 providing colored PNG images.
|
meillo@21
|
1060 .FE
|
meillo@21
|
1061 became well used in the large scale.
|
meillo@21
|
1062 It's still possible to use a Face systems,
|
meillo@21
|
1063 although mmh does not provide support for any of the different systems
|
meillo@21
|
1064 anymore. It's fairly easy to write a small shell script to
|
meillo@21
|
1065 extract the embedded or fetch the external Face data and display the image.
|
meillo@84
|
1066 Own
|
meillo@84
|
1067 .Hd Face
|
meillo@84
|
1068 header field can be added into the draft template files.
|
meillo@21
|
1069 .P
|
meillo@84
|
1070 .Hd Content-MD5
|
meillo@84
|
1071 header fields were introduced by RFC\^1864. They provide only
|
meillo@12
|
1072 a verification of data corruption during the transfer. By no means can
|
meillo@12
|
1073 they ensure verbatim end-to-end delivery of the contents. This is clearly
|
meillo@12
|
1074 stated in the RFC. The proper approach to provide verificationability
|
meillo@12
|
1075 of content in an end-to-end relationship is the use of digital cryptography
|
meillo@12
|
1076 (RFCs FIXME). On the other hand, transfer protocols should ensure the
|
meillo@12
|
1077 integrity of the transmission. In combinations these two approaches
|
meillo@84
|
1078 make the
|
meillo@84
|
1079 .Hd Content-MD5
|
meillo@84
|
1080 header field useless. In consequence, I removed
|
meillo@12
|
1081 the support for it. By this removal, MD5 computation is not needed
|
meillo@12
|
1082 anywhere in mmh. Hence, over 500 lines of code were removed by this one
|
meillo@84
|
1083 change. Even if the
|
meillo@84
|
1084 .Hd Content-MD5
|
meillo@84
|
1085 header field is useful sometimes,
|
meillo@12
|
1086 I value its usefulnes less than the improvement in maintainability, caused
|
meillo@12
|
1087 by the removal.
|
meillo@12
|
1088
|
meillo@20
|
1089 .U2 "Prompter's Control Keys
|
meillo@20
|
1090 .P
|
meillo@20
|
1091 The program
|
meillo@20
|
1092 .Pn prompter
|
meillo@20
|
1093 queries the user to fill in a message form. When used by
|
meillo@20
|
1094 .Pn comp
|
meillo@20
|
1095 as:
|
meillo@82
|
1096 .VS
|
meillo@82
|
1097 comp -editor prompter
|
meillo@82
|
1098 VE
|
meillo@20
|
1099 the resulting behavior is similar to
|
meillo@20
|
1100 .Pn mailx .
|
meillo@51
|
1101 Apparently,
|
meillo@20
|
1102 .Pn prompter
|
meillo@20
|
1103 hadn't been touched lately. Otherwise it's hardly explainable why it
|
meillo@20
|
1104 still offered the switches
|
meillo@84
|
1105 .Sw -erase
|
meillo@84
|
1106 .Ar chr
|
meillo@20
|
1107 and
|
meillo@84
|
1108 .Sw -kill
|
meillo@84
|
1109 .Ar chr
|
meillo@20
|
1110 to name the characters for command line editing.
|
meillo@21
|
1111 The times when this had been necessary are long time gone.
|
meillo@20
|
1112 Today these things work out-of-the-box, and if not, are configured
|
meillo@20
|
1113 with the standard tool
|
meillo@20
|
1114 .Pn stty .
|
meillo@20
|
1115
|
meillo@21
|
1116 .U2 "Vfork and Retry Loops
|
meillo@21
|
1117 .P
|
meillo@51
|
1118 MH creates many processes, which is a consequence of the tool chest approach.
|
meillo@21
|
1119 In earlier times
|
meillo@21
|
1120 .Fu fork()
|
meillo@21
|
1121 had been an expensive system call, as the process's whole image needed
|
meillo@21
|
1122 to be duplicated. One common case is replacing the image with
|
meillo@21
|
1123 .Fu exec()
|
meillo@21
|
1124 right after having forked the child process.
|
meillo@21
|
1125 To speed up this case, the
|
meillo@21
|
1126 .Fu vfork()
|
meillo@21
|
1127 system call was invented at Berkeley. It completely omits copying the
|
meillo@21
|
1128 image. If the image gets replaced right afterwards then unnecessary
|
meillo@21
|
1129 work is omited. On old systems this results in large speed ups.
|
meillo@21
|
1130 MH uses
|
meillo@21
|
1131 .Fu vfork()
|
meillo@21
|
1132 whenever possible.
|
meillo@21
|
1133 .P
|
meillo@21
|
1134 Memory management units that support copy-on-write semantics make
|
meillo@21
|
1135 .Fu fork()
|
meillo@21
|
1136 almost as fast as
|
meillo@21
|
1137 .Fu vfork()
|
meillo@21
|
1138 in the cases when they can be exchanged.
|
meillo@21
|
1139 With
|
meillo@21
|
1140 .Fu vfork()
|
meillo@51
|
1141 being more error-prone and hardly faster, it's preferable to simply
|
meillo@21
|
1142 use
|
meillo@21
|
1143 .Fu fork()
|
meillo@21
|
1144 instead.
|
meillo@21
|
1145 .P
|
meillo@21
|
1146 Related to the costs of
|
meillo@21
|
1147 .Fu fork()
|
meillo@21
|
1148 is the probability of its success.
|
meillo@21
|
1149 Today on modern systems, the system call will succeed almost always.
|
meillo@51
|
1150 In the Eighties on heavy loaded systems, as they were common at
|
meillo@21
|
1151 universities, this had been different. Thus, many of the
|
meillo@21
|
1152 .Fu fork()
|
meillo@21
|
1153 calls were wrapped into loops to retry to fork several times in
|
meillo@21
|
1154 short intervals, in case of previous failure.
|
meillo@21
|
1155 In mmh, the program aborts at once if the fork failed.
|
meillo@21
|
1156 The user can reexecute the command then. This is expected to be a
|
meillo@21
|
1157 very rare case on modern systems, especially personal ones, which are
|
meillo@21
|
1158 common today.
|
meillo@21
|
1159
|
meillo@12
|
1160
|
meillo@58
|
1161 .H2 "Attachments
|
meillo@22
|
1162 .P
|
meillo@58
|
1163 MIME
|
meillo@58
|
1164
|
meillo@58
|
1165
|
meillo@58
|
1166 .H2 "Digital Cryptography
|
meillo@22
|
1167 .P
|
meillo@58
|
1168 Signing and encryption.
|
meillo@58
|
1169
|
meillo@58
|
1170
|
meillo@58
|
1171 .H2 "Good Defaults
|
meillo@22
|
1172 .P
|
meillo@58
|
1173 foo
|
meillo@58
|
1174
|
meillo@58
|
1175
|
meillo@58
|
1176
|
meillo@58
|
1177
|
meillo@58
|
1178 .H1 "Code style
|
meillo@22
|
1179 .P
|
meillo@58
|
1180 foo
|
meillo@58
|
1181
|
meillo@58
|
1182
|
meillo@58
|
1183 .H2 "Standard Code
|
meillo@22
|
1184 .P
|
meillo@58
|
1185 POSIX
|
meillo@22
|
1186
|
meillo@22
|
1187
|
meillo@58
|
1188 .H2 "Separation
|
meillo@14
|
1189
|
meillo@58
|
1190 .U2 "MH Directory Split
|
meillo@0
|
1191 .P
|
meillo@19
|
1192 In MH and nmh, a personal setup had consisted of two parts:
|
meillo@19
|
1193 The MH profile, named
|
meillo@19
|
1194 .Fn \&.mh_profile
|
meillo@19
|
1195 and being located directly in the user's home directory.
|
meillo@19
|
1196 And the MH directory, where all his mail messages and also his personal
|
meillo@19
|
1197 forms, scan formats, other configuration files are stored. The location
|
meillo@19
|
1198 of this directory could be user-chosen. The default was to name it
|
meillo@19
|
1199 .Fn Mail
|
meillo@19
|
1200 and have it directly in the home directory.
|
meillo@19
|
1201 .P
|
meillo@19
|
1202 I've never liked the data storage and the configuration to be intermixed.
|
meillo@19
|
1203 They are different kinds of data. One part, are the messages,
|
meillo@19
|
1204 which are the data to operate on. The other part, are the personal
|
meillo@19
|
1205 configuration files, which are able to change the behavior of the operations.
|
meillo@19
|
1206 The actual operations are defined in the profile, however.
|
meillo@19
|
1207 .P
|
meillo@19
|
1208 When storing data, one should try to group data by its type.
|
meillo@19
|
1209 There's sense in the Unix file system hierarchy, where configuration
|
meillo@19
|
1210 file are stored separate (\c
|
meillo@19
|
1211 .Fn /etc )
|
meillo@19
|
1212 to the programs (\c
|
meillo@19
|
1213 .Fn /bin
|
meillo@19
|
1214 and
|
meillo@19
|
1215 .Fn /usr/bin )
|
meillo@19
|
1216 to their sources (\c
|
meillo@19
|
1217 .Fn /usr/src ).
|
meillo@19
|
1218 Such separation eases the backup management, for instance.
|
meillo@19
|
1219 .P
|
meillo@19
|
1220 In mmh, I've reorganized the file locations.
|
meillo@19
|
1221 Still there are two places:
|
meillo@19
|
1222 There's the mail storage directory, which, like in MH, contains all the
|
meillo@19
|
1223 messages, but, unlike in MH, nothing else.
|
meillo@19
|
1224 Its location still is user-chosen, with the default name
|
meillo@19
|
1225 .Fn Mail ,
|
meillo@19
|
1226 in the user's home directory. This is much similar to the case in nmh.
|
meillo@19
|
1227 The configuration files, however, are grouped together in the new directory
|
meillo@19
|
1228 .Fn \&.mmh
|
meillo@19
|
1229 in the user's home directory.
|
meillo@19
|
1230 The user's profile now is a file, named
|
meillo@19
|
1231 .Fn profile ,
|
meillo@19
|
1232 in this mmh directory.
|
meillo@19
|
1233 Consistently, the context file and all the personal forms, scan formats,
|
meillo@19
|
1234 and the like, are also there.
|
meillo@19
|
1235 .P
|
meillo@19
|
1236 The naming changed with the relocation.
|
meillo@19
|
1237 The directory where everything, except the profile, had been stored (\c
|
meillo@19
|
1238 .Fn $HOME/Mail ),
|
meillo@19
|
1239 used to be called \fIMH directory\fP. Now, this directory is called the
|
meillo@19
|
1240 user's \fImail storage\fP. The name \fImmh directory\fP is now given to
|
meillo@19
|
1241 the new directory
|
meillo@19
|
1242 (\c
|
meillo@19
|
1243 .Fn $HOME/.mmh ),
|
meillo@19
|
1244 containing all the personal configuration files.
|
meillo@19
|
1245 .P
|
meillo@19
|
1246 The separation of the files by type of content is logical and convenient.
|
meillo@19
|
1247 There are no functional differences as any possible setup known to me
|
meillo@19
|
1248 can be implemented with both approaches, although likely a bit easier
|
meillo@19
|
1249 with the new approach. The main goal of the change had been to provide
|
meillo@19
|
1250 sensible storage locations for any type of personal mmh file.
|
meillo@19
|
1251 .P
|
meillo@19
|
1252 In order for one user to have multiple MH setups, he can use the
|
meillo@19
|
1253 environment variable
|
meillo@19
|
1254 .Ev MH
|
meillo@19
|
1255 the point to a different profile file.
|
meillo@19
|
1256 The MH directory (mail storage plus personal configuration files) is
|
meillo@19
|
1257 defined by the
|
meillo@19
|
1258 .Pe Path
|
meillo@19
|
1259 profile entry.
|
meillo@19
|
1260 The context file could be defined by the
|
meillo@19
|
1261 .Pe context
|
meillo@19
|
1262 profile entry or by the
|
meillo@19
|
1263 .Ev MHCONTEXT
|
meillo@19
|
1264 environment variable.
|
meillo@19
|
1265 The latter is useful to have a distinct context (e.g. current folders)
|
meillo@19
|
1266 in each terminal window, for instance.
|
meillo@19
|
1267 In mmh, there are three environment variables now.
|
meillo@19
|
1268 .Ev MMH
|
meillo@19
|
1269 may be used to change the location of the mmh directory.
|
meillo@19
|
1270 .Ev MMHP
|
meillo@19
|
1271 and
|
meillo@19
|
1272 .Ev MMHC
|
meillo@19
|
1273 change the profile and context files, respectively.
|
meillo@19
|
1274 Besides providing a more consistent feel (which simply is the result
|
meillo@19
|
1275 of being designed anew), the set of personal configuration files can
|
meillo@19
|
1276 be chosen independently from the profile (including mail storage location)
|
meillo@19
|
1277 and context, now. Being it relevant for practical use or not, it
|
meillo@19
|
1278 de-facto is an improvement. However, the main achievement is the
|
meillo@19
|
1279 split between mail storage and personal configuration files.
|
meillo@17
|
1280
|
meillo@0
|
1281
|
meillo@58
|
1282 .H2 "Modularization
|
meillo@0
|
1283 .P
|
meillo@58
|
1284 whatnowproc
|
meillo@0
|
1285 .P
|
meillo@49
|
1286 The \fIMH library\fP
|
meillo@49
|
1287 .Fn libmh.a
|
meillo@49
|
1288 collects a bunch of standard functions that many of the MH tools need,
|
meillo@49
|
1289 like reading the profile or context files.
|
meillo@49
|
1290 This doesn't hurt the separation.
|
meillo@49
|
1291
|
meillo@58
|
1292
|
meillo@58
|
1293 .H2 "Style
|
meillo@58
|
1294 .P
|
meillo@58
|
1295 Code layout, goto, ...
|
meillo@58
|
1296
|
meillo@58
|
1297
|
meillo@58
|
1298
|
meillo@58
|
1299
|
meillo@58
|
1300 .H1 "Concept Exploitation/Homogeniety
|
meillo@58
|
1301
|
meillo@58
|
1302
|
meillo@58
|
1303 .H2 "Draft Folder
|
meillo@58
|
1304 .P
|
meillo@58
|
1305 Historically, MH provided exactly one draft message, named
|
meillo@58
|
1306 .Fn draft
|
meillo@58
|
1307 and
|
meillo@58
|
1308 being located in the MH directory. When starting to compose another message
|
meillo@58
|
1309 before the former one was sent, the user had been questioned whether to use,
|
meillo@58
|
1310 refile or replace the old draft. Working on multiple drafts at the same time
|
meillo@58
|
1311 was impossible. One could only work on them in alteration by refiling the
|
meillo@58
|
1312 previous one to some directory and fetching some other one for reediting.
|
meillo@58
|
1313 This manual draft management needed to be done each time the user wanted
|
meillo@58
|
1314 to switch between editing one draft to editing another.
|
meillo@58
|
1315 .P
|
meillo@58
|
1316 To allow true parallel editing of drafts, in a straight forward way, the
|
meillo@58
|
1317 draft folder facility exists. It had been introduced already in July 1984
|
meillo@58
|
1318 by Marshall T. Rose. The facility was deactivated by default.
|
meillo@58
|
1319 Even in nmh, the draft folder facility remained deactivated by default.
|
meillo@58
|
1320 At least, Richard Coleman added the man page
|
meillo@58
|
1321 .Mp mh-draft(5)
|
meillo@58
|
1322 to document
|
meillo@58
|
1323 the feature well.
|
meillo@58
|
1324 .P
|
meillo@58
|
1325 The only advantage of not using the draft folder facility is the static
|
meillo@58
|
1326 name of the draft file. This could be an issue for MH frontends like mh-e.
|
meillo@58
|
1327 But as they likely want to provide working on multiple drafts in parallel,
|
meillo@58
|
1328 the issue is only concerning compatibility. The aim of nmh to stay compatible
|
meillo@58
|
1329 prevented the default activation of the draft folder facility.
|
meillo@58
|
1330 .P
|
meillo@58
|
1331 On the other hand, a draft folder is the much more natural concept than
|
meillo@58
|
1332 a draft message. MH's mail storage consists of folders and messages,
|
meillo@58
|
1333 the messages named with ascending numbers. A draft message breaks with this
|
meillo@58
|
1334 concept by introducing a message in a file named
|
meillo@58
|
1335 .Fn draft .
|
meillo@58
|
1336 This draft
|
meillo@58
|
1337 message is special. It can not be simply listed with the available tools,
|
meillo@58
|
1338 but instead requires special switches. I.e. corner-cases were
|
meillo@58
|
1339 introduced. A draft folder, in contrast, does not introduce such
|
meillo@58
|
1340 corner-cases. The available tools can operate on the messages within that
|
meillo@58
|
1341 folder like on any messages within any mail folders. The only difference
|
meillo@58
|
1342 is the fact that the default folder for
|
meillo@58
|
1343 .Pn send
|
meillo@58
|
1344 is the draft folder,
|
meillo@58
|
1345 instead of the current folder, like for all other tools.
|
meillo@58
|
1346 .P
|
meillo@58
|
1347 The trivial part of the change was activating the draft folder facility
|
meillo@58
|
1348 by default and setting a default name for this folder. Obviously, I chose
|
meillo@58
|
1349 the name
|
meillo@58
|
1350 .Fn +drafts .
|
meillo@58
|
1351 This made the
|
meillo@82
|
1352 .Sw -draftfolder
|
meillo@58
|
1353 and
|
meillo@82
|
1354 .Sw -draftmessage
|
meillo@58
|
1355 switches useless, and I could remove them.
|
meillo@58
|
1356 The more difficult but also the part that showed the real improvement,
|
meillo@58
|
1357 was updating the tools to the new concept.
|
meillo@82
|
1358 .Sw -draft
|
meillo@58
|
1359 switches could
|
meillo@58
|
1360 be dropped, as operating on a draft message became indistinguishable to
|
meillo@58
|
1361 operating on any other message for the tools.
|
meillo@58
|
1362 .Pn comp
|
meillo@58
|
1363 still has its
|
meillo@82
|
1364 .Sw -use
|
meillo@58
|
1365 switch for switching between its two modes: (1) Compose a new
|
meillo@58
|
1366 draft, possibly by taking some existing message as a form. (2) Modify
|
meillo@58
|
1367 an existing draft. In either case, the behavior of
|
meillo@58
|
1368 .Pn comp is
|
meillo@58
|
1369 deterministic. There is no more need to query the user. I consider this
|
meillo@58
|
1370 a major improvement. By making
|
meillo@58
|
1371 .Pn send
|
meillo@58
|
1372 simply operate on the current
|
meillo@58
|
1373 message in the draft folder by default, with message and folder both
|
meillo@58
|
1374 overridable by specifying them on the command line, it is now possible
|
meillo@58
|
1375 to send a draft anywhere within the storage by simply specifying its folder
|
meillo@58
|
1376 and name.
|
meillo@58
|
1377 .P
|
meillo@58
|
1378 All theses changes converted special cases to regular cases, thus
|
meillo@58
|
1379 simplifying the tools and increasing the flexibility.
|
meillo@58
|
1380
|
meillo@58
|
1381
|
meillo@58
|
1382 .H2 "Trash Folder
|
meillo@58
|
1383 .P
|
meillo@58
|
1384 Similar to the situation for drafts is the situation for removed messages.
|
meillo@58
|
1385 Historically, a message was deleted by renaming. A specific
|
meillo@58
|
1386 \fIbackup prefix\fP, often comma (\c
|
meillo@58
|
1387 .Fn , )
|
meillo@58
|
1388 or hash (\c
|
meillo@58
|
1389 .Fn # ),
|
meillo@58
|
1390 being prepended to the file name. Thus, MH wouldn't recognize the file
|
meillo@58
|
1391 as a message anymore, as only files whose name consists of digits only
|
meillo@58
|
1392 are treated as messages. The removed messages remained as files in the
|
meillo@58
|
1393 same directory and needed some maintenance job to truly delete them after
|
meillo@58
|
1394 some grace time. Usually, by running a command similar to
|
meillo@82
|
1395 .VS
|
meillo@82
|
1396 find /home/user/Mail -ctime +7 -name ',*' | xargs rm
|
meillo@82
|
1397 VE
|
meillo@58
|
1398 in a cron job. Within the grace time interval
|
meillo@58
|
1399 the original message could be restored by stripping the
|
meillo@58
|
1400 the backup prefix from the file name. If however, the last message of
|
meillo@58
|
1401 a folder is been removed \(en say message
|
meillo@58
|
1402 .Fn 6
|
meillo@58
|
1403 becomes file
|
meillo@58
|
1404 .Fn ,6
|
meillo@58
|
1405 \(en and a new message enters the same folder, thus the same
|
meillo@58
|
1406 numbered being given again \(en in our case
|
meillo@58
|
1407 .Fn 6
|
meillo@58
|
1408 \(en, if that one
|
meillo@58
|
1409 is removed too, then the backup of the former message gets overwritten.
|
meillo@58
|
1410 Thus, the ability to restore removed messages does not only depend on
|
meillo@58
|
1411 the ``sweeping cron job'' but also on the removing of further messages.
|
meillo@58
|
1412 This is undesirable, because the real mechanism is hidden from the user
|
meillo@58
|
1413 and the consequences of further removals are not always obvious.
|
meillo@58
|
1414 Further more, the backup files are scattered within the whole mail
|
meillo@58
|
1415 storage, instead of being collected at one place.
|
meillo@58
|
1416 .P
|
meillo@58
|
1417 To improve the situation, the profile entry
|
meillo@58
|
1418 .Pe rmmproc
|
meillo@58
|
1419 (previously named
|
meillo@58
|
1420 .Pe Delete-Prog )
|
meillo@58
|
1421 was introduced, very early.
|
meillo@58
|
1422 It could be set to any command, which would care for the mail removal
|
meillo@58
|
1423 instead of taking the default action, described above.
|
meillo@58
|
1424 Refiling the to-be-removed files to some garbage folder was a common
|
meillo@58
|
1425 example. Nmh's man page
|
meillo@58
|
1426 .Mp rmm(1)
|
meillo@58
|
1427 proposes
|
meillo@58
|
1428 .Cl "refile +d
|
meillo@58
|
1429 to move messages to the garbage folder and
|
meillo@58
|
1430 .Cl "rm `mhpath +d all`
|
meillo@58
|
1431 the empty the garbage folder.
|
meillo@58
|
1432 Managing the message removal this way is a sane approach. It keeps
|
meillo@58
|
1433 the removed messages in one place, makes it easy to remove the backup
|
meillo@58
|
1434 files, and, most important, enables the user to use the tools of MH
|
meillo@58
|
1435 itself to operate on the removed messages. One can
|
meillo@58
|
1436 .Pn scan
|
meillo@58
|
1437 them,
|
meillo@58
|
1438 .Pn show
|
meillo@58
|
1439 them, and restore them with
|
meillo@58
|
1440 .Pn refile .
|
meillo@58
|
1441 There's no more
|
meillo@58
|
1442 need to use
|
meillo@58
|
1443 .Pn mhpath
|
meillo@58
|
1444 to switch over from MH tools to Unix tools \(en MH can do it all itself.
|
meillo@58
|
1445 .P
|
meillo@58
|
1446 This approach matches perfect with the concepts of MH, thus making
|
meillo@58
|
1447 it powerful. Hence, I made it the default. And even more, I also
|
meillo@58
|
1448 removed the old backup prefix approach, as it is clearly less powerful.
|
meillo@58
|
1449 Keeping unused alternative in the code is a bad choice as they likely
|
meillo@58
|
1450 gather bugs, by not being constantly tested. Also, the increased code
|
meillo@58
|
1451 size and more conditions crease the maintenance costs. By strictly
|
meillo@58
|
1452 converting to the trash folder approach, I simplified the code base.
|
meillo@58
|
1453 .Pn rmm
|
meillo@58
|
1454 calls
|
meillo@58
|
1455 .Pn refile
|
meillo@58
|
1456 internally to move the to-be-removed
|
meillo@58
|
1457 message to the trash folder (\c
|
meillo@58
|
1458 .Fn +trash
|
meillo@58
|
1459 by default). Messages
|
meillo@58
|
1460 there can be operated on like on any other message in the storage.
|
meillo@58
|
1461 The sweep clean, one can use
|
meillo@82
|
1462 .Cl "rmm -unlink +trash a" ,
|
meillo@58
|
1463 where the
|
meillo@82
|
1464 .Sw -unlink
|
meillo@58
|
1465 switch causes the files to be truly unliked instead
|
meillo@58
|
1466 of moved to the trash folder.
|
meillo@58
|
1467
|
meillo@58
|
1468
|
meillo@58
|
1469 .H2 "Path Notations
|
meillo@58
|
1470 .P
|
meillo@58
|
1471 foo
|
meillo@58
|
1472
|
meillo@58
|
1473
|
meillo@58
|
1474 .H2 "MIME Integration
|
meillo@58
|
1475 .P
|
meillo@58
|
1476 user-visible access to whole messages and MIME parts are inherently
|
meillo@58
|
1477 different
|
meillo@58
|
1478
|
meillo@58
|
1479
|
meillo@58
|
1480 .H2 "Of One Cast
|
meillo@58
|
1481 .P
|