4 .TH MH-ALIAS %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mh-alias \- alias file for nmh message system
17 describe aliases files used by the message transport system.
18 Each line of the alias file has the format:
46 .IR address\-group " := " address\-list
48 .RI " | = " UNIX\-group
49 .RI " | + " UNIX\-group
52 .IR address\-list " := " address
53 .RI " | " address\-list ", " address
57 Continuation lines in alias files end with `\\' followed by the newline
60 .RI \*(lq Alias\-file \*(rq
65 is a group name (or number) from
67 An address is a \*(lqsimple\*(rq
68 Internet\-style address. Througout this file, case is ignored, except
71 If the line starts with a `<', then the file named after the `<' is
72 read for more alias definitions. The reading is done recursively, so a
73 `<' may occur in the beginning of an alias file with the expected results.
77 starts with a `<', then the file named after the
78 `<' is read and its contents are added to the
84 starts with an `=', then the file
86 is consulted for the UNIX\-group named after the `='. Each login name
87 occurring as a member of the group is added to the
93 starts with a `+', then the file
95 is consulted to determine the group\-id of the
96 UNIX\-group named after the `+'. Each login name occurring in the
98 file whose group\-id is indicated by this group is
103 In match, a trailing \*(lq*\*(rq on an alias will match just about anything
104 appropriate. (See example below.)
106 An approximation of the way aliases are resolved at posting time is
107 (it's not really done this way):
111 Build a list of all addresses from the message to be delivered,
112 eliminating duplicate addresses.
115 If this draft originated on the local host, then for those addresses in
116 the message that have no host specified, perform alias resolution.
119 For each line in the alias file, compare \*(lqalias\*(rq against all of
120 the existing addresses. If a match, remove the matched \*(lqalias\*(rq
121 from the address list, and add each new address in the address\-group to
122 the address list if it is not already on the list. The alias itself is
123 not usually output, rather the address\-group that the alias maps to is
124 output instead. If \*(lqalias\*(rq is terminated with a `;' instead of
125 a `:', then both the \*(lqalias\*(rq and the address are output in the
126 correct format. (This makes replies possible since personal
128 aliases are unknown to the mail transport system.)
131 Since the alias file is read line by line, forward references work, but
132 backward references are not recognized, thus, there is no recursion.
138 <%etcdir%/MoreAliases
139 sgroup: fred, fear, freida
140 b-people: Blind List: bill, betty;
142 UNIX\-committee: <unix.aliases
149 The first line says that more aliases should immediately be read from
151 .IR %etcdir%/MoreAliases .
152 Following this, \*(lqfred\*(rq
153 is defined as an alias for \*(lqfrated@UCI\*(rq, and \*(lqsgroup\*(rq
154 is defined as an alias for the three names \*(lqfrated@UCI\*(rq,
155 \*(rqfear\*(rq, and \*(rqfreida\*(rq.
157 The alias \*(lqb-people\*(rq is a blind list which includes the addresses
158 \*(lqbill\*(rq and \*(lqbetty\*(rq; the message will be delieved to those
159 addresses, but the message header will show only \*(lqBlind List: ;\*(rq
162 Next, the definition of \*(lqUNIX\-committee\*(rq is given by
168 \*(lqstaff\*(rq is defined as all users who are listed as members of the
169 group \*(lqstaff\*(rq in the
171 file, and \*(lqwheels\*(rq
172 is defined as all users whose group\-id in
174 is equivalent to the \*(lqwheel\*(rq group.
176 Finally, all aliases of the form
177 \*(lqnews.<anything>\*(rq are defined to be \*(lqnews\*(rq.
179 The key thing to understand about aliasing in
183 alias files are expanded into the headers of messages posted.
184 This aliasing occurs first, at posting time, without the knowledge of the
185 message transport system. In contrast, once the message transport system
186 is given a message to deliver to a list of addresses, for each address
187 that appears to be local, a system\-wide alias file is consulted. These
190 expanded into the headers of messages delivered.
195 quickly, do the following:
201 choose a name for your alias file, say
202 .RI \*(lq aliases \*(rq,
208 .\" ali: \-alias aliases
209 .\" send: \-alias aliases
215 .RI \*(lq aliases \*(rq
221 Start adding aliases to your
222 .RI \*(lq aliases \*(rq
229 .SH "PROFILE COMPONENTS"
233 .ta \w'ExtraBigProfileName 'u
234 ^Aliasfile:~^For a default alias file
238 ali(1), send(1), group(5), passwd(5), post(8)
244 An address group named `*', meaning everyone on the system, had been
245 supported in nmh. It is not anymore in mmh.
248 Although the forward-referencing semantics of
250 files prevent recursion, the
251 .RI \*(lq< " alias\-file" \*(rq
252 command may defeat this.
253 Since the number of file descriptors is finite (and very limited), such
254 infinite recursion will terminate with a meaningless diagnostic when
255 all the fds are used up.
257 Forward references do not work correctly inside blind lists.