comparison ch03.roff @ 76:2e61e0004a8f

Rework of existing text.
author markus schnalke <meillo@marmaro.de>
date Tue, 05 Jun 2012 19:00:15 +0200
parents cefaa856d431
children 64f177ca2af1
comparison
equal deleted inserted replaced
75:0927d38589af 76:2e61e0004a8f
10 .H1 "Stream-lining 10 .H1 "Stream-lining
11 11
12 .P 12 .P
13 MH had been considered an all-in-one system for mail handling. 13 MH had been considered an all-in-one system for mail handling.
14 The community around nmh has a similar understanding. 14 The community around nmh has a similar understanding.
15 In fundamental difference, I believe that mmh should be a MUA but 15 In fundamental difference, should be a MUA only.
16 nothing more. I believe that all-in-one mail systems are not the way 16 I believe that all-in-one mail systems are obsolete.
17 to go. There are excellent specialized MTAs, like Postfix; 17 There are excellent specialized MTAs, like Postfix;
18 there are specialized MDAs, like Procmail; there are specialized 18 there are specialized MDAs, like Procmail; there are specialized
19 MRAs, like Fetchmail. I believe it's best to use them instead of 19 MRAs, like Fetchmail. I believe it's best to use them instead of
20 providing the same function ourselves. Doing something well requires to 20 providing the same function ourselves. Doing something well, requires to
21 focus on this particular aspect or a small set of aspects. The more 21 focus on a small set of aspects. The more
22 it is possible to focus, the better the result in this particular 22 it is possible to focus, the better the result in this particular
23 area will be. The limiting resource in Free Software community development 23 area will be. Usually, the limiting resource in Free Software
24 usually is human power. If the low development power is even parted 24 community development is man power.
25 into multiple development areas, it will hardly be possible to 25 If the development power is even spread over a large
26 development area, it becomes more difficult to
26 compete with the specialists in the various fields. This is even 27 compete with the specialists in the various fields. This is even
27 increased, given the small community \(en developers and users \(en 28 increased, given the small community \(en developers and users \(en
28 that MH-based mail systems have. In consequence, I believe that the 29 that MH-based mail systems have. In consequence, I believe that the
29 available resources should be concentrated at the point where MH is 30 available resources should be focused to the point where MH is
30 most unique. This is clearly the MUA part. 31 most unique. This is clearly the MUA part.
31 .P 32 .P
32 The goal for mmh was to remove peripheral parts and stream-line 33 The goal for mmh was to remove peripheral parts and stream-line
33 it for the MUA task. 34 it for the MUA task.
34 35
36 .H2 "Removal of Mail Transfer Facilities 37 .H2 "Removal of Mail Transfer Facilities
37 .P 38 .P
38 In contrast to nmh, which also provides mail submission and mail retrieval 39 In contrast to nmh, which also provides mail submission and mail retrieval
39 facilities, mmh is a MUA only. 40 facilities, mmh is a MUA only.
40 This general difference in the view on the character of nmh 41 This general difference in the view on the character of nmh
41 strongly supported the development of mmh. 42 initiated the development of mmh.
42 Removing the mail transfer facilities had been the first work task 43 Removing the mail transfer facilities had been the first work task
43 for the mmh project. 44 in the mmh project.
44 .P 45 .P
45 The MSA is called \fIMessage Transfer Service\fP (MTS) in nmh. 46 The MSA is called \fIMessage Transfer Service\fP (MTS) in nmh.
46 The facility establishes TCP/IP connections and speaks SMTP to submit 47 The facility established network connections and spoke SMTP to submit
47 messages for relay to the outside world. 48 messages for relay to the outside world.
48 This part is implemented in the 49 This part was implemented by the
49 .Pn post 50 .Pn post
50 command. 51 command.
51 Demanded by the changes in 52 The changes in emailing
52 emailing, this part of nmh required changes in the last years. 53 demanded changes in this part of nmh in the last years.
53 Encrypted connections needed to be supported, hence SASL was introduced 54 Encryption and authetication for network connections
55 needed to be supported, hence TLS and SASL were introduced
54 into nmh. This added complexity to the nmh without improving it in 56 into nmh. This added complexity to the nmh without improving it in
55 its core functions. Also, keeping up with recent developments in 57 its core functions. Also, keeping up with recent developments in
56 this field needs requires development power and specialists. 58 this field requires development power and specialists.
57 Mmh cuts this whole facility off and depends on an external MTA instead. 59 For mmh this whole facility was cut off.
60 .Ci f6aa95b724fd8c791164abe7ee5468bf5c34f226
61 .Ci fecd5d34f65597a4dfa16aeabea7d74b191532c3
62 .Ci 156d35f6425bea4c1ed3c4c79783dc613379c65b
63 Instead, mmh depends on an external MTA.
58 The only outgoing interface available to mmh is the 64 The only outgoing interface available to mmh is the
59 .Pn sendmail 65 .Pn sendmail
60 command. 66 command.
61 Almost any MTA provides a 67 Almost any MTA provides a
62 .Pn sendmail 68 .Pn sendmail
63 command. 69 command.
64 It not, any program can be substituted if it reads the 70 If not, any program can be substituted if it reads the
65 message from the standard input, extracts the recipient addresses 71 message from the standard input, extracts the recipient addresses
66 from the message header and does not conflict 72 from the message header and does not conflict
67 with sendmail-specific command line arguments. 73 with sendmail-specific command line options.
68 .P 74 .P
69 To retrieve mail, the 75 To retrieve mail, the
70 .Pn inc 76 .Pn inc
71 command in nmh has the ability to establish TCP/IP connections 77 command established network connections
72 and speaks POP3 to retrieve mail from remote servers. 78 and spoke POP3 to retrieve mail from remote servers.
73 As with mail submission, here encrypted connections are required 79 As with mail submission, the network connections required encryption and
74 today, thus SASL support was added. 80 authentication, thus TLS and SASL was added.
75 As POP3 is superseded by IMAP more and more, support for message 81 As POP3 becomes more and more superseded by IMAP, support for message
76 retrieval through IMAP will become necessary to be added soon. 82 retrieval through IMAP will become necessary to be added soon, too.
77 Mmh has no support for retrieving mail from remote locations. 83 Mmh has dropped the support for retrieving mail from remote locations.
78 It depends on an external tool to cover this task. 84 .Ci ab7b48411962d26439f92f35ed084d3d6275459c
79 There are two ways for messages to enter mmh's mail storage: 85 Instead, it depends on an external tool to cover this task.
80 Incorporate them with 86 There exist two paths for messages to enter mmh's mail storage:
87 They can be incorporate with
81 .Pn inc 88 .Pn inc
82 from the system maildrop, or with 89 from the system maildrop, or
83 .Pn rcvstore 90 .Pn rcvstore
84 from the standard input. 91 reads them from the standard input.
85 In consequence, mmh has not any longer networking code
86 and thus does no more need to do transfer encryption and authentication.
87 Two large functional units are removed.
88 .P 92 .P
89 With the removal of the MSA and MRA, mmh converted from an all-in-one 93 With the removal of the MSA and MRA, mmh converted from an all-in-one
90 mail system to being only a MUA. 94 mail system to being only a MUA.
91 Following the Unix philosophy, it focuses on one job and to do that well. 95 Following the Unix philosophy, it focuses on one job and
96 tries to do that one well.
97 Not only the programs follow that tenet but also the project itself does so.
92 Now, of course, mmh depends on third-party software. 98 Now, of course, mmh depends on third-party software.
93 An external MTA/MSA is required to transfer mail to the outside world; 99 An external MTA/MSA is required to transfer mail to the outside world;
94 an external MRA is required to retrieve mail from remote machines. 100 an external MRA is required to retrieve mail from remote machines.
95 There exist excellent implementations of such software, 101 There exist excellent implementations of such software,
96 which do this specific task likely much better than the internal 102 which do this specific task likely better than the internal
97 versions of nmh do it. Also, this provides the choice for the best 103 versions had done it. Also, the best suiting programs can be freely chosen.
98 suiting one of the available implementation.
99 .P 104 .P
100 As it had already been possible to use an external MSA or MRA, 105 As it had already been possible to use an external MSA or MRA,
101 why not keep the internal version for convenience? 106 why not keep the internal version for convenience?
102 If this would question the sense in having a fall-back pager in all 107 The question whether there is sense in having a fall-back pager in all
103 the command line tools, in case 108 the command line tools, for the cases when
104 .Pn more 109 .Pn more
105 or 110 or
106 .Pn less 111 .Pn less
107 wouldn't be available, the answer is intuitively seen. 112 aren't available, appears to be ridiculous.
108 Now, an MSA or MRA is clearly more complex than a text pager, but 113 Now, an MSA or MRA is clearly more complex than a text pager,
109 still the concept holds: If programs become complex, split them; 114 and not necessarily available but still the concept holds:
110 if projects become complex, split them. 115 design the system orthogonally.
111 Complexity is demanded by the problem to solve. Decades ago, 116 If it is conceptionally more elegant to have the MTA to be a separate tool
112 emailing had been small and simple. 117 \(en as the RFCs propose this split, this is likely the case \(en
113 (Remember, 118 then separate.
119 .P
120 Further more, if programs become complex, they should be split;
121 and if projects become complex, they should be split, too.
122 Essential complexity is defined by the problem.
123 Decades ago, emailing had been small and simple.
124 (\c
114 .Pn /bin/mail 125 .Pn /bin/mail
115 had once covered anything there was to email and still had been small.) 126 had once covered anything there was to email and still had been small
116 As the complexity in emailing increased, MH remainded mostly unchanged. 127 and simple.)
117 Nontheless, in nmh the POP server, which the original MH had included, 128 Then the essential complexity of email increased.
118 was removed. Now is the time to take one step further and remove 129 Email tools needed to react.
119 the MSA and MRA. 130 In nmh, for instance, the POP server, which the original MH had included,
131 was removed.
132 Now is the time to go one step further and remove the MSA and MRA.
120 Not only does it decrease the code amount of the project, 133 Not only does it decrease the code amount of the project,
121 but more important, it removes the whole field of message transfer 134 but more important, it removes the whole field of message transfer
122 with all its implications from the project. 135 with all its implications for the project.
123 .P 136 It removes the need to adjust to any changes concerning network transfer.
124 If a project needs some kind of function, there's always the choice 137 This independence is received by depending on an external program
125 between implementing the the function in the project directly or 138 that covers the field.
126 depending on a library that provides the function or depending on 139 Today, this is a reasonable exchange.
140 .P
141 To add some kind of function, there's always the choice
142 among implementing the function in the project directly,
143 depending on a library that provides the function, or depending on
127 a program that provides the function. 144 a program that provides the function.
128 Whereas adding the function directly to the project increases the 145 Whereas adding the function directly to the project increases the
129 code size most, it makes the project most independent. 146 code size most and requires most maintenance and development work,
130 On the other end, interfacing external programs keeps the interface 147 it makes the project most independent.
131 smallest, but the depencency highest. 148 Using libraries or external programs require less
132 Using a library is in the middle. 149 maintenance work.
133 Adding the function directly to the project is a bad choice for 150 Programs have the smallest interfaces, providing the most separation
134 any function of higher complexity, unless it's not available in other ways. 151 but possibly limiting the information exchange.
152 External libraries are stronger connected than external programs but
153 allow better information exchange.
154 Adding more code to a project does always increase maintenance work.
155 Implementing complex functions directly in the project will add
156 a lot of code. This should be avoided if possible.
135 Hence, the dependencies only change in kind, not in their existence. 157 Hence, the dependencies only change in kind, not in their existence.
136 In mmh, library dependencies on 158 In mmh, library dependencies on
137 .Pn libsasl2 159 .Pn libsasl2
138 and 160 and
139 .Pn libcrypto /\c 161 .Pn libcrypto /\c
143 and being more flexible, they also allowed 165 and being more flexible, they also allowed
144 over 6\|000 lines of code to be removed from mmh. 166 over 6\|000 lines of code to be removed from mmh.
145 This made mmh's code base about 12\|% smaller. 167 This made mmh's code base about 12\|% smaller.
146 Reducing the projects code size by such an amount without actually 168 Reducing the projects code size by such an amount without actually
147 losing function is a convincing argument. 169 losing function is a convincing argument.
148 .P 170 Actually, as external MSAs and MRAs are likely better
149 Users of MH should have not problem to set up an external MSA and MRA. 171 than the project's internal version, the user even gains functionality.
172 .P
173 Users of MH should not have problems to set up an external MSA and MRA.
150 Also, the popular MSAs and MRAs have large communities and a lot 174 Also, the popular MSAs and MRAs have large communities and a lot
151 of documentation available. 175 of documentation available.
152 .P
153 Choices for MSAs range from the full-featured 176 Choices for MSAs range from the full-featured
154 .I Postfix 177 .I Postfix
155 over mid-size solutions like 178 over mid-size solutions like
156 .I masqmail 179 .I masqmail
157 and 180 and
168 .I fdm . 191 .I fdm .
169 192
170 193
171 .H2 "Removal of non-MUA Tools 194 .H2 "Removal of non-MUA Tools
172 .P 195 .P
173 Some of nmh's tools were removed from mmh because they didn't 196 Some MH tools were removed because they didn't add to the MUA's job.
174 match the main focus of adding to the MUA's task. 197 It is a design goal of mmh to remove the parts that are rarely used.
198 The project shall become more stream-lined and focused.
199 Rarely used and loosely related tools distract from the lean appearance.
200 They require maintenance work without adding to the core task.
201 In mmh the following tools are not available anymore:
175 .BU 202 .BU
176 .Pn conflict 203 .Pn conflict
177 was removed because it is a mail system maintenance tool. 204 was removed because it is a mail system maintenance tool.
205 .Ci 8b235097cbd11d728c07b966cf131aa7133ce5a9
178 Besides, it even checks 206 Besides, it even checks
179 .Fn /etc/passwd 207 .Fn /etc/passwd
180 and 208 and
181 .Fn /etc/group 209 .Fn /etc/group
182 for consistency, which has nothing at all to do with emailing. 210 for consistency, which has nothing at all to do with emailing.
183 The tool might be useful, but it should not be shipped with mmh. 211 The tool might be useful, but it should not be shipped with mmh.
212 .\" XXX historic reasons?
184 .BU 213 .BU
185 .Pn rcvtty 214 .Pn rcvtty
186 was removed because its usecase of writing to the user's terminal 215 was removed because its usecase of writing to the user's terminal
187 on receiving of mail is hardly wanted today. If users like to be 216 on receiving of mail is obsolete.
188 informed of new mail, then using the shell's 217 .Ci 14767c94b3827be7c867196467ed7aea5f6f49b0
218 If users like to be
219 informed of new mail, the shell's
189 .Ev MAILPATH 220 .Ev MAILPATH
190 variable or graphical notifications are likely more 221 variable or graphical notifications are more appealing.
191 appealing.
192 Writing directly to a terminals is hardly ever wanted today. 222 Writing directly to a terminals is hardly ever wanted today.
193 If though one wants to have it this way, the standard tool 223 If though one wants to have it this way, the standard tool
194 .Pn write 224 .Pn write
195 can be used in a way similar to: 225 can be used in a way similar to:
196 .DS 226 .DS
197 scan -file - | write `id -un` 227 scan -file - | write `id -un`
198 .DE 228 .DE
199 .BU 229 .BU
200 .Pn viamail 230 .Pn viamail
201 was removed when the new attachment system was introduced, because 231 was removed when the new attachment system was activated, because
202 .Pn forw 232 .Pn forw
203 could can now the task itself. 233 could then cover the task itself.
234 .Ci eda72d6a7a7c20ff123043fb7f19c509ea01f932
204 The program 235 The program
205 .Pn sendfiles 236 .Pn sendfiles
206 was rewritten as a shell script wrapper around 237 was rewritten as a shell script wrapper around
207 .Pn forw . 238 .Pn forw .
239 .Ci 0e82199cf3c991a173e0ac8aa776efdb3ded61e6
208 .BU 240 .BU
209 .Pn msgchk 241 .Pn msgchk
210 was removed, because it lost its usefulness when POP support was removed. 242 was removed, because it lost its use case when POP support was removed.
243 .Ci bb9360ead7eb7a3fedcce2eeedfc660014e41dbe
244 A call to
211 .Pn msgchk 245 .Pn msgchk
212 provides hardly more information than: 246 provided hardly more information than
213 .DS 247 .DS
214 ls -l /var/mail/meillo 248 ls -l /var/mail/meillo
215 .DE 249 .DE
216 It does separate between old and new mail, but that's merely a detail 250 though it distinguished between old and new mail.
217 and can be done with 251 This detail information and can be retrieved with
218 .Pn stat (1) 252 .Pn stat (1),
219 too. 253 too.
220 A very small shell script could be written to output the information 254 A very small shell script could be written to output the information
221 in a convenient way, if truly necessary. 255 in a similar way, if truly necessary.
222 As mmh's inc only incorporates mail from the user's local maildrop 256 As mmh's
257 .Pn inc
258 only incorporates mail from the user's local maildrop
223 and thus no data transfers over slow networks are involved, 259 and thus no data transfers over slow networks are involved,
224 there's hardly need to check for new mail before incorporating it. 260 there's hardly any need to check for new mail before incorporating it.
225 .BU 261 .BU
226 .Pn msh 262 .Pn msh
227 was removed because the tool was in conflict with the 263 was removed because the tool was in conflict with the philosophy of MH.
228 philosophy of MH. It provided an interactive shell to access the 264 .Ci 916690191222433a6923a4be54b0d8f6ac01bd02
229 features of MH. One major feature of MH is being a tool chest. 265 It provided an interactive shell to access the features of MH,
230 .Pn msh 266 but it wasn't just a shell, tailored to the needs of mail handling.
231 wouldn't be just another shell, tailored to the needs of mail 267 Instead it was one large program that had several MH tools built in.
232 handling, but one large program to have the MH tools built in. 268 This conflicts with the major feature of MH of being a tool chest.
233 It's main use was for accessing Bulletin Boards, which have seized to 269 .Pn msh 's
270 main use case had been accessing Bulletin Boards, which have seized to
234 be popular. 271 be popular.
235 .P 272 .P
236 Removing 273 Removing
237 .Pn msh , 274 .Pn msh ,
238 together with the truly obsolete code relicts 275 together with the truly archaic code relicts
239 .Pn vmh 276 .Pn vmh
240 and 277 and
241 .Pn wmh , 278 .Pn wmh ,
242 saved more than 7\|000 lines of C code \(en 279 saved more than 7\|000 lines of C code \(en
243 about 15\|% of the project's original source code amount. 280 about 15\|% of the project's original source code amount.
244 Having the same functionality in less code (with equal readability, 281 .P
245 of course) is an advantage. 282 Having less code (with equal readability, of course)
283 for the same functionality is an advantage.
246 Less code means less bugs and less maintenance work. 284 Less code means less bugs and less maintenance work.
247 If 285 As
248 .Pn rcvtty 286 .Pn rcvtty
249 and 287 and
250 .Pn msgchk 288 .Pn msgchk
251 are rarely used and can be implemented in different ways, 289 are rarely used and can be implemented in different ways,
252 then why should one keep them? 290 then why should one keep them?
291 Removing them stream-lines mmh.
253 .Pn viamail 's 292 .Pn viamail 's
254 use case is now partly obsolete and partly covered by 293 use case is now partly obsolete and partly covered by
255 .Pn forw , 294 .Pn forw ,
256 hence there's no reason to still have 295 hence there's no reason to still maintain it.
257 .Pn viamail
258 around.
259 .Pn conflict 296 .Pn conflict
260 is not related with the mail client, and 297 is not related to the mail client, and
261 .Pn msh 298 .Pn msh
262 conflicts with the basic concept of MH. 299 conflicts with the basic concept of MH.
263 Both tools could still be useful, but not as part of mmh. 300 Theses two tools might still be useful, but they should not be part of mmh.
264 .P 301 .P
265 It is a design goal of mmh to remove those parts that are rarely used. 302 Finally, there's
266 The project shall become more stream-lined. 303 .Pn slocal .
267 Rarely used and loosely related tools distract from the lean appearance. 304 .Pn slocal
268 They require maintenance cost without adding to the core task. 305 is an MDA and thus not directly MUA-related.
269 Therefore they were removed. 306 Conceptionally, it should be removed.
270 307 But
271 308 .Pn slocal
272 .H2 "Merge of \f(CWshow\fP and \f(CWmhshow\fP 309 provides rule-based processing of messages, like filing them into
310 different folders, which is otherwise not available in mmh.
311 Further more,
312 .Pn slocal
313 does neither pull dependencies nor a whole new technical area
314 into the project.
315 (See section XXX for the removing of the ndbm dependency.)
316 Still,
317 .Pn slocal
318 accounts for about 1\|000 lines of code that need to be maintained.
319 As
320 .Pn slocal
321 is almost self-standing, it should be split off into a separate project.
322 This would cut the strong connection between the MUA mmh and the MDA
323 .Pn slocal .
324 The MDA would become an alternative to
325 .I procmail ,
326 as it would no longer be the need to install a complete MH system, too.
327 Likewise, mmh users could decide to use
328 .I procmail
329 without having a second, unused MDA (\c
330 .Pn slocal )
331 installed.
332 That's conceptionally the best solution.
333 Yet,
334 .Pn slocal
335 is not removed,
336 but as its existence does not affect the rest of mmh,
337 it can be removed at any time.
338
339
340 .H2 "\fLshow\fP and \fPmhshow\fP
273 .P 341 .P
274 Since the very beginning \(en already in the first concept paper \(en 342 Since the very beginning \(en already in the first concept paper \(en
275 .Pn show 343 .Pn show
276 had been MH's message display program. 344 had been MH's message display program.
277 .Pn show 345 .Pn show
278 found out which pathnames the relevant messages had and invoked 346 mapped message numbers and sequences to files and invoked
279 .Pn mhl 347 .Pn mhl
280 then to have the content formated. 348 to have the files formated.
281 With the advent of MIME, this approach wasn't sufficient anymore. 349 For MIME, this approach wasn't sufficient anymore.
282 MIME messages can consist of multiple parts, some of which aren't 350 MIME messages can consist of multiple parts, some of which aren't
283 directly displayable, and text content might be encoded in 351 directly displayable, and text content might be encoded in
284 foreign charsets. 352 foreign charsets.
285 .Pn show 's 353 .Pn show 's
286 simple approach and 354 understanding of messages and
287 .Pn mhl 's 355 .Pn mhl 's
288 limited display facilities couldn't cope with the task any longer. 356 limited display facilities couldn't cope with the task any longer.
289 .P 357 .P
290 Instead of extending these tools, additional ones were written from scratch 358 Instead of extending these tools, additional tools were written from scratch
291 and then added to the MH tool chest. Doing so is encouraged by the 359 and then added to the MH tool chest. Doing so is encouraged by the
292 tool chest approach. The new tools could be added without interfering 360 tool chest approach. The new tools could be added without interfering
293 with the existing ones. This is great. The ease of adding new tools 361 with the existing ones. This is an advantage. The ease of adding new tools
294 even made MH the first MUA to implement MIME. 362 made MH the first MUA to implement MIME.
363 .\" XXX ref
295 .P 364 .P
296 First, the new MIME features were added in form of the single program 365 First, the new MIME features were added in form of the single program
297 .Pn mhn . 366 .Pn mhn .
298 The command 367 The command
299 .Cl "mhn \-show 42 368 .Cl "mhn \-show 42
305 multiple aspects of MIME. One of these resulting tools was 374 multiple aspects of MIME. One of these resulting tools was
306 .Pn mhshow , 375 .Pn mhshow ,
307 which replaced the 376 which replaced the
308 .Cl "mhn \-show 377 .Cl "mhn \-show
309 call. 378 call.
310 .P 379 It was capable to display a MIME message appropriately.
311 From then on, two message display tools were part of nmh. 380 .P
312 Because it should not require user actions to invoke the right tool 381 From then on, two message display tools were part of nmh:
382 .Pn show
383 and
384 .Pn mhshow .
385 Because the user should not need to invoke the right tool
313 whether the message uses MIME or not, 386 whether the message uses MIME or not,
314 .Pn show 387 .Pn show
315 was extended to automatically hand the job over to 388 was extended to automatically hand the job over to
316 .Pn mhshow 389 .Pn mhshow
317 if displaying the message would be beyond 390 if displaying the message would be beyond
318 .Pn show 's 391 .Pn show 's
319 abilities. 392 abilities.
320 For convenience,
321 .Pn show
322 would still display MIME messages if they contained only a single text
323 part.
324 In consequence, the user would invoke 393 In consequence, the user would invoke
325 .Pn show 394 .Pn show
326 (possibly through 395 (possibly through
327 .Pn next 396 .Pn next
328 or 397 or
333 .Pn mhshow , 402 .Pn mhshow ,
334 whatever was more appropriate. 403 whatever was more appropriate.
335 (There was also a switch for 404 (There was also a switch for
336 .Pn show 405 .Pn show
337 to never invoke 406 to never invoke
338 .Pn mhshow .) 407 .Pn mhshow .
408 .Pn show
409 was able to display MIME messages if they contained only a single text
410 part.)
339 .P 411 .P
340 Having two similar tools for essentially the same task is redundant. 412 Having two similar tools for essentially the same task is redundant.
341 Both programs needed to be developed syncronously as they were 413 The development of both programs needed to be in sync,
342 used as a single tool by the user. Thus they needed to act in a 414 to ensure that the programs behaved in a similar way,
343 similar way to not distract the user. 415 because they were used like a single tool.
416 Different behavior would have surprised the user.
344 .P 417 .P
345 Today, non-MIME messages are rather seen to be a special case of 418 Today, non-MIME messages are rather seen to be a special case of
346 MIME messages, than MIME messages are seen to be an extension to 419 MIME messages, than MIME messages are seen to be an extension to
347 original mail. 420 original email.
348 As 421 As
349 .Pn mhshow 422 .Pn mhshow
350 had already be able to display non-MIME messages, it was natural 423 had already be able to display non-MIME messages, it was natural
351 to drop 424 to drop
352 .Pn show 425 .Pn show
353 in favor of using 426 in favor of using
354 .Pn mhshow 427 .Pn mhshow
355 exclusively. 428 exclusively.
429 This decision followed the idea of orthogonal design.
430 For convenience,
431 .Pn mhshow
432 was then renamed to
433 .Pn show .
356 .Ci 4c1efddfd499300c7e74263e57d8aa137e84c853 434 .Ci 4c1efddfd499300c7e74263e57d8aa137e84c853
357 This decision follows the idea of orthogonal design. 435 .P
358 .P 436 To prepare for this transition,
359 To allow this replacement,
360 .Pn mhshow 437 .Pn mhshow
361 was reworked to behave more like 438 was reworked to behave more like
362 .Pn show 439 .Pn show
363 first. 440 first.
364 Section XXX describes this rework from a different perspective. 441 (Section XXX describes this rework from a different perspective.)
365 Once the tools behaved similar, the replacing became a natural decision. 442 Once the tools behaved similar, the replacing became a natural decision.
366 In mmh, 443 In mmh,
367 .Pn show 444 .Pn show
368 is the one single message display program again, but it handles 445 is the one single message display program again, but it handles
369 MIME messages as well as non-MIME messages. 446 MIME messages as well as non-MIME messages.
370 There's only one program to maintain and users don't need to deal 447 Now, there's only one program to maintain, and users don't need to deal
371 with the existance of two display programs. 448 with the existance of two display programs.
372 .P 449 .P
373 Though, there's one reason why removing the old 450 There's one reason why removing the old
374 .Pn show 451 .Pn show
375 hurts: It had been such a simple program. 452 hurts: It had been such a simple program.
376 Its lean elegance is missing to 453 Its lean elegance is missing to
377 .Pn mhshow , 454 .Pn mhshow ,
378 i.e. the new 455 i.e. the new
381 higher complexity. 458 higher complexity.
382 459
383 460
384 .H2 "Removal of Configure Options 461 .H2 "Removal of Configure Options
385 .P 462 .P
386 Choice is a double-edged sword. 463 Customization is a double-edged sword.
387 It allows customization and thus better suiting solutions, 464 It allows better suiting setups, but not for free.
388 but that comes with costs. 465 There is the cost of code complexity to be able to customize.
389 First, there is the cost of code complexity to have choice. 466 There is the cost of less tested setups, because there are
390 Second, there is the cost of less tested setups, because there are
391 more possible setups and especially corner-cases. 467 more possible setups and especially corner-cases.
392 Third, there is the cost of choice itself. 468 And, there is the cost of choice itself.
393 The code complexity affects the developers. 469 The code complexity directly affects the developers.
394 Less tested code affects both, users and developers. 470 Less tested code affects both, users and developers.
395 The problem of choice affects the users, for once simply by having to 471 The problem of choice affects the users, for once by having to
396 choose but also by complexer interfaces that require more documentation. 472 choose, but also by complexer interfaces that require more documentation.
397 Whenever options add little advantages, they should be considered for 473 Whenever options add little advantages, they should be considered for
398 removal. 474 removal.
399 .P
400 I have reduced the number of project-specific configure options from 475 I have reduced the number of project-specific configure options from
401 fifteen to three. 476 fifteen to three.
402 477
403 .U3 "Mail Transfer Facility Options 478 .U3 "Mail Transfer Facilities
404 .P 479 .P
405 With the removal of the mail transfer facilities five option vanished: 480 With the removal of the mail transfer facilities five option vanished:
406 .IP \f(CW--with-mts=[smtp|sendmail]\fP 481 .IP \f(CW--with-mts=[smtp|sendmail]\fP
407 Specified the default mail transport service, which now is sendmail always. 482 Specified the default mail transport service, which now is sendmail always.
408 .IP \f(CW--with-smtpservers=[server1...]\fP 483 .IP \f(CW--with-smtpservers=[server1...]\fP
415 .IP \f(CW--enable-pop\fP 490 .IP \f(CW--enable-pop\fP
416 Enabled the message retrieval facility. 491 Enabled the message retrieval facility.
417 492
418 .U3 "Backup Prefix 493 .U3 "Backup Prefix
419 .P 494 .P
420 The default backup prefix, i.e. the string that was prepended to message 495 The backup prefix is the string that was prepended to message
421 filenames to tag them as deleted, had been the comma `\f(CW,\fP'. 496 filenames to tag them as deleted.
497 By default it had been the comma character `\f(CW,\fP'.
422 There was a configure option to change the default to the hash symbol 498 There was a configure option to change the default to the hash symbol
423 `\f(CW#\fP': 499 `\f(CW#\fP':
424 .CW --with-hash-backup . 500 .CW --with-hash-backup .
425 The implication of the hash symbol is that it introduces a comment 501 The implication of the hash symbol is that it introduces a comment
426 in the Unix shell. 502 in the Unix shell.
437 Besides this effect, the choice was personal preference. 513 Besides this effect, the choice was personal preference.
438 I removed the configure option but added the profile entry 514 I removed the configure option but added the profile entry
439 .Pe backup-prefix , 515 .Pe backup-prefix ,
440 which allows to specify an arbitrary string as backup prefix. 516 which allows to specify an arbitrary string as backup prefix.
441 .Ci 6c40d481d661d532dd527eaf34cebb6d3f8ed086 517 .Ci 6c40d481d661d532dd527eaf34cebb6d3f8ed086
442 This did not remove the choice but moved it to a location where 518 Profile entries are the common method to change mmh's behavior.
519 This change did not remove the choice but moved it to a location where
443 it suited better. 520 it suited better.
444 Profile entries are the common method to change mmh's behavior. 521 .P
445 The name of the 522 Eventually, however, the new trash folder obsoleted the concept of the
446 .Fn .mh-sequences ,
447 for instance, is specified there, too.
448 Moving the specification of the backup prefix there, appears to be right.
449 Eventually, the new trash folder obsoleted the concept of the
450 backup prefix completely. 523 backup prefix completely.
451 (Well, there still are corner-cases to remove until the backup 524 (Well, there still are corner-cases to remove until the backup
452 prefix can be layed to rest, eventually.) 525 prefix can be layed to rest, eventually.)
453 .\" FIXME: Do this work in the code! 526 .\" FIXME: Do this work in the code!
527
528 .U3 "Editor and Pager
454 .P 529 .P
455 The two configure options 530 The two configure options
456 .CW --with-editor=EDITOR 531 .CW --with-editor=EDITOR
457 .CW --with-pager=PAGER 532 .CW --with-pager=PAGER
458 were used to specify the default editor and pager at configure time. 533 were used to specify the default editor and pager at configure time.
459 Doing so at configure time made sense in the Eighties, 534 Doing so at configure time made sense in the Eighties,
460 when the available editors and pagers varied more across different systems. 535 when the set of available editors and pagers varied much across
461 Today, the situation is much more homegenic. 536 different systems.
537 Today, the situation is more homegeneic.
462 The programs 538 The programs
463 .Pn vi 539 .Pn vi
464 and 540 and
465 .Pn more 541 .Pn more
466 can be expected to be available anywhere on every Unix system, 542 can be expected to be available on every Unix system,
467 as they are specified by POSIX since two decades. 543 as they are specified by POSIX since two decades.
468 (The specifications for 544 (The specifications for
469 .Pn vi 545 .Pn vi
470 and 546 and
471 .Pn more 547 .Pn more
482 .Ci 5d43a99db70c12a673028c7758c20cbe3e13ef5f 558 .Ci 5d43a99db70c12a673028c7758c20cbe3e13ef5f
483 Not changed were the 559 Not changed were the
484 .Pe editor 560 .Pe editor
485 and 561 and
486 .Pe moreproc 562 .Pe moreproc
487 profile entries, which allowed the user to change the default 563 profile entries, which allowed the user to override the system defaults.
488 by personal preference.
489 Later, the concept was reworked to respect the standard environment 564 Later, the concept was reworked to respect the standard environment
490 variables 565 variables
491 .Ev VISUAL 566 .Ev VISUAL
492 and 567 and
493 .Ev PAGER 568 .Ev PAGER
494 if they were set. 569 if they are set.
495 Today, mmh determines the editor to use in the following order, 570 Today, mmh determines the editor to use in the following order,
496 taking the first available and non-empty item: 571 taking the first available and non-empty item:
497 .IP (1) 572 .IP (1)
498 Environment variable 573 Environment variable
499 .Ev MMHEDITOR 574 .Ev MMHEDITOR
508 .Ev EDITOR 583 .Ev EDITOR
509 .IP (5) 584 .IP (5)
510 Command 585 Command
511 .Pn vi . 586 .Pn vi .
512 .P 587 .P
513 The pager to use is deteminded in the following order, 588 .Ci f85f4b7ae62e3d05a945dcd46ead51f0a2a89a9b
589 .P
590 The pager to use is deteminded in a similar order,
514 also taking the first available and non-empty item: 591 also taking the first available and non-empty item:
515 .IP (1) 592 .IP (1)
516 Environment variable 593 Environment variable
517 .Ev MMHPAGER 594 .Ev MMHPAGER
518 .IP (2) 595 .IP (2)
525 .Ev PAGER 602 .Ev PAGER
526 .IP (4) 603 .IP (4)
527 Command 604 Command
528 .Pn more . 605 .Pn more .
529 .P 606 .P
530 .Ci f85f4b7ae62e3d05a945dcd46ead51f0a2a89a9b
531 .Ci 0c4214ea2aec6497d0d67b436bbee9bc1d225f1e 607 .Ci 0c4214ea2aec6497d0d67b436bbee9bc1d225f1e
532 .P 608 .P
533 The new behavior confirms better to the common behavior on Unix 609 By respecting the
534 systems, as
535 .Ev VISUAL /\c 610 .Ev VISUAL /\c
536 .Ev EDITOR 611 .Ev EDITOR
537 and 612 and
538 .Ev PAGER 613 .Ev PAGER
539 are respected. 614 environment variables,
540 Additionally, the new approach is more uniform and 615 the new behavior confirms better to the common style on Unix systems.
541 without surprise for users. 616 Additionally, the new approach is more uniform and clearer to users.
542 617
543 .U3 "Locale 618 .U3 "Locale
544 .P 619 .P
545 The configure option 620 The configure option
546 .Sw --disable-locale 621 .Sw --disable-locale
547 was removed because today there's hardly any need to disable locale 622 was removed because today there's hardly any need to disable locale
548 support. 623 support.
549 .Ci ccf4f175ef4c4e7522f9510a4a1149c15d810dd9 624 .Ci ccf4f175ef4c4e7522f9510a4a1149c15d810dd9
550 625
551 .U3 "\fLslocal\fP Supress Duplicates 626 .U3 "ndbm
552 .P 627 .P
553 .Pn slocal 628 .Pn slocal
554 is an MDA included in mmh. 629 is an MDA included in mmh.
555 This is a violation of the idea that mmh is a MUA only. 630 This is a violation of the idea that mmh is a MUA only.
556 .Pn slocal 631 .Pn slocal
557 should become a separate project. 632 should become a separate project.
558 Nonetheless, ouf of convenience and due to lack of convincement, 633 Nonetheless, ouf of convenience and due to lack of convincement,
559 yet it remains being part of mmh. 634 yet it remains being part of mmh.
560 This is likely to change in the future. 635 This is likely to change in the future.
561 Already, 636 Already,
562 .Pn slocal was stripped down. 637 .Pn slocal
638 was stripped down.
563 It used to depend on 639 It used to depend on
564 .I ndbm , 640 .I ndbm ,
565 a database library. 641 a database library.
566 The database is used to store the message ids of all messages delivered. 642 The database is used to store the `\fLMessage-ID\fP's of all
643 messages delivered.
567 This enables 644 This enables
568 .Pn slocal 645 .Pn slocal
569 to suppress delivering the same message to the same user twice. 646 to suppress delivering the same message to the same user twice.
570 (This features was enabled by the 647 (This features was enabled by the
571 .Sw -suppressdup 648 .Sw -suppressdup
580 were added to help with difficult setups that would 657 were added to help with difficult setups that would
581 not be detected automatically. 658 not be detected automatically.
582 .P 659 .P
583 By removing the suppress duplicates feature of 660 By removing the suppress duplicates feature of
584 .Pn slocal , 661 .Pn slocal ,
662 .Ci ecd6d6a20cb7a1507e3a20d6c4cb3a1cf14c6bbf
585 the dependency on 663 the dependency on
586 .I ndbm 664 .I ndbm
587 was removed and 120 lines of complex autoconf could be saved. 665 was removed and 120 lines of complex autoconf could be saved.
588 .Ci ecd6d6a20cb7a1507e3a20d6c4cb3a1cf14c6bbf 666 .Ci ecd6d6a20cb7a1507e3a20d6c4cb3a1cf14c6bbf
589 The change removed funtionality too, but the value it would have added 667 The change removed funtionality too, but the value it would have added
594 .P 672 .P
595 The configure option 673 The configure option
596 .Sw --disable-mhe 674 .Sw --disable-mhe
597 was removed when the mh-e support was reworked. 675 was removed when the mh-e support was reworked.
598 Mh-e is the Emacs front-end to MH. 676 Mh-e is the Emacs front-end to MH.
599 It requires MH to act different in some minor ways. 677 It requires MH to provide minor additional functions.
600 The configure option could switch the extension off. 678 The
601 After removing support for old versions of mh-e, 679 .Sw --disable-mhe
680 configure option could switch these extensions off.
681 After removing the support for old versions of mh-e,
602 only the 682 only the
603 .Sw -build 683 .Sw -build
604 switches for 684 switches of
605 .Pn forw 685 .Pn forw
606 and 686 and
607 .Pn repl 687 .Pn repl
608 are left to be mh-e-specific. 688 are left to be mh-e extensions.
609 They are now always available because they add little code and complexity. 689 They are now always built in because they add little code and complexity.
610 This change was first done in nmh and thereafter merged into mmh. 690 In consequence, the
611 The interface changes in mmh require mh-e to be adjusted to use mmh
612 as the back-end. This requires minor changes to mh-e, though removing
613 the
614 .Sw -build
615 switches would require larger adjustments.
616 The
617 .Sw --disable-mhe 691 .Sw --disable-mhe
618 configure option was removed and the remaining support for mh-e is always 692 configure option was removed
619 built in.
620 .Ci a7ce7b4a580d77b6c2c4d980812beb589aa4c643 693 .Ci a7ce7b4a580d77b6c2c4d980812beb589aa4c643
621 Removing the option removed a second code setup that would have 694 Removing the option removed a second code setup that would have
622 needed to be tested. 695 needed to be tested.
696 This change was first done in nmh and thereafter merged into mmh.
697 .P
698 The interface changes in mmh require mh-e to be adjusted in order
699 to be able to use mmh as back-end.
700 This will require minor changes to mh-e, but removing the
701 .Sw -build
702 switches would require more rework.
623 703
624 .U3 "Masquerading 704 .U3 "Masquerading
625 .P 705 .P
626 The configure option 706 The configure option
627 .Sw --enable-masquerade 707 .Sw --enable-masquerade
628 could take up to three items: draft_from, mmailid, username_extension. 708 could take up to three arguments:
709 `draft_from', `mmailid', and `username_extension'.
629 They activated different types of address masquerading. 710 They activated different types of address masquerading.
630 All of them were implemented in the SMTP-speaking 711 All of them were implemented in the SMTP-speaking
631 .Pn post 712 .Pn post
632 command. 713 command, which provided an MSA.
633 Mmh no longer speaks SMTP and the replacing 714 Address masquerading is an MTA's task and mmh does not cover
634 .Pn spost 715 this field anymore.
635 command no longer does MTA jobs like this one. 716 Hence, true masquerading needs to be implemented in the external MTA.
636 Because address masquerading is an MTA's task and mmh does not cover
637 this field anymore, the funtion needs to be implemented in the
638 external MTA used.
639 .P 717 .P
640 The 718 The
641 .I mmailid 719 .I mmailid
642 masquerading type is the oldest one of the three and the only one 720 masquerading type is the oldest one of the three and the only one
643 available in the original MH. 721 available in the original MH.
644 It provided a 722 It provided a
645 .I username 723 .I username
646 to 724 to
647 .I fakeusername 725 .I fakeusername
648 mapping, based on the value of the password file's GECOS field. 726 mapping, based on the password file's GECOS field.
649 The man page 727 The man page
650 .Mp mh-tailor(5) 728 .Mp mh-tailor(5)
651 described the use case as being the following: 729 described the use case as being the following:
652 .QP 730 .QP
653 This is useful if you want the messages you send to always 731 This is useful if you want the messages you send to always
656 `First.Last' sendmail aliases for all users. If this is 734 `First.Last' sendmail aliases for all users. If this is
657 the case, the GECOS field for each user should look like: 735 the case, the GECOS field for each user should look like:
658 ``First [Middle] Last <First.Last>'' 736 ``First [Middle] Last <First.Last>''
659 .P 737 .P
660 As mmh sends outgoing mail via the local MTA only, 738 As mmh sends outgoing mail via the local MTA only,
661 it is the best location to do such global rewrites. 739 the best location to do such global rewrites is there.
662 Besides, the MTA is conceptionally the right location because it 740 Besides, the MTA is conceptionally the right location because it
663 does the reverse mapping for incoming mail (aliasing), too. 741 does the reverse mapping for incoming mail (aliasing), too.
664 The masquerading set up there is set up once for all 742 Further more, masquerading set up there is readily available for all
665 mail software on the system. 743 mail software on the system.
744 Hence, mmailid masquerading was removed.
666 .Ci 0836c8000ccb34b59410ef1c15b1b7feac70ce5f 745 .Ci 0836c8000ccb34b59410ef1c15b1b7feac70ce5f
667 .P 746 .P
668 The 747 The
669 .I username_extension 748 .I username_extension
670 masquerading type did not replace the username but could append a suffix 749 masquerading type did not replace the username but would append a suffix,
671 to it. 750 specified by the
672 The suffix needed to be specified by the
673 .Ev USERNAME_EXTENSION 751 .Ev USERNAME_EXTENSION
674 environment variable. 752 environment variable, to it.
675 It provided support for the 753 This provided support for the
676 .I user-extension 754 .I user-extension
677 feature of qmail and the similar 755 feature of qmail and the similar
678 .I "plussed user 756 .I "plussed user
679 processing of sendmail. 757 processing of sendmail.
680 The decision to remove this username_extension masquerading was 758 The decision to remove this username_extension masquerading was
681 motivated by the fact that 759 motivated by the fact that
682 .Pn spost 760 .Pn spost
683 hadn't supported it. 761 hadn't supported it already.
684 .Ci 2abae0bfd0ad5bf898461e50aa4b466d641f23d9_username_extension 762 .Ci 2abae0bfd0ad5bf898461e50aa4b466d641f23d9
685 Mmh now provides a more general, though in this case less convenient, 763 Username extensions are possible in mmh, but less convenient to use.
686 kind of masquerading. 764 .\" XXX format file %(getenv USERNAME_EXTENSION)
687 .P 765 .P
688 The 766 The
689 .I draft_from 767 .I draft_from
690 masquerading type instructed 768 masquerading type instructed
691 .Pn post 769 .Pn post
692 to use the value of the `From:' header as SMTP envelope sender. 770 to use the value of the `From:' header as SMTP envelope sender.
693 This allowes to replace the sender address completely. 771 Sender addresses could be replaced completely.
694 .Ci b14ea6073f77b4359aaf3fddd0e105989db9 772 .Ci b14ea6073f77b4359aaf3fddd0e105989db9
695 Mmh now offers a kind of masquerading similar in effect, but 773 Mmh offers a kind of masquerading similar in effect, but
696 with technical differences. 774 with technical differences.
697 As mmh does not transfer messages itself, the local MTA has full control 775 As mmh does not transfer messages itself, the local MTA has final control
698 over the sending address. Any masquerading mmh introduces may be reverted 776 over the sender's address. Any masquerading mmh introduces may be reverted
699 by the MTA. In times of pedantic spam checking, an MTA will likely do so 777 by the MTA.
700 to keep its own reputation up. 778 In times of pedantic spam checking, an MTA will take care to use
701 Nonetheless, the MUA can set the `From:' header and thus propose 779 sensible envelope sender addresses to keep its own reputation up.
702 a sender address to be used to the MTA. 780 Nonetheless, the MUA can set the `From:' header and thereby propose
781 a sender address to the MTA.
703 The MTA may then decide to take that one or generate the canonical sender 782 The MTA may then decide to take that one or generate the canonical sender
704 address for use as envelope sender address. 783 address for use as envelope sender address.
705 .P 784 .P
706 In mmh, the MTA will always extract the recipient and sender from the 785 In mmh, the MTA will always extract the recipient and sender from the
707 headers (\c 786 message headers (\c
708 .Pn sendmail 's 787 .Pn sendmail 's
709 .Sw -t 788 .Sw -t
710 switch). 789 switch).
711 The `From:' header of the draft may be set arbitrary by the user. 790 The `From:' header of the draft may be set arbitrary by the user.
712 If it is missing, the canonical sender address will be generated by the MTA. 791 If it is missing, the canonical sender address will be generated by the MTA.
714 .U3 "Remaining Options 793 .U3 "Remaining Options
715 .P 794 .P
716 Two configure options remain in mmh. 795 Two configure options remain in mmh.
717 One is the locking method to use: 796 One is the locking method to use:
718 .Sw --with-locking=[dot|fcntl|flock|lockf] . 797 .Sw --with-locking=[dot|fcntl|flock|lockf] .
719 Removing all other methods except the portable dot locking and having 798 The idea of removing all methods except the portable dot locking
720 that as default is appealing, but requires deeper investigation into the 799 and having that one as the default is appealing, but this change
721 topic. 800 requires deeper technical investigation into the topic.
722 The other, 801 The other option,
723 .Sw --enable-debug , 802 .Sw --enable-debug ,
724 compiles the programs with debugging symbols and does not strip them. 803 compiles the programs with debugging symbols and does not strip them.
725 This option is likely to stay. 804 This option is likely to stay.
726 805
727 806