4 .TH MH-ALIAS %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mh-alias \- alias file for mh message system
13 describe aliases files used by the message transport system.
15 Each line of the alias file has the format:
43 .IR address\-group " := " address\-list
45 .RI " | = " UNIX\-group
46 .RI " | + " UNIX\-group
49 .IR address\-list " := " address
50 .RI " | " address\-list ", " address
54 Continuation lines in alias files end with `\\' followed by the newline
62 is a group name (or number) from
64 An address is a `simple'
65 Internet\-style address. Throughout this file, case is ignored, except
68 If the line starts with a `<', then the file named after the `<' is
69 read for more alias definitions. The reading is done recursively, so a
70 `<' may occur in the beginning of an alias file with the expected results.
74 starts with a `<', then the file named after the
75 `<' is read and its contents are added to the
81 starts with an `=', then the file
83 is consulted for the UNIX\-group named after the `='. Each login name
84 occurring as a member of the group is added to the
90 starts with a `+', then the file
92 is consulted to determine the group\-id of the
93 UNIX\-group named after the `+'. Each login name occurring in the
95 file whose group\-id is indicated by this group is
98 for the alias. I.e. only those users that have this group as their
99 initial login group are added.
101 In match, a trailing `*' on an alias will match just about anything
102 appropriate. (See example below.)
104 An approximation of the way aliases are resolved at posting time is
105 (it's not really done this way):
109 Build a list of all addresses from the message to be delivered,
110 eliminating duplicate addresses.
113 If this draft originated on the local host, then for those addresses in
114 the message that have no host specified, perform alias resolution.
117 For each line in the alias file, compare `alias' against all of
118 the existing addresses. If a match, remove the matched `alias'
119 from the address list, and add each new address in the address\-group to
120 the address list if it is not already on the list. The alias itself is
121 not usually output, rather the address\-group that the alias maps to is
122 output instead. If `alias' is terminated with a `;' instead of
123 a `:', then both the `alias' and the address are output in the
124 correct format. (This makes replies possible since personal
126 aliases are unknown to the mail transport system.)
129 Since the alias file is read line by line, forward references work, but
130 backward references are not recognized, thus, there is no recursion.
136 <%etcdir%/MoreAliases
137 sgroup: fred, fear, freida
138 b-people: Blind List: bill, betty
140 UNIX\-committee: <unix.aliases
147 The first line says that more aliases should immediately be read from
149 .IR %etcdir%/MoreAliases .
150 Following this, `fred'
151 is defined as an alias for `frated@UCI', and `sgroup'
152 is defined as an alias for the three names `frated@UCI',
153 `fear', and `freida'.
155 The alias `b-people' is a blind list which includes the addresses
156 `bill' and `betty'; the message will be delieved to those
157 addresses, but the message header will show only `Blind List: ;'
160 Next, the definition of `UNIX\-committee' is given by
166 `staff' is defined as all users who are listed as members of the
170 is defined as all users whose group\-id in
172 is equivalent to the `wheel' group.
174 Finally, all aliases of the form
175 `news.<anything>' are defined to be `news'.
177 The key thing to understand about aliasing in
181 alias files are expanded into the headers of messages posted.
182 This aliasing occurs first, at posting time, without the knowledge of the
183 message transport system. In contrast, once the message transport system
184 is given a message to deliver to a list of addresses, for each address
185 that appears to be local, a system\-wide alias file is consulted. These
188 expanded into the headers of messages delivered.
193 quickly, do the following:
199 choose a name for your alias file, say
217 Start adding aliases to your
222 Earlier versions of this man page showed a semicolon at the end of the
223 blind list example. That caused the preceding alias to not be
224 expanded. There must not be a semicolon at the end of, or within, the
225 address group of a blind list.
227 will append the semicolon to the blind list name.
232 .SH "PROFILE COMPONENTS"
236 .ta \w'ExtraBigProfileName 'u
237 ^Aliasfile:~^For a default alias file
241 ali(1), send(1), group(5), passwd(5), post(8)
247 An address group named `*', meaning everyone on the system, had been
248 supported in nmh. It is not anymore in mmh.
251 Although the forward-referencing semantics of
253 files prevent recursion, the
254 .RI `< " alias\-file" '
255 command may defeat this.
256 Since the number of file descriptors is finite (and very limited), such
257 infinite recursion will terminate with a meaningless diagnostic when
258 all the fds are used up.