Commit | Line | Data |
---|---|---|
8d5530c4 MW |
1 | .TH newaliases 1 |
2 | .SH NAME | |
3 | newaliases \- create a forwarding database from /etc/aliases | |
4 | .SH SYNOPSIS | |
5 | .B newaliases | |
6 | .SH DESCRIPTION | |
7 | .B newaliases | |
8 | reads a table of | |
9 | sendmail-style | |
10 | forwarding instructions from | |
11 | .B /etc/aliases | |
12 | and converts them into a forwarding database in | |
13 | .BR /etc/aliases.cdb . | |
14 | The forwarding database can be used by | |
15 | .BR fastforward . | |
16 | ||
17 | For safety, | |
18 | .B newaliases | |
19 | writes the forwarding database to | |
20 | .B /etc/aliases.tmp | |
21 | and then moves | |
22 | .B /etc/aliases.tmp | |
23 | to | |
24 | .BR /etc/aliases.cdb . | |
25 | If there is a problem creating | |
26 | .BR /etc/aliases.tmp , | |
27 | .B newaliases | |
28 | complains and leaves | |
29 | .B /etc/aliases.cdb | |
30 | alone. | |
31 | Deliveries can continue using | |
32 | .B /etc/aliases.cdb | |
33 | in the meantime. | |
34 | ||
35 | .B newaliases | |
36 | always creates | |
37 | .B /etc/aliases.cdb | |
38 | world-readable. | |
39 | ||
40 | .B newaliases | |
41 | makes no attempt to protect against | |
42 | simultaneous updates of | |
43 | .BR /etc/aliases.cdb . | |
44 | .SH "INSTRUCTION FORMAT" | |
45 | .B newaliases | |
46 | imitates | |
47 | sendmail's | |
48 | handling of | |
49 | .BR /etc/aliases . | |
50 | For example, | |
51 | ||
52 | .EX | |
53 | root: alice, bill | |
54 | .EE | |
55 | ||
56 | says that mail for | |
57 | .B root | |
58 | should be forwarded to | |
59 | .B alice | |
60 | and | |
61 | .BR bill . | |
62 | ||
63 | .B COMPATIBILITY WARNING: | |
64 | .B newaliases | |
65 | does not support file deliveries. | |
66 | You can use the file delivery mechanism described in | |
67 | .B dot-qmail(5) | |
68 | instead. | |
69 | .SH "SIMPLE ALIASES" | |
70 | The simplest type of forwarding instruction | |
71 | is a line of the form | |
72 | ||
73 | .EX | |
74 | alias: recip | |
75 | .EE | |
76 | ||
77 | Any message sent to | |
78 | .I alias | |
79 | will be forwarded to the recipient address | |
80 | .IR recip . | |
81 | Addresses are compared to | |
82 | .I alias | |
83 | without regard to case. | |
84 | ||
85 | Forwarding instructions are cumulative. | |
86 | If | |
87 | .I recip | |
88 | is itself an alias, | |
89 | messages to | |
90 | .I alias | |
91 | will be forwarded the same way as | |
92 | messages to | |
93 | .IR recip . | |
94 | For example, with the following instructions, | |
95 | messages to | |
96 | .B postmaster@heaven.af.mil | |
97 | or | |
98 | .B root@heaven.af.mil | |
99 | will be delivered to Bob: | |
100 | ||
101 | .EX | |
102 | postmaster@heaven.af.mil: bob@heaven.af.mil | |
103 | .EE | |
104 | .br | |
105 | .EX | |
106 | root@heaven.af.mil: postmaster@heaven.af.mil | |
107 | .EE | |
108 | ||
109 | .B COMPATIBILITY WARNING: | |
110 | With | |
111 | sendmail, | |
112 | entries in | |
113 | .B /etc/aliases | |
114 | can override usernames. | |
115 | With | |
116 | .BR qmail , | |
117 | if you install | |
118 | .B fastforward | |
119 | in | |
120 | .BR ~alias/.qmail-default , | |
121 | it will not see addresses that are controlled by other users. | |
122 | See | |
123 | .BR qmail-getpw (8). | |
124 | To change this, see | |
125 | .BR qmail-users (5). | |
126 | ||
127 | .B COMPATIBILITY WARNING: | |
128 | Various versions of | |
129 | sendmail | |
130 | do various strange things with circular alias definitions. | |
131 | See | |
132 | .BR setforward (1) | |
133 | for details on | |
134 | .BR fastforward 's | |
135 | behavior. | |
136 | ||
137 | .B COMPATIBILITY WARNING: | |
138 | If there are several forwarding instructions for a single | |
139 | .IR alias , | |
140 | sendmail | |
141 | will complain; | |
142 | .B fastforward | |
143 | will silently use the first instruction. | |
144 | .SH "WILDCARDS" | |
145 | .I alias | |
146 | can have the form | |
147 | .I user@host.dom | |
148 | for one user at one host, | |
149 | .I @host.dom | |
150 | for all users at one host, or | |
151 | .I user | |
152 | for one user at all hosts. | |
153 | ||
154 | .B COMPATIBILITY WARNING: | |
155 | sendmail | |
156 | supports only | |
157 | .IR user ; | |
158 | it does not support per-host aliases. | |
159 | It accepts | |
160 | .I user@host.dom | |
161 | if | |
162 | .I host.dom | |
163 | is a local host, | |
164 | but it then treats it the same way as | |
165 | .IR user , | |
166 | applying to all local hosts and virtual domains. | |
167 | .SH "ADDRESS FORMATS" | |
168 | Addresses in | |
169 | .B /etc/aliases | |
170 | are parsed the same way as addresses in RFC 822 message headers. | |
171 | Parenthesized comments and bracketed addresses are permitted: | |
172 | ||
173 | .EX | |
174 | root: bob (Bob, the postmaster) | |
175 | joe: Joe Shmoe <shmoe@heaven.af.mil> | |
176 | .EE | |
177 | ||
178 | Addresses with special characters must be quoted: | |
179 | ||
180 | .EX | |
181 | fred: "spaced out mailbox"@heaven.af.mil | |
182 | .EE | |
183 | ||
184 | Address groups are not permitted, | |
185 | since colons have a different use in | |
186 | .BR /etc/aliases . | |
187 | ||
188 | Any recipient address without a fully qualified domain name is | |
189 | fed through the | |
190 | .BR defaulthost , | |
191 | .BR defaultdomain , | |
192 | and | |
193 | .B plusdomain | |
194 | mechanisms described in | |
195 | .BR qmail-header (5). | |
196 | ||
197 | .B COMPATIBILITY WARNING: | |
198 | sendmail's | |
199 | handling of quotes and backslashes violates RFC 821 and RFC 822, | |
200 | and is not supported by | |
201 | .BR newaliases . | |
202 | The | |
203 | .B qmail-local | |
204 | delivery mechanism | |
205 | lets each user manage several addresses, | |
206 | so there is no need for a special syntax to get around forwarding. | |
207 | .SH "MULTIPLE RECIPIENTS" | |
208 | An instruction may list more than one recipient address: | |
209 | ||
210 | .EX | |
211 | alias: recip1, recip2, recip3 | |
212 | .EE | |
213 | ||
214 | Any message sent to | |
215 | .I alias | |
216 | will be forwarded to all of the addresses. | |
217 | ||
218 | A forwarding instruction may be split across several lines. | |
219 | Each line past the first must either (1) begin with space or tab | |
220 | or (2) be empty: | |
221 | ||
222 | .EX | |
223 | hostmaster: | |
224 | .EE | |
225 | .br | |
226 | .EX | |
227 | fred, | |
228 | .EE | |
229 | .br | |
230 | .EX | |
231 | joe | |
232 | .EE | |
233 | ||
234 | .B COMPATIBILITY WARNING: | |
235 | sendmail | |
236 | requires the colon to be on the first line | |
237 | of a multi-line forwarding instruction. | |
238 | .B newaliases | |
239 | doesn't care whether the colon is present at all. | |
240 | ||
241 | .B COMPATIBILITY WARNING: | |
242 | sendmail | |
243 | does not permit blank lines in the middle of continuations. | |
244 | This has the undesirable effect that a blank line behaves differently | |
245 | from a line containing a single space. | |
246 | .SH "COMMENTS" | |
247 | Any line in | |
248 | .B /etc/aliases | |
249 | that begins with # is ignored: | |
250 | ||
251 | .EX | |
252 | # this is a comment | |
253 | .EE | |
254 | ||
255 | A comment may be split across several lines. | |
256 | Each line past the first must either (1) begin with space or tab | |
257 | or (2) be empty. | |
258 | ||
259 | .B COMPATIBILITY WARNING: | |
260 | sendmail | |
261 | does not permit continuations of comment lines. | |
262 | .SH "PROGRAMS" | |
263 | If a recipient address does not contain a domain name, | |
264 | and begins with a vertical bar, | |
265 | .B newaliases | |
266 | takes the rest of the address as a program to run: | |
267 | ||
268 | .EX | |
269 | weather: "|weather-server" | |
270 | .EE | |
271 | ||
272 | .B fastforward | |
273 | will run | |
274 | .B weather-server | |
275 | when a message arrives for | |
276 | .BR weather . | |
277 | ||
278 | .B COMPATIBILITY WARNING: | |
279 | Internet addresses can legitimately start with | |
280 | a slash or vertical bar. | |
281 | .B newaliases | |
282 | treats anything with an unquoted @ as an address. | |
283 | sendmail appears to have various problems | |
284 | coping with these addresses, | |
285 | and with commands that contain @ signs. | |
286 | ||
287 | .B COMPATIBILITY WARNING: | |
288 | .B newaliases | |
289 | does not allow a vertical bar before double quotes. | |
290 | .SH "INCLUDE FILES" | |
291 | A recipient address of the form | |
292 | .B :include:\fIfile | |
293 | means ``every address listed in | |
294 | .IR file .'' | |
295 | (Actually | |
296 | .B fastforward | |
297 | reads | |
298 | .IR file\fB.bin ; | |
299 | see | |
300 | .BR newinclude (1) | |
301 | for further details.) | |
302 | ||
303 | Note that | |
304 | .I file | |
305 | is read by | |
306 | .BR fastforward , | |
307 | not | |
308 | .BR newaliases , | |
309 | so the system administrator does not have to run | |
310 | .B newaliases | |
311 | every time | |
312 | .I file | |
313 | changes. | |
314 | .I file | |
315 | must be world-readable | |
316 | and accessible to | |
317 | .BR fastforward . | |
318 | ||
319 | .B COMPATIBILITY WARNING: | |
320 | If an | |
321 | .B :include: | |
322 | file is unreadable or nonexistent, | |
323 | sendmail | |
324 | skips it; | |
325 | .B fastforward | |
326 | defers delivery of the message. | |
327 | ||
328 | .B COMPATIBILITY WARNING: | |
329 | sendmail | |
330 | does not permit spaces inside the literal text | |
331 | .BR :include: . | |
332 | .B newaliases | |
333 | does. | |
334 | ||
335 | .B COMPATIBILITY WARNING: | |
336 | Versions of | |
337 | sendmail | |
338 | before V8 did not strip quotes from | |
339 | .B :include: | |
340 | filenames. | |
341 | .SH "ALIAS OWNERS" | |
342 | If there is an alias for | |
343 | .BR owner-\fIlist , | |
344 | any message forwarded through | |
345 | .I list | |
346 | will have its envelope sender set to | |
347 | .BR owner-\fIlist , | |
348 | so that bounces go back to | |
349 | .BR owner-\fIlist . | |
350 | ||
351 | .B COMPATIBILITY WARNING: | |
352 | When an alias includes the same recipient both inside and outside | |
353 | a mailing list, | |
354 | .B fastforward | |
355 | sends the message twice, | |
356 | once with each envelope sender. | |
357 | sendmail | |
358 | sends the message only once; | |
359 | its choice of envelope sender for that recipient | |
360 | depends on the phase of the moon. | |
361 | .SH "SEE ALSO" | |
362 | fastforward(1), | |
363 | setforward(1), | |
364 | newinclude(1), | |
365 | printforward(1), | |
366 | dot-qmail(5) |