5 .TH MH-ALIAS %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
7 mh-alias \- alias file for nmh message system
15 personal alias files and
16 the global alias file for
18 mail delivery, the file
26 describe aliases files used by the message transport system.
27 Each line of the alias file has the format:
55 .IR address\-group " := " address\-list
57 .RI " | = " UNIX\-group
58 .RI " | + " UNIX\-group
61 .IR address\-list " := " address
62 .RI " | " address\-list ", " address
66 Continuation lines in alias files end with `\\' followed by the newline
69 .RI \*(lq Alias\-file \*(rq
74 is a group name (or number) from
76 An address is a \*(lqsimple\*(rq
77 Internet\-style address. Througout this file, case is ignored, except
80 If the line starts with a `<', then the file named after the `<' is
81 read for more alias definitions. The reading is done recursively, so a
82 `<' may occur in the beginning of an alias file with the expected results.
86 starts with a `<', then the file named after the
87 `<' is read and its contents are added to the
93 starts with an `=', then the file
95 is consulted for the UNIX\-group named after the `='. Each login name
96 occurring as a member of the group is added to the
102 starts with a `+', then the file
104 is consulted to determine the group\-id of the
105 UNIX\-group named after the `+'. Each login name occurring in the
107 file whose group\-id is indicated by this group is
114 is simply `*', then the file
116 is consulted and all login names with a userid
117 greater than some magic number (usually 200) are added to the
121 In match, a trailing \*(lq*\*(rq on an alias will match just about anything
122 appropriate. (See example below.)
124 An approximation of the way aliases are resolved at posting time is
125 (it's not really done this way):
129 Build a list of all addresses from the message to be delivered,
130 eliminating duplicate addresses.
133 If this draft originated on the local host, then for those addresses in
134 the message that have no host specified, perform alias resolution.
137 For each line in the alias file, compare \*(lqalias\*(rq against all of
138 the existing addresses. If a match, remove the matched \*(lqalias\*(rq
139 from the address list, and add each new address in the address\-group to
140 the address list if it is not already on the list. The alias itself is
141 not usually output, rather the address\-group that the alias maps to is
142 output instead. If \*(lqalias\*(rq is terminated with a `;' instead of
143 a `:', then both the \*(lqalias\*(rq and the address are output in the
144 correct format. (This makes replies possible since
147 and personal aliases are unknown to the mail transport system.)
150 Since the alias file is read line by line, forward references work, but
151 backward references are not recognized, thus, there is no recursion.
157 <%etcdir%/BBoardAliases
158 sgroup: fred, fear, freida
159 b-people: Blind List: bill, betty;
161 UNIX\-committee: <unix.aliases
169 The first line says that more aliases should immediately be read from
171 .IR %etcdir%/BBoardAliases .
172 Following this, \*(lqfred\*(rq
173 is defined as an alias for \*(lqfrated@UCI\*(rq, and \*(lqsgroup\*(rq
174 is defined as an alias for the three names \*(lqfrated@UCI\*(rq,
175 \*(rqfear\*(rq, and \*(rqfreida\*(rq.
177 The alias \*(lqb-people\*(rq is a blind list which includes the addresses
178 \*(lqbill\*(rq and \*(lqbetty\*(rq; the message will be delieved to those
179 addresses, but the message header will show only \*(lqBlind List: ;\*(rq
182 Next, the definition of \*(lqUNIX\-committee\*(rq is given by
188 \*(lqstaff\*(rq is defined as all users who are listed as members of the
189 group \*(lqstaff\*(rq in the
191 file, and \*(lqwheels\*(rq
192 is defined as all users whose group\-id in
194 is equivalent to the \*(lqwheel\*(rq group.
196 Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id
199 greater than 200, and all aliases of the form
200 \*(lqnews.<anything>\*(rq are defined to be \*(lqnews\*(rq.
202 The key thing to understand about aliasing in
206 lias files are expanded into the headers of messages posted.
207 This aliasing occurs first, at posting time, without the knowledge of the
208 message transport system. In contrast, once the message transport system
209 is given a message to deliver to a list of addresses, for each address
210 that appears to be local, a system\-wide alias file is consulted. These
213 expanded into the headers of messages delivered.
218 quickly, do the following:
223 .IR \&.mh\(ruprofile ,
224 choose a name for your alias file, say
225 .RI \*(lq aliases \*(rq,
231 .\" ali: \-alias aliases
232 .\" send: \-alias aliases
233 .\" whom: \-alias aliases
239 .RI \*(lq aliases \*(rq
245 Start adding aliases to your
246 .RI \*(lq aliases \*(rq
253 .ta \w'%etcdir%/ExtraBigFileName 'u
254 ^%etcdir%/MailAliases~^global nmh alias file
257 .SH "PROFILE COMPONENTS"
261 .ta \w'ExtraBigProfileName 'u
262 ^Aliasfile:~^For a default alias file
266 ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8)
272 Although the forward-referencing semantics of
274 files prevent recursion, the
275 .RI \*(lq< " alias\-file" \*(rq
276 command may defeat this.
277 Since the number of file descriptors is finite (and very limited), such
278 infinite recursion will terminate with a meaningless diagnostic when
279 all the fds are used up.
281 Forward references do not work correctly inside blind lists.