summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src/aliases.5
blob: 6715b516d247feb2b58097863fce0ae054e0cc0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.\" Copyright (c) 1998-2000 Proofpoint, Inc. and its suppliers.
.\"	 All rights reserved.
.\" Copyright (c) 1983, 1997 Eric P. Allman.  All rights reserved.
.\" Copyright (c) 1985, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" By using this file, you agree to the terms and conditions set
.\" forth in the LICENSE file which can be found at the top level of
.\" the sendmail distribution.
.\"
.\"
.\"     $Id: aliases.5,v 8.20 2013/11/22 20:51:55 ca Exp $
.\"
.TH ALIASES 5 "$Date: 2013/11/22 20:51:55 $"
.SH NAME
aliases
\- aliases file for sendmail
.SH SYNOPSIS
.B aliases
.SH DESCRIPTION
This file describes user 
ID 
aliases used by 
sendmail.
The file resides in 
/etc/mail 
and 
is formatted as a series of lines of the form
.IP
name: addr_1, addr_2, addr_3, . . .
.PP
The
.I name
is the name to alias, and the
.I addr_n
are the aliases for that name.  
.I addr_n
can be another alias, a local username, a local filename,
a command,
an include file,
or an external address.
.TP
.B Local Username
username
.IP
The username must be available via getpwnam(3).
.TP
.B Local Filename
/path/name
.IP
Messages are appended to the file specified by the full pathname
(starting with a slash (/))
.TP
.B Command
|command
.IP
A command starts with a pipe symbol (|),
it receives messages via standard input.
.TP
.B Include File
:include: /path/name
.IP
The aliases in pathname are added to the aliases for
.I name.
.TP
.B E-Mail Address
user@domain
.IP
An e-mail address in RFC 822 format.
.PP
Lines beginning with white space are continuation lines.  
Another way to continue lines is by placing a backslash 
directly before a newline.  
Lines beginning with 
# 
are comments.
.PP
Aliasing occurs only on local names.  
Loops can not occur, since no message will be sent to any person more than once.
.PP
If an alias is found for
.IR name ,
sendmail then checks for an alias for
.IR owner-name .
If it is found and the result of the lookup expands to a single
address, the envelope sender address of the message is rewritten to
that address.
If it is found and the result expands to more than one address, the
envelope sender address is changed to
.IR owner-name .
.PP
After aliasing has been done, local and valid recipients who have a 
``.forward'' 
file in their home directory have messages forwarded to the 
list of users defined in that file.
.PP
This is only the raw data file; the actual aliasing information is
placed into a binary format in the file 
/etc/mail/aliases.db
using the program 
newaliases(1).  
A 
newaliases
command should be executed each time the aliases file is changed for the 
change to take effect.
.SH SEE  ALSO
newaliases(1), 
dbm(3), 
dbopen(3), 
db_open(3), 
sendmail(8)
.PP
.I
SENDMAIL Installation and Operation Guide.
.PP
.I 
SENDMAIL An Internetwork Mail Router.
.SH BUGS
If you have compiled 
sendmail 
with DBM support instead of NEWDB,
you may have encountered problems in 
dbm(3) 
restricting a single alias to about 1000 bytes of information.  
You can get longer aliases by ``chaining''; that is, make the last name in 
the alias be a dummy name which is a continuation alias.
.SH HISTORY
The
.B aliases
file format appeared in 
4.0BSD.
OpenPOWER on IntegriCloud