Mercurial > docs > master
comparison ch03.roff @ 66:4c9f4d05d90e
Rework and extension of text from yesterday.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 02 Jun 2012 10:32:26 +0200 |
parents | abbaca05ee8e |
children | f80ced4e749b |
comparison
equal
deleted
inserted
replaced
65:c8a760de091d | 66:4c9f4d05d90e |
---|---|
35 | 35 |
36 .H2 "Removal of Mail Transfer Facilities | 36 .H2 "Removal of Mail Transfer Facilities |
37 .P | 37 .P |
38 In contrast to nmh, which also provides mail submission and mail retrieval | 38 In contrast to nmh, which also provides mail submission and mail retrieval |
39 facilities, mmh is a MUA only. | 39 facilities, mmh is a MUA only. |
40 .P | 40 This general difference in the view on the character of nmh |
41 The MSA is called ``Message Transfer Service'' (MTS) in nmh. | 41 strongly supported the development of mmh. |
42 Removing the mail transfer facilities had been the first work task | |
43 for the mmh project. | |
44 .P | |
45 The MSA is called \fIMessage Transfer Service\fP (MTS) in nmh. | |
42 The facility establishes TCP/IP connections and speaks SMTP to submit | 46 The facility establishes TCP/IP connections and speaks SMTP to submit |
43 messages for relay to the outside world. | 47 messages for relay to the outside world. |
44 This part is implemented in the | 48 This part is implemented in the |
45 .Pn post | 49 .Pn post |
46 command. | 50 command. |
76 Incorporate them with | 80 Incorporate them with |
77 .Pn inc | 81 .Pn inc |
78 from the system maildrop, or with | 82 from the system maildrop, or with |
79 .Pn rcvstore | 83 .Pn rcvstore |
80 from the standard input. | 84 from the standard input. |
81 .P | 85 In consequence, mmh has not any longer networking code |
82 In consequence, mmh includes neither networking nor SASL code anymore. | 86 and thus does no more need to do transfer encryption and authentication. |
83 Two large separate functional units are removed. | 87 Two large functional units are removed. |
84 They account for about XXX lines of code and XXX libraries. | |
85 .P | 88 .P |
86 With the removal of the MSA and MRA, mmh converted from an all-in-one | 89 With the removal of the MSA and MRA, mmh converted from an all-in-one |
87 mail system to the core: the MUA. | 90 mail system to being only a MUA. |
88 Following the Unix philosophy, it focuses on one job and to do that well. | 91 Following the Unix philosophy, it focuses on one job and to do that well. |
89 Now, of course, mmh depends on third-party software. | 92 Now, of course, mmh depends on third-party software. |
90 An external MTA/MSA is required to transfer mail to the outside world; | 93 An external MTA/MSA is required to transfer mail to the outside world; |
91 an external MRA is required to retrieve mail from remote machines. | 94 an external MRA is required to retrieve mail from remote machines. |
92 There exist excellent implementations of such software, | 95 There exist excellent implementations of such software, |
107 if projects become complex, split them. | 110 if projects become complex, split them. |
108 Complexity is demanded by the problem to solve. Decades ago, | 111 Complexity is demanded by the problem to solve. Decades ago, |
109 emailing had been small and simple. | 112 emailing had been small and simple. |
110 (Remember, | 113 (Remember, |
111 .Pn /bin/mail | 114 .Pn /bin/mail |
112 had once covered anything there was to email.) | 115 had once covered anything there was to email and still had been small.) |
113 As the complexity in emailing increased, MH remainded mostly unchanged. | 116 As the complexity in emailing increased, MH remainded mostly unchanged. |
114 Nontheless, in nmh the POP server, which the original MH had included, | 117 Nontheless, in nmh the POP server, which the original MH had included, |
115 was removed. Now is the time to take one step further and remove | 118 was removed. Now is the time to take one step further and remove |
116 the MSA and MRA. | 119 the MSA and MRA. |
117 Not only does it decrease the code amount of the project, | 120 Not only does it decrease the code amount of the project, |
118 but more important, it removes the whole field of message transfer | 121 but more important, it removes the whole field of message transfer |
119 with all its implications from the project. | 122 with all its implications from the project. |
120 .P | 123 .P |
121 Users of MH are usually able to set up an external MSA and MRA. | 124 If a project needs some kind of function, there's always the choice |
125 between implementing the the function in the project directly or | |
126 depending on a library that provides the function or depending on | |
127 a program that provides the function. | |
128 Whereas adding the function directly to the project increases the | |
129 code size most, it makes the project most independent. | |
130 On the other end, interfacing external programs keeps the interface | |
131 smallest, but the depencency highest. | |
132 Using a library is in the middle. | |
133 Adding the function directly to the project is a bad choice for | |
134 any function of higher complexity, unless it's not available in other ways. | |
135 Hence, the dependencies only change in kind, not in their existence. | |
136 In mmh, library dependencies on | |
137 .Pn libsasl2 | |
138 and | |
139 .Pn libcrypto /\c | |
140 .Pn libssl | |
141 were treated against program dependencies on an MSA and an MRA. | |
142 Besides program dependencies providing the stronger separation | |
143 and being more flexible, they also allowed | |
144 over 6\|000 lines of code to be removed from mmh. | |
145 This made mmh's code base about 12\|% smaller. | |
146 Reducing the projects code size by such an amount without actually | |
147 losing function is a convincing argument. | |
148 .P | |
149 Users of MH should have not problem to set up an external MSA and MRA. | |
122 Also, the popular MSAs and MRAs have large communities and a lot | 150 Also, the popular MSAs and MRAs have large communities and a lot |
123 of documentation available. | 151 of documentation available. |
124 .P | 152 .P |
125 Choices for MSAs range from the full-featured | 153 Choices for MSAs range from the full-featured |
126 .I Postfix | 154 .I Postfix |
210 together with the truly obsolete code relicts | 238 together with the truly obsolete code relicts |
211 .Pn vmh | 239 .Pn vmh |
212 and | 240 and |
213 .Pn wmh , | 241 .Pn wmh , |
214 saved more than 7\|000 lines of C code \(en | 242 saved more than 7\|000 lines of C code \(en |
215 about 15\|% of the project's source code amount. | 243 about 15\|% of the project's original source code amount. |
216 Having the same functionality in less code (with equal readability, | 244 Having the same functionality in less code (with equal readability, |
217 of course) is an advantage. | 245 of course) is an advantage. |
218 Less code means less bugs and less maintenance work. | 246 Less code means less bugs and less maintenance work. |
219 If | 247 If |
220 .Pn rcvtty | 248 .Pn rcvtty |