]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/MHnotes
Added several historical source archives from the early days of MH.
[nmh] / docs / historical / mh-jun-1982 / MHnotes
1 This file contains some notes on features/bugs/etc which are
2 not documented in the "MH User's Manual", as well as some notes
3 on future directions. See MHgenerate for more info. Some of
4 these notes assume VAX/V7 UNIX--as noted by {V/V7}.
5
6 0) Directories:
7 support contains files which get copied to /etc/mh, as
8 well as some miscellaneous Rand support programs
9 subs contains support subroutines--built into subs.a
10 strings contains c files which define all of the default
11 names and paths used by the package->strings.a
12 Extras old and un-supported code--much of it not
13 converted to V7. Look at libg/libh for help in
14 getting around V7 features.
15 DOC contains the MH User's Manual document in nroff/
16 troff form. This requires the Phototypesetter or
17 V7 version of nroff/troff, AND the Berkeley -me
18 macros.
19
20 1) Undocumented Feature: The paths to the various programs which
21 MH exec's are kept in variables named something like "lsproc".
22 (See the strings directory.) While reading in the user's
23 profile, (m_getdefs()) a component matching one of these exec
24 path names, will cause the default string to be replaced by
25 the profile entry argument. Thus, the profile entry "lsproc:
26 /usr/foo/bin/newls" will cause all MH programs using "lsproc"
27 to get a new ls. At least for now, there is no way to specify
28 switches. This mapping is arranged by the "procs" structure
29 in m_getdefs.c--keep it up to date if new exec procs are
30 added.
31
32 2) Collision: Take a close look at the "onceonly" entry of the
33 Makefile. Bell already has a program named `file', which the
34 makefile will rename to `filetype', which is what it tries to
35 indicate. If you really want to, you might rename the MH
36 command `file', but I have yet to hear of an even vaguely
37 reasonable alternative.
38
39 3) Different Approach: Using the Berkeley C shell (csh),
40 "multiple links to the same file with different profile
41 entries" is better served with aliases.
42
43 4) Collision: {V/V7} BELL mail cannot co-exist with MH--IF THEY
44 SHARE THE SAME MAILBOXES, otherwise they co-exist fine! If
45 you use the standard (VAX) mail directory /usr/spool/mail for
46 MH, you should also install the MH version of the mail
47 program. It is much nicer, and integrates with MH cleanly.
48 The advantage of using /usr/spool/mail is that login will
49 notify of new mail.
50
51 5) Feature: If you add a line like:
52
53 30 1 * * * /etc/mh/conflict -mail admin
54
55 to crontab, then every morning at 1:30 AM, the alias file will
56 be checked against the /etc/passwd file to see that
57 inconsistencies haven't been introduced. In particular, a
58 line in the alias file may be "tom: jones" (because Tom Jones
59 likes to be called Tom), but if tom is also a valid user name,
60 tom will no longer receive any mail! This program also prints
61 any mail drops in /usr/spool/mail which don't belong to a
62 valid user (i.e. a deleted or renamed user id).
63
64 "convlict -mail name" will check the consistency and mail
65 the specified user a short status message.
66
67 This program also checks to see if there are any users who do
68 not belong to any group, or any user in a group which is missing
69 from the passwd file. This latter is an inconsistency on all
70 systems, whereas the former is not required except at Rand, and
71 won't be compiled without the "-DRAND" cc flag in the makefile.
72
73 6) Hidden Feature: At the request of some of the Rand staff,
74 there is the ability to invoke a user-specified deletion-
75 program to implement message deletion, rather than getting the
76 default comma renaming convention (see next item). If a
77 user's profile contains the line: "Delete-prog: path", the
78 specified path will be called with a list of files needing
79 deletion. All this code works...
80
81 7) Feature: When a message (draft or in a folder) is "removed",
82 it is really renamed with a leading comma. E.g. foo -> ,foo.
83 At Rand we have a program called the midnight skulker which
84 goes through the whole system and removes all backup (starting
85 with comma), a.out, and core files. This backup convention
86 gives users a chance to undo spurious removes, at least all
87 day. You may want to replace these renames with a simple
88 unlink(), or each user may get this effect by specifying
89 "Delete-prog: /bin/rm" in his/her profile.
90
91 8) Feature: NEWS. The news facility is undocumented in the MH
92 manual, because it is a very new addition to the package. SO,
93 here it is...
94
95 The directory /usr/news should be created--it will
96 contain the folders for news topics, and various support
97 files. The news items are strictly MH folders, and users
98 can utilize all of the MH commands on them. The news
99 program is similar to "show", but it shows `unseen' news
100 as the default, keeping a separate entry in the users
101 profile for each news topic indicating the highest item
102 the user has seen. These entries look like
103 "news-<topic>: highest-seen".
104
105 Rather than read through the news folders to determine
106 the number of entries, a file with name .<topic> (i.e.
107 period followed by the topic name) is kept with length
108 equal to highest message number. Thus, to determine if a
109 user hasn't seen some news, the news directory
110 (/usr/news) is read, and for each non-period beginning
111 file (i.e. each folder), stat the associated period
112 beginning file, and compare its length with the users
113 profile news entry for the same name. If the user has no
114 entry, or it is less than the length of the period-file,
115 then show him the remainder of the news in each such
116 topic.
117
118 The program `l' is used to display each message, and the
119 highest item profile entry is updated prior to each
120 individual message displayed, so <del> will leave the
121 user's profile in the proper state for the next news
122 request.
123
124 Add a user to the system called news, with home directory
125 /usr/news and add the line:
126
127 news.*: news
128
129 to /etc/MailAlias. Thus, to add news to a topic, it is
130 only necessary to mail to news.topic, and it will happen.
131 To make the automatic filing into folders happen, copy
132 the file support/news-mh_receiv to /usr/news/.mh_receive.
133 This is a shell script which will get invoked whenever
134 mail is sent to the user news (see next "undocumented
135 feature").
136
137 Problems: I have yet to write the program which packs
138 news folders. Items can be readily removed (as long as
139 they are not the last item in the folder), but if the
140 folder is packed (after some months/years the item
141 numbers will reach the 999 limit), it is necessary to go
142 through everyones .mh_profile files and reset the
143 highest-seen numbers. Not hard to write, I just haven't
144 done it yet. Also, the receive shell script should be
145 recoded in C to speed it up considerably.
146
147 9) Undocumented Feature: If a user has an executable program or
148 shell script named ".mh_receive" in his home directory, then
149 it will be executed by the mail deliverer RATHER than
150 appending mail items to the user's mail file
151 (/usr/spool/mail/name). This program will be called with:
152
153 execlp(prog, prog, tmpfil, mail, home, 0);
154
155 where prog is the receive program, tmpfil is a file in
156 /usr/tmp which is the mail to be received, mail is the path of
157 the user's mail drop (/usr/spool/mail/name), and home is the
158 $HOME directory of the user. File descriptor 3 will have
159 tmpfil opened on it read only. These are all the RECEIVER'S
160 parameters, not the sender's. Also, the environment is set up
161 with appropriate values for HOME and USER.
162
163 Eventually, the goal is to have received mail LINKED into
164 user's inbox folders, rather than appended to their mailboxes.
165 This will facilitate the sending of mail to large distribution
166 lists (Rand is always tight on space!) Have a look at the news
167 .mh_receive file for an example of this facility.
168
169 Warning: appropriate interlocks are implemented in "deliver"
170 to prevent collisions when it appends to mailboxes, but it is
171 up to the users's .mh_receive program to provide its own
172 interlocks!
173
174 10) New Program: "mhl" is a custom MH list program which displays
175 messages according to a format specification. See MHL.Design
176 for further details. See Extras/mhl.bsb for an added example.
177
178 11) New Program: "ali" is a mail alias checker. It takes a list
179 of names, and produces the alias list for the names. It also
180 indicates any names which are not valid local names or aliases.
181
182
183
184
185 Bruce Borden
186 Mar