1aliases(4)                       File Formats                       aliases(4)
2
3
4

NAME

6       aliases, addresses, forward - addresses and aliases for sendmail
7

SYNOPSIS

9       /etc/mail/aliases
10
11
12       /etc/mail/aliases.db
13
14
15       /etc/mail/aliases.dir
16
17
18       /etc/mail/aliases.pag
19
20
21       ~/.forward
22
23

DESCRIPTION

25       These  files  contain  mail  addresses  or aliases, recognized by send‐
26       mail(1M) for the local host:
27
28       /etc/passwd
29
30           Mail addresses (usernames) of local users.
31
32
33       /etc/mail/aliases
34
35           Aliases for the local host, in ASCII format.  Root  can  edit  this
36           file to add, update, or delete local mail aliases.
37
38
39       /etc/mail/aliases.{dir , pag}
40
41           The aliasing information from /etc/mail/aliases, in binary ndbm(3C)
42           format for use by sendmail(1M). The  program  newaliases(1M)  main‐
43           tains these files.
44
45
46       /etc/mail/aliases.db
47
48            The aliasing information from /etc/mail/aliases, in binary, Berke‐
49           ley DataBase format for use by sendmail(1M). The program  maintains
50           these files.
51
52           Depending   on   the  configuration  of  the  AliasFile  option  in
53           /etc/mail/sendmail.cf, either the single  file  aliases.db  or  the
54           pair of files aliases.{dir, pag} is generated by newaliases(1M). As
55           shipped with Solaris, sendmail(1M) supports both formats.  If  nei‐
56           ther is specified, the Berkeley DataBase format which generates the
57           single .db file is used.
58
59
60       ~/.forward
61
62           Addresses to which a user's mail is forwarded (see  Automatic  For‐
63           warding).
64
65
66
67       In  addition,  the  NIS name services aliases map mail.aliases, and the
68       NIS+ mail_aliases table, both contain addresses and  aliases  available
69       for use across the network.
70
71   Addresses
72       As distributed, sendmail(1M) supports the following types of addresses:
73
74   Local Usernames
75         username
76
77
78
79       Each local username is listed in the local host's /etc/passwd file.
80
81   Local Filenames
82         pathname
83
84
85
86       Messages  addressed  to the absolute pathname of a file are appended to
87       that file.
88
89   Commands
90         |command
91
92
93
94       If the first character of the address is  a  vertical  bar  (|),  send‐
95       mail(1M) pipes the message to the standard input of the command the bar
96       precedes.
97
98   Internet-standard Addresses
99         username@domain
100
101
102
103       If domain does not contain any `.' (dots), then it  is  interpreted  as
104       the  name  of  a  host in the current domain. Otherwise, the message is
105       passed to a mailhost that  determines  how  to  get  to  the  specified
106       domain. Domains are divided into subdomains separated by dots, with the
107       top-level domain on the right.
108
109
110       For example, the full address of John Smith could be:
111
112         js@jsmachine.Podunk-U.EDU
113
114
115
116       if he uses the machine named jsmachine at Podunk University.
117
118   uucp Addresses
119         ... [host!] host!username
120
121
122
123       These are sometimes mistakenly referred  to  as  ``Usenet''  addresses.
124       uucp(1C)  provides links to numerous sites throughout the world for the
125       remote copying of files.
126
127
128       Other site-specific forms of addressing can be added by customizing the
129       sendmail.cf  configuration file. See sendmail(1M) for details. Standard
130       addresses are recommended.
131
132   Aliases
133   Local Aliases
134       /etc/mail/aliases is formatted as a series of lines of the form
135
136         aliasname:address[, address]
137
138
139
140       aliasname is the name of the alias or alias group, and address  is  the
141       address of a recipient in the group. Aliases can be nested. That is, an
142       address can be the name of another alias  group.  Because  of  the  way
143       sendmail(1M) performs mapping from upper-case to lower-case, an address
144       that is the name of another alias group must not contain any upper-case
145       letters.
146
147
148       Lines  beginning with white space are treated as continuation lines for
149       the preceding alias. Lines beginning with # are comments.
150
151   Special Aliases
152       An alias of the form:
153
154         owner-aliasname : address
155
156
157
158       sendmail directs error-messages resulting from  mail  to  aliasname  to
159       address,  instead  of back to the person who sent the message. sendmail
160       rewrites the SMTP envelope sender to  match  this,  so  owner-aliasname
161       should always point to alias-request, and alias-request should point to
162       the owner's actual address:
163
164         owner-aliasname:      aliasname-request
165         aliasname-request     address
166
167
168
169       An alias of the form:
170
171         aliasname: :include:pathname
172
173
174
175       with colons as shown, adds the recipients listed in the  file  pathname
176       to  the  aliasname  alias.  This allows a private list to be maintained
177       separately from the aliases file.
178
179   NIS and NIS+ Domain Aliases
180       The aliases file on the master NIS server is used for the  mail.aliases
181       NIS  map,  which  can  be  made  available  to  every  NIS  client. The
182       mail_aliases table serves the same purpose on a NIS+ server. Thus,  the
183       /etc/mail/aliases* files on the various hosts in a network will one day
184       be obsolete. Domain-wide aliases should  ultimately  be  resolved  into
185       usernames  on specific hosts. For example, if the following were in the
186       domain-wide alias file:
187
188         jsmith:js@jsmachine
189
190
191
192       then any NIS or NIS+ client could just mail to jsmith and not  have  to
193       remember the machine and username for John Smith.
194
195
196       If  a  NIS or NIS+ alias does not resolve to an address with a specific
197       host, then the name of the NIS or NIS+ domain is used. There should  be
198       an alias of the domain name for a host in this case.
199
200
201       For example, the alias:
202
203         jsmith:root
204
205
206
207       sends  mail on a NIS or NIS+ client to root@podunk-u if the name of the
208       NIS or NIS+ domain is podunk-u.
209
210   Automatic Forwarding
211       When an alias (or address) is resolved to the name of  a  user  on  the
212       local  host,  sendmail(1M)  checks  for a ~/.forward file, owned by the
213       intended recipient, in that user's home directory, and  with  universal
214       read  access. This file can contain one or more addresses or aliases as
215       described above, each of which is sent a copy of the user's mail.
216
217
218       Care must be taken to avoid creating addressing loops in the ~/.forward
219       file.  When forwarding mail between machines, be sure that the destina‐
220       tion machine does not return the mail to the sender through the  opera‐
221       tion of any NIS aliases. Otherwise, copies of the message may "bounce."
222       Usually, the solution is to change the NIS alias to direct mail to  the
223       proper destination.
224
225
226       A  backslash before a username inhibits further aliasing. For instance,
227       to invoke the vacation program, user js creates a ~/.forward file  that
228       contains the line:
229
230         \js, "|/usr/ucb/vacation js"
231
232
233
234       so  that  one  copy  of the message is sent to the user, and another is
235       piped into the vacation program.
236
237
238       The ~/.forward file can be used to specify special  "per  user"  exten‐
239       sions  by creating a .forward+extension file in the home directory. For
240       example, with an address like jsmith+jerry@jsmachine, the  sendmail(1M)
241       utility  recognizes  everything  before  the "+" as the actual username
242       (jsmith) and everything after it, up to the "@" symbol, as  the  exten‐
243       sion (jerry) which is passed to the mail delivery agent for local use.
244
245
246       The  default value of the ForwardPath processing option in sendmail(1M)
247       is:
248
249         O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z \
250         /.forward
251
252
253
254       where $z is the macro for the user's home directory, $w  is  the  macro
255       for  the  local machine name and $h is the extension.  For example, for
256       mail using the address, jsmith+jerry@jsmachine, the sendmail(1M)  util‐
257       ity  checks  each of the four following file names, in the order given,
258       to see if it exists and if it has "safe"  permissions,  that  is,  that
259       neither the file nor any of its parent directories are group- or world-
260       writable:
261
262         ~jsmith/.forward.jsmachine+jerry
263         ~jsmith/.forward+jerry
264         ~jsmith/.forward.jsmachine
265         ~jsmith/.forward
266
267
268
269       The first file that meets the conditions is used to forward  the  mail,
270       that  is,  all the entries in that file receive a copy of the mail. The
271       search is then stopped.
272

FILES

274       /etc/passwd              Password file
275
276
277       /etc/nsswitch.conf       Name service switch configuration file
278
279
280       /etc/mail/aliases        Mail aliases file (ascii)
281
282
283       /etc/mail/aliases.db     Database of mail aliases (binary)
284
285
286       /etc/mail/aliases.dir    Database of mail aliases (binary)
287
288
289       /etc/mail/aliases.pag    Database of mail aliases (binary)
290
291
292       /etc/mail/sendmail.cf    sendmail configuration file
293
294
295       ~/.forward               Forwarding information file
296
297

ATTRIBUTES

299       See attributes(5) for descriptions of the following attributes:
300
301
302
303
304       ┌─────────────────────────────┬─────────────────────────────┐
305       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
306       ├─────────────────────────────┼─────────────────────────────┤
307       │Availability                 │SUNWsndmr                    │
308       └─────────────────────────────┴─────────────────────────────┘
309

SEE ALSO

311       passwd(1),   uucp(1C),   vacation(1),   newaliases(1M),   sendmail(1M),
312       ndbm(3C), getusershell(3C), passwd(4), shells(4), attributes(5)
313

NOTES

315       Because of restrictions in ndbm(3C), a single alias cannot contain more
316       than about 1000 characters (if this format is used). The Berkeley Data‐
317       Base  format  does not have any such restriction. Nested aliases can be
318       used to circumvent this limit.
319
320
321       For aliases which result in piping to  a  program  or  concatenating  a
322       file,  the  shell of the controlling user must be allowed. Which shells
323       are and are not allowed are determined by getusershell(3C).
324
325
326
327SunOS 5.11                        8 May 2006                        aliases(4)
Impressum