1 .TH MH-ALIAS %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mh-alias \- alias file for nmh message system
14 personal alias files and
15 the global alias file for
17 mail delivery, the file
25 describe aliases files used by the message transport system.
26 Each line of the alias file has the format:
58 .IR address\-group " := " address\-list
60 .RI " | = " UNIX\-group
61 .RI " | + " UNIX\-group
64 .IR address\-list " := " address
65 .RI " | " address\-list ", " address
69 Continuation lines in alias files end with `\\' followed by the newline
70 character. This applies to comment lines. Thus, a line following a
71 comment line that ends with a `\\' will be treated as a continuation of
74 .RI \*(lq Alias\-file \*(rq
79 is a group name (or number) from
81 An address is a \*(lqsimple\*(rq
82 Internet\-style address. Througout this file, case is ignored, except
85 If the line starts with a `<', then the file named after the `<' is
86 read for more alias definitions. The reading is done recursively, so a
87 `<' may occur in the beginning of an alias file with the expected results.
91 starts with a `<', then the file named after the
92 `<' is read and its contents are added to the
98 starts with an `=', then the file
100 is consulted for the UNIX\-group named after the `='. Each login name
101 occurring as a member of the group is added to the
107 starts with a `+', then the file
109 is consulted to determine the group\-id of the
110 UNIX\-group named after the `+'. Each login name occurring in the
112 file whose group\-id is indicated by this group is
119 is simply `*', then the file
121 is consulted and all login names with a userid
122 greater than some magic number (usually 200) are added to the
126 In match, a trailing \*(lq*\*(rq on an alias will match just about anything
127 appropriate. (See example below.)
129 An approximation of the way aliases are resolved at posting time is
130 (it's not really done this way):
134 Build a list of all addresses from the message to be delivered,
135 eliminating duplicate addresses.
138 If this draft originated on the local host, then for those addresses in
139 the message that have no host specified, perform alias resolution.
142 For each line in the alias file, compare \*(lqalias\*(rq against all of
143 the existing addresses. If a match, remove the matched \*(lqalias\*(rq
144 from the address list, and add each new address in the address\-group to
145 the address list if it is not already on the list. The alias itself is
146 not usually output, rather the address\-group that the alias maps to is
147 output instead. If \*(lqalias\*(rq is terminated with a `;' instead of
148 a `:', then both the \*(lqalias\*(rq and the address are output in the
149 correct format (with the alias quoted if necessary and the address
152 This makes replies possible since
155 and personal aliases are unknown to the mail transport system.
158 Since the alias file is read line by line, forward references work, but
159 backward references are not recognized, thus, there is no recursion.
165 <%etcdir%/BBoardAliases
166 sgroup: fred, fear, freida
167 b-people: Blind List: bill, betty
169 UNIX\-committee: <unix.aliases
177 The first line says that more aliases should immediately be read from
179 .IR %etcdir%/BBoardAliases .
180 Following this, \*(lqfred\*(rq
181 is defined as an alias for \*(lqfrated@UCI\*(rq, and \*(lqsgroup\*(rq
182 is defined as an alias for the three names \*(lqfrated@UCI\*(rq,
183 \*(rqfear\*(rq, and \*(rqfreida\*(rq.
185 The alias \*(lqb-people\*(rq is a blind list which includes the addresses
186 \*(lqbill\*(rq and \*(lqbetty\*(rq; the message will be delivered to those
187 addresses, but the message header will show only \*(lqBlind List: ;\*(rq
188 (not the addresses). The alias must not be terminated with, or contain,
191 below. Note that blind lists are not supported with the
193 mail transport method.
195 Next, the definition of \*(lqUNIX\-committee\*(rq is given by
201 \*(lqstaff\*(rq is defined as all users who are listed as members of the
202 group \*(lqstaff\*(rq in the
204 file, and \*(lqwheels\*(rq
205 is defined as all users whose group\-id in
207 is equivalent to the \*(lqwheel\*(rq group.
209 Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id
212 greater than 200, and all aliases of the form
213 \*(lqnews.<anything>\*(rq are defined to be \*(lqnews\*(rq.
215 The key thing to understand about aliasing in
219 alias files are expanded into the headers of messages posted.
220 This aliasing occurs first, at posting time, without the knowledge of the
221 message transport system. In contrast, once the message transport system
222 is given a message to deliver to a list of addresses, for each address
223 that appears to be local, a system\-wide alias file is consulted. These
226 expanded into the headers of messages delivered.
230 quickly, do the following:
235 .IR \&.mh\(ruprofile ,
236 choose a name for your alias file, say
237 .RI \*(lq aliases \*(rq,
243 .\" ali: \-alias aliases
244 .\" send: \-alias aliases
245 .\" whom: \-alias aliases
251 .RI \*(lq aliases \*(rq
257 Start adding aliases to your
258 .RI \*(lq aliases \*(rq
262 Earlier versions of this man page showed a semicolon at the end of the
263 blind list example. That caused the preceeding alias to not be
264 expanded. There must not be a semicolon at the end of, or within, the
265 address group of a blind list.
267 will append the semicolon to the blind list name.
271 .ta \w'%etcdir%/ExtraBigFileName 'u
272 ^%etcdir%/MailAliases~^global nmh alias file
274 .SH "PROFILE COMPONENTS"
278 .ta \w'ExtraBigProfileName 'u
279 ^Aliasfile:~^For a default alias file
292 Although the forward-referencing semantics of
294 files prevent recursion, the
295 .RI \*(lq< " alias\-file" \*(rq
296 command may defeat this.
297 Since the number of file descriptors is finite (and very limited), such
298 infinite recursion will terminate with a meaningless diagnostic when
299 all the fds are used up.