1 .\" This file is automatically generated. Do not edit!
2 .\" @(#)$Id: mh-alias.rf,v 1.11 1992/12/11 21:44:16 jromine Exp $
5 mh-alias \- alias file for MH message system
9 This describes both \fIMH\fR personal alias files and
10 the (primary) alias file for mail delivery, the file
12 /opt/mh-6.8.5/lib/MailAliases
14 It does \fBnot\fR describe aliases files used by the message transport system.
15 Each line of the alias file has the format:
17 alias : address\-group
21 alias ; address\-group
34 address\-group := address\-list
38 | \*(lq=\*(rq UNIX\-group
40 | \*(lq+\*(rq UNIX\-group
45 address\-list := address
47 | address\-list, address
50 Continuation lines in alias files end with `\\' followed by the newline
53 Alias\-file and file are UNIX file names.
54 UNIX\-group is a group name (or number) from \fI/etc/group\fR.
55 An address is a \*(lqsimple\*(rq Internet\-style address.
56 Througout this file, case is ignored, except for alias\-file names.
58 If the line starts with a `<', then the file named after the `<' is
59 read for more alias definitions. The reading is done recursively, so a `<'
60 may occur in the beginning of an alias file with the expected results.
62 If the address\-group starts with a `<',
63 then the file named after the `<' is read and its contents are added to
64 the address\-list for the alias.
66 If the address\-group starts with an `=',
67 then the file \fI/etc/group\fR is consulted
68 for the UNIX\-group named after the `='.
69 Each login name occurring as a member of the group is added to the
70 address\-list for the alias.
72 In contrast, if the address\-group starts with a `+',
73 then the file \fI/etc/group\fR is consulted
74 to determine the group\-id of the UNIX\-group named after the `+'.
75 Each login name occurring in the \fI/etc/passwd\fR file whose group\-id
76 is indicated by this group is added to the address\-list for the alias.
78 If the address\-group is simply `*',
79 then the file \fI/etc/passwd\fR is consulted
80 and all login names with a userid greater than some magic number
81 (usually 200) are added to the address\-list for the alias.
83 In match, a trailing * on an alias will match just about anything appropriate.
86 An approximation of the way aliases are resolved at posting time is
87 (it's not really done this way):
90 1) Build a list of all addresses from the message to be
91 delivered, eliminating duplicate addresses.
93 2) If this draft originated on the local host,
94 then for those addresses in the message that have no host specified,
95 perform alias resolution.
97 3) For each line in the alias file,
98 compare \*(lqalias\*(rq against all of the existing addresses.
99 If a match, remove the matched \*(lqalias\*(rq from the address list,
100 and add each new address in the address\-group to the address list
101 if it is not already on the list.
102 The alias itself is not usually output,
103 rather the address\-group that the alias maps to is output instead.
104 If \*(lqalias\*(rq is terminated with a `;' instead of a `:',
105 then both the \*(lqalias\*(rq and the address are output
106 in the correct format.
107 (This makes replies possible since \fIMH\fR aliases and
108 personal aliases are unknown to the mail transport system.)
111 Since the alias file is read line by line, forward references
112 work, but backward references are not recognized, thus, there is
119 </opt/mh-6.8.5/lib/BBoardAliases
120 sgroup: fred, fear, freida
121 b-people: Blind List: bill, betty;
123 UNIX\-committee: <unix.aliases
131 The first line says that more aliases should immediately be read from
132 the file \fI/opt/mh-6.8.5/lib/BBoardAliases\fR.
133 Following this, \*(lqfred\*(rq is defined as an alias for
134 \*(lqfrated@UCI\*(rq,
135 and \*(lqsgroup\*(rq is defined as an alias for
136 the three names \*(lqfrated@UCI\*(rq, \*(rqfear\*(rq, and \*(rqfreida\*(rq.
138 The alias \*(lqb-people\*(rq is a blind list which includes the
139 addresses \*(lqbill\*(rq and \*(lqbetty\*(rq; the message
140 will be delieved to those addresses, but the
141 message header will show only \*(lqBlind List: ;\*(rq (not the addresses).
143 Next, the definition of \*(lqUNIX\-committee\*(rq is given by reading
144 the file \fIunix.aliases\fR in the users \fIMH\fR directory,
145 \*(lqstaff\*(rq is defined as all users who are listed as members of
146 the group \*(lqstaff\*(rq in the \fI/etc/group\fR file,
147 and \*(lqwheels\*(rq is defined as all users whose group\-id in
148 \fI/etc/passwd\fR is equivalent to the \*(lqwheel\*(rq group.
150 Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id in
151 \fI/etc/passwd\fR greater than 200,
152 and all aliases of the form \*(lqnews.<anything>\*(rq are defined
153 to be \*(lqnews\*(rq.
155 The key thing to understand about aliasing in \fIMH\fR
156 is that aliases in \fIMH\fR alias files are expanded into the
157 headers of messages posted.
158 This aliasing occurs first,
160 without the knowledge of the message transport system.
162 once the message transport system is given a message to deliver
163 to a list of addresses,
164 for each address that appears to be local,
165 a system\-wide alias file is consulted.
166 These aliases are \fBNOT\fR expanded into the headers of messages delivered.
168 To use aliasing in \fIMH\fR quickly, do the following:
171 First, in your \fI\&.mh\(ruprofile\fR,
172 choose a name for your alias file, say \*(lqaliases\*(rq,
178 .\" ali: \-alias aliases
179 .\" send: \-alias aliases
180 .\" whom: \-alias ailases
184 Second, create the file \*(lqaliases\*(rq in your \fIMH\fR directory.
186 Third, start adding aliases to your \*(lqaliases\*(rq file as appropriate.
189 ^/opt/mh-6.8.5/lib/MailAliases~^Primary alias file
191 ^Aliasfile:~^For a default alias file
193 ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8)
199 In previous releases of \fIMH\fR,
200 only a single, system\-wide mh\-alias file was supported.
201 This led to a number of problems,
202 since only mail\-system administrators were capable of (un)defining
205 the semantics of mh\-alias were extended to support personal alias files.
206 Users of \fIMH\fR no longer need to bother mail\-system administrators for
207 keeping information in the system\-wide alias file,
208 as each \fIMH\fR user can create/modify/remove aliases at will from any
209 number of personal files.
211 Although the forward-referencing semantics of \fImh\-alias\fR files prevent
212 recursion, the \*(lq<\ alias\-file\*(rq command may defeat this. Since the
213 number of file descriptors is finite (and very limited), such infinite
214 recursion will terminate with a meaningless diagnostic when all the fds are
217 Forward references do not work correctly inside blind lists.