Changed type of name argument to m_getfld() from unsigned char *
[mmh] / docs / historical / mh-6.8.5 / conf / doc / RCS / mh-alias.rf,v
1 head    1.11;
2 access;
3 symbols;
4 locks; strict;
5
6
7 1.11
8 date    92.12.11.21.44.16;      author jromine; state Exp;
9 branches;
10 next    1.10;
11
12 1.10
13 date    92.05.12.22.23.34;      author jromine; state Exp;
14 branches;
15 next    1.9;
16
17 1.9
18 date    92.02.11.00.48.48;      author jromine; state Exp;
19 branches;
20 next    1.8;
21
22 1.8
23 date    92.01.30.19.05.13;      author jromine; state Exp;
24 branches;
25 next    1.7;
26
27 1.7
28 date    90.04.05.15.10.15;      author sources; state Exp;
29 branches;
30 next    1.6;
31
32 1.6
33 date    90.03.22.19.30.56;      author sources; state Exp;
34 branches;
35 next    1.5;
36
37 1.5
38 date    90.03.22.11.31.13;      author sources; state Exp;
39 branches;
40 next    1.4;
41
42 1.4
43 date    90.03.20.19.41.51;      author sources; state Exp;
44 branches;
45 next    1.3;
46
47 1.3
48 date    90.03.20.17.36.07;      author sources; state Exp;
49 branches;
50 next    1.2;
51
52 1.2
53 date    90.03.16.15.40.27;      author sources; state Exp;
54 branches;
55 next    1.1;
56
57 1.1
58 date    90.03.16.15.33.46;      author sources; state Exp;
59 branches;
60 next    ;
61
62
63 desc
64 @@
65
66
67 1.11
68 log
69 @note bug in blind list forward references
70 @
71 text
72 @.\"    @@(MHWARNING)
73 .\" @@(#)$Id: mh-alias.rf,v 1.10 1992/05/12 22:23:34 jromine Exp jromine $
74 .SC MH-ALIAS 5
75 .NA
76 mh-alias \- alias file for MH message system
77 .SY
78 any \fIMH\fR command
79 .DE
80 This describes both \fIMH\fR personal alias files and
81 the (primary) alias file for mail delivery, the file
82
83         @@(MHETCPATH)/MailAliases
84
85 It does \fBnot\fR describe aliases files used by the message transport system.
86 Each line of the alias file has the format:
87
88         alias : address\-group
89 .br
90 or
91 .br
92         alias ; address\-group
93 .br
94 or
95 .br
96         < alias\-file
97 .br
98 or
99 .br
100         ; comment
101 .br
102
103 where:
104
105         address\-group  :=  address\-list
106 .br
107                        |   \*(lq<\*(rq file
108 .br
109                        |   \*(lq=\*(rq UNIX\-group
110 .br
111                        |   \*(lq+\*(rq UNIX\-group
112 .br
113                        |   \*(lq*\*(rq
114
115 .br
116         address\-list   :=  address
117 .br
118                        |   address\-list, address
119 .br
120
121 Continuation lines in alias files end with `\\' followed by the newline
122 character.
123
124 Alias\-file and file are UNIX file names.
125 UNIX\-group is a group name (or number) from \fI/etc/group\fR.
126 An address is a \*(lqsimple\*(rq Internet\-style address.
127 Througout this file, case is ignored, except for alias\-file names.
128
129 If the line starts with a `<', then the file named after the `<' is
130 read for more alias definitions.  The reading is done recursively, so a `<'
131 may occur in the beginning of an alias file with the expected results.
132
133 If the address\-group starts with a `<',
134 then the file named after the `<' is read and its contents are added to
135 the address\-list for the alias.
136
137 If the address\-group starts with an `=',
138 then the file \fI/etc/group\fR is consulted
139 for the UNIX\-group named after the `='.
140 Each login name occurring as a member of the group is added to the
141 address\-list for the alias.
142
143 In contrast, if the address\-group starts with a `+',
144 then the file \fI/etc/group\fR is consulted
145 to determine the group\-id of the UNIX\-group named after the `+'.
146 Each login name occurring in the \fI/etc/passwd\fR file whose group\-id
147 is indicated by this group is added to the address\-list for the alias.
148
149 If the address\-group is simply `*',
150 then the file \fI/etc/passwd\fR is consulted
151 and all login names with a userid greater than some magic number
152 (usually 200) are added to the address\-list for the alias.
153
154 In match, a trailing * on an alias will match just about anything appropriate.
155 (See example below.)
156
157 An approximation of the way aliases are resolved at posting time is
158 (it's not really done this way):
159
160 .in +.5i
161 1) Build a list of all addresses from the message to be
162 delivered, eliminating duplicate addresses.
163
164 2) If this draft originated on the local host,
165 then for those addresses in the message that have no host specified,
166 perform alias resolution.
167
168 3) For each line in the alias file,
169 compare \*(lqalias\*(rq against all of the existing addresses.
170 If a match, remove the matched \*(lqalias\*(rq from the address list,
171 and add each new address in the address\-group to the address list
172 if it is not already on the list.
173 The alias itself is not usually output,
174 rather the address\-group that the alias maps to is output instead.
175 If \*(lqalias\*(rq is terminated with a `;' instead of a `:',
176 then both the \*(lqalias\*(rq and the address are output
177 in the correct format.
178 (This makes replies possible since \fIMH\fR aliases and
179 personal aliases are unknown to the mail transport system.)
180 .in -.5i
181
182 Since the alias file is read line by line, forward references
183 work, but backward references are not recognized, thus, there is
184 no recursion.
185
186 .ne 10
187 \fBExample:\fR
188 .nf
189 .in +.5i
190 <@@(MHETCPATH)/BBoardAliases
191 sgroup: fred, fear, freida
192 b-people: Blind List: bill, betty;
193 fred: frated@@UCI
194 UNIX\-committee: <unix.aliases
195 staff: =staff
196 wheels: +wheel
197 everyone: *
198 news.*: news
199 .in -.5i
200 .fi
201
202 The first line says that more aliases should immediately be read from
203 the file \fI@@(MHETCPATH)/BBoardAliases\fR.
204 Following this, \*(lqfred\*(rq is defined as an alias for
205 \*(lqfrated@@UCI\*(rq,
206 and \*(lqsgroup\*(rq is defined as an alias for 
207 the three names \*(lqfrated@@UCI\*(rq, \*(rqfear\*(rq, and \*(rqfreida\*(rq.
208 .sp
209 The alias \*(lqb-people\*(rq is a blind list which includes the
210 addresses \*(lqbill\*(rq and \*(lqbetty\*(rq; the message
211 will be delieved to those addresses, but the
212 message header will  show only \*(lqBlind List: ;\*(rq (not the addresses).
213 .sp
214 Next, the definition of \*(lqUNIX\-committee\*(rq is given by reading
215 the file \fIunix.aliases\fR in the users \fIMH\fR directory,
216 \*(lqstaff\*(rq is defined as all users who are listed as members of
217 the group \*(lqstaff\*(rq in the \fI/etc/group\fR file,
218 and \*(lqwheels\*(rq is defined as all users whose group\-id in
219 \fI/etc/passwd\fR is equivalent to the \*(lqwheel\*(rq group.
220 .sp
221 Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id in
222 \fI/etc/passwd\fR greater than 200,
223 and all aliases of the form \*(lqnews.<anything>\*(rq are defined
224 to be \*(lqnews\*(rq.
225
226 The key thing to understand about aliasing in \fIMH\fR
227 is that aliases in \fIMH\fR alias files are expanded into the
228 headers of messages posted.
229 This aliasing occurs first,
230 at posting time,
231 without the knowledge of the message transport system.
232 In contrast,
233 once the message transport system is given a message to deliver
234 to a list of addresses,
235 for each address that appears to be local,
236 a system\-wide alias file is consulted.
237 These aliases are \fBNOT\fR expanded into the headers of messages delivered.
238 .Hh
239 To use aliasing in \fIMH\fR quickly, do the following:
240
241 .in +.5i
242 First, in your \fI\&.mh\(ruprofile\fR,
243 choose a name for your alias file, say \*(lqaliases\*(rq,
244 and add the line:
245
246 .nf
247 .in +.5i
248 Aliasfile: aliases
249 .\" ali: \-alias aliases
250 .\" send: \-alias aliases
251 .\" whom: \-alias ailases
252 .in -.5i
253 .fi
254
255 Second, create the file \*(lqaliases\*(rq in your \fIMH\fR directory.
256
257 Third, start adding aliases to your \*(lqaliases\*(rq file as appropriate.
258 .in -.5i
259 .Fi
260 ^@@(MHETCPATH)/MailAliases~^Primary alias file
261 .Pr
262 ^Aliasfile:~^For a default alias file
263 .Sa
264 ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8)
265 .De
266 None
267 .Co
268 None
269 .Hi
270 In previous releases of \fIMH\fR,
271 only a single, system\-wide mh\-alias file was supported.
272 @@BEGIN: MMDFMTS
273 Now that \fIMH\fR uses \fIMMDF\fR as a transport system,
274 the system\-wide aliasing facility can be more consistently controlled by the
275 latter.
276 This means that at most sites,
277 the system\-wide mh\-alias file will be empty (or trivial at best).
278 @@END: MMDFMTS
279 @@BEGIN: MHMTS
280 This led to a number of problems,
281 since only mail\-system administrators were capable of (un)defining
282 aliases.
283 @@END: MHMTS
284 @@BEGIN: SENDMTS
285 This led to a number of problems,
286 since only mail\-system administrators were capable of (un)defining
287 aliases.
288 @@END: SENDMTS
289 Hence,
290 the semantics of mh\-alias were extended to support personal alias files.
291 Users of \fIMH\fR no longer need to bother mail\-system administrators for
292 keeping information in the system\-wide alias file,
293 as each \fIMH\fR user can create/modify/remove aliases at will from any
294 number of personal files.
295 .Bu
296 Although the forward-referencing semantics of \fImh\-alias\fR files prevent
297 recursion, the \*(lq<\ alias\-file\*(rq command may defeat this.  Since the
298 number of file descriptors is finite (and very limited), such infinite
299 recursion will terminate with a meaningless diagnostic when all the fds are
300 used up.
301 .sp
302 Forward references do not work correctly inside blind lists.
303 .En
304 @
305
306
307 1.10
308 log
309 @fixup for nroff problems
310 @
311 text
312 @d2 1
313 a2 1
314 .\" @@(#)$Id: mh-alias.rf,v 1.9 1992/02/11 00:48:48 jromine Exp jromine $
315 d115 1
316 d137 1
317 d142 1
318 d149 1
319 d225 1
320 a225 1
321 Although the forward\-referencing semantics of \fImh\-alias\fR files prevent
322 d230 2
323 @
324
325
326 1.9
327 log
328 @Document Aliasfile may be more than one file
329 @
330 text
331 @d2 2
332 a3 2
333 .\" @@(#)$Id: mh-alias.rf,v 1.8 1992/01/30 19:05:13 jromine Exp jromine $
334 .SC MH\-ALIAS 5
335 d5 1
336 a5 1
337 mh\-alias \- alias file for MH message system
338 @
339
340
341 1.8
342 log
343 @document blind lists
344 @
345 text
346 @d2 1
347 a2 1
348 .\" @@(#)$Id: mh-alias.rf,v 1.7 1990/04/05 15:10:15 sources Exp jromine $
349 d168 1
350 a168 1
351 choose a name for your primary alias file, say \*(lqaliases\*(rq,
352 @
353
354
355 1.7
356 log
357 @add ID
358 @
359 text
360 @d2 1
361 a2 1
362 .\" @@(#)$Id:$
363 d120 1
364 d136 4
365 @
366
367
368 1.6
369 log
370 @document comment lines
371 @
372 text
373 @d2 1
374 @
375
376
377 1.5
378 log
379 @put things back, do .NA stuff another way
380 @
381 text
382 @d26 4
383 @
384
385
386 1.4
387 log
388 @typo
389 @
390 text
391 @d2 2
392 a3 2
393 .TH MH\-ALIAS 5 @@(MHCENTERFOOT) @@(MHLEFTFOOT)
394 .SH .NA
395 d5 1
396 a5 1
397 .SH .SY
398 @
399
400
401 1.3
402 log
403 @fixup for makewhatis
404 @
405 text
406 @d2 1
407 a2 1
408 .TH MH\-ALIAS 5 [mh.6] MH
409 @
410
411
412 1.2
413 log
414 @document Aliasfile: profile entry
415 @
416 text
417 @d2 2
418 a3 2
419 .SC MH\-ALIAS 5
420 .NA
421 d5 1
422 a5 1
423 .SY
424 @
425
426
427 1.1
428 log
429 @Initial revision
430 @
431 text
432 @d159 1
433 a159 1
434 and add three lines:
435 d163 4
436 a166 3
437 ali: \-alias aliases
438 send: \-alias aliases
439 whom: \-alias ailases
440 d177 1
441 a177 1
442 None
443 @