8 date 92.12.11.21.44.16; author jromine; state Exp;
13 date 92.05.12.22.23.34; author jromine; state Exp;
18 date 92.02.11.00.48.48; author jromine; state Exp;
23 date 92.01.30.19.05.13; author jromine; state Exp;
28 date 90.04.05.15.10.15; author sources; state Exp;
33 date 90.03.22.19.30.56; author sources; state Exp;
38 date 90.03.22.11.31.13; author sources; state Exp;
43 date 90.03.20.19.41.51; author sources; state Exp;
48 date 90.03.20.17.36.07; author sources; state Exp;
53 date 90.03.16.15.40.27; author sources; state Exp;
58 date 90.03.16.15.33.46; author sources; state Exp;
69 @note bug in blind list forward references
73 .\" @@(#)$Id: mh-alias.rf,v 1.10 1992/05/12 22:23:34 jromine Exp jromine $
76 mh-alias \- alias file for MH message system
80 This describes both \fIMH\fR personal alias files and
81 the (primary) alias file for mail delivery, the file
83 @@(MHETCPATH)/MailAliases
85 It does \fBnot\fR describe aliases files used by the message transport system.
86 Each line of the alias file has the format:
88 alias : address\-group
92 alias ; address\-group
105 address\-group := address\-list
109 | \*(lq=\*(rq UNIX\-group
111 | \*(lq+\*(rq UNIX\-group
116 address\-list := address
118 | address\-list, address
121 Continuation lines in alias files end with `\\' followed by the newline
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.
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.
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.
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.
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.
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.
154 In match, a trailing * on an alias will match just about anything appropriate.
157 An approximation of the way aliases are resolved at posting time is
158 (it's not really done this way):
161 1) Build a list of all addresses from the message to be
162 delivered, eliminating duplicate addresses.
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.
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.)
182 Since the alias file is read line by line, forward references
183 work, but backward references are not recognized, thus, there is
190 <@@(MHETCPATH)/BBoardAliases
191 sgroup: fred, fear, freida
192 b-people: Blind List: bill, betty;
194 UNIX\-committee: <unix.aliases
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.
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).
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.
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.
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,
231 without the knowledge of the message transport system.
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.
239 To use aliasing in \fIMH\fR quickly, do the following:
242 First, in your \fI\&.mh\(ruprofile\fR,
243 choose a name for your alias file, say \*(lqaliases\*(rq,
249 .\" ali: \-alias aliases
250 .\" send: \-alias aliases
251 .\" whom: \-alias ailases
255 Second, create the file \*(lqaliases\*(rq in your \fIMH\fR directory.
257 Third, start adding aliases to your \*(lqaliases\*(rq file as appropriate.
260 ^@@(MHETCPATH)/MailAliases~^Primary alias file
262 ^Aliasfile:~^For a default alias file
264 ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8)
270 In previous releases of \fIMH\fR,
271 only a single, system\-wide mh\-alias file was supported.
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
276 This means that at most sites,
277 the system\-wide mh\-alias file will be empty (or trivial at best).
280 This led to a number of problems,
281 since only mail\-system administrators were capable of (un)defining
285 This led to a number of problems,
286 since only mail\-system administrators were capable of (un)defining
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.
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
302 Forward references do not work correctly inside blind lists.
309 @fixup for nroff problems
314 .\" @@(#)$Id: mh-alias.rf,v 1.9 1992/02/11 00:48:48 jromine Exp jromine $
321 Although the forward\-referencing semantics of \fImh\-alias\fR files prevent
328 @Document Aliasfile may be more than one file
333 .\" @@(#)$Id: mh-alias.rf,v 1.8 1992/01/30 19:05:13 jromine Exp jromine $
337 mh\-alias \- alias file for MH message system
343 @document blind lists
348 .\" @@(#)$Id: mh-alias.rf,v 1.7 1990/04/05 15:10:15 sources Exp jromine $
351 choose a name for your primary alias file, say \*(lqaliases\*(rq,
370 @document comment lines
379 @put things back, do .NA stuff another way
393 .TH MH\-ALIAS 5 @@(MHCENTERFOOT) @@(MHLEFTFOOT)
403 @fixup for makewhatis
408 .TH MH\-ALIAS 5 [mh.6] MH
414 @document Aliasfile: profile entry
438 send: \-alias aliases
439 whom: \-alias ailases