1ALIASES(5)                    File Formats Manual                   ALIASES(5)
2
3
4

NAME

6       aliases - Postfix local alias database format
7

SYNOPSIS

9       newaliases
10

DESCRIPTION

12       The  aliases(5) table provides a system-wide mechanism to redirect mail
13       for local recipients. The redirections are  processed  by  the  Postfix
14       local(8) delivery agent.
15
16       Normally,  the aliases(5) table is specified as a text file that serves
17       as input to the postalias(1) command. The result, an  indexed  file  in
18       dbm  or  db format, is used for fast lookup by the mail system. Execute
19       the command newaliases in order  to  rebuild  the  indexed  file  after
20       changing the Postfix alias database.
21
22       When  the  table  is provided via other means such as NIS, LDAP or SQL,
23       the same lookups are done as for ordinary indexed files.
24
25       Alternatively, the table can be provided as  a  regular-expression  map
26       where  patterns  are  given  as  regular expressions. In this case, the
27       lookups are done in a slightly different way as described  below  under
28       "REGULAR EXPRESSION TABLES".
29
30       Users  can  control  delivery  of their own mail by setting up .forward
31       files in their home directory.  Lines in per-user .forward  files  have
32       the same syntax as the right-hand side of aliases(5) entries.
33
34       The format of the alias database input file is as follows:
35
36       ·      An alias definition has the form
37
38                   name: value1, value2, ...
39
40       ·      Empty  lines and whitespace-only lines are ignored, as are lines
41              whose first non-whitespace character is a `#'.
42
43       ·      A logical line starts with  non-whitespace  text.  A  line  that
44              starts with whitespace continues a logical line.
45
46       The  name  is a local address (no domain part).  Use double quotes when
47       the name contains any special characters such as whitespace, `#',  `:',
48       or  `@'.  The  name  is  folded to lowercase, in order to make database
49       lookups case insensitive.
50
51       In addition, when an alias exists for owner-name,  this  will  override
52       the  envelope sender address, so that delivery diagnostics are directed
53       to owner-name, instead of the originator of the message  (for  details,
54       see  owner_request_special,  expand_owner_alias and reset_owner_alias).
55       This is typically used to direct delivery errors to the maintainer of a
56       mailing  list,  who  is  in a better position to deal with mailing list
57       delivery problems than the originator of the undelivered mail.
58
59       The value contains one or more of the following:
60
61       address
62              Mail is forwarded to address, which is compatible with  the  RFC
63              822 standard.
64
65       /file/name
66              Mail  is  appended  to  /file/name.  See local(8) for details of
67              delivery to file.  Delivery is not  limited  to  regular  files.
68              For  example,  to  dispose  of  unwanted  mail,  deflect  it  to
69              /dev/null.
70
71       |command
72              Mail is piped into command. Commands that contain special  char‐
73              acters,  such  as  whitespace, should be enclosed between double
74              quotes. See local(8) for details of delivery to command.
75
76              When the command fails, a limited amount of  command  output  is
77              mailed  back  to  the  sender.  The file /usr/include/sysexits.h
78              defines the expected exit status codes. For example, use  "|exit
79              67"  to simulate a "user unknown" error, and "|exit 0" to imple‐
80              ment an expensive black hole.
81
82       :include:/file/name
83              Mail is sent to the  destinations  listed  in  the  named  file.
84              Lines  in :include: files have the same syntax as the right-hand
85              side of alias entries.
86
87              A destination can be any destination that is described  in  this
88              manual  page.  However, delivery to "|command" and /file/name is
89              disallowed by default. To enable,  edit  the  allow_mail_to_com‐
90              mands and allow_mail_to_files configuration parameters.
91

ADDRESS EXTENSION

93       When  alias database search fails, and the recipient localpart contains
94       the optional  recipient  delimiter  (e.g.,  user+foo),  the  search  is
95       repeated for the unextended address (e.g., user).
96
97       The   propagate_unmatched_extensions   parameter  controls  whether  an
98       unmatched address extension (+foo) is propagated to the result of table
99       lookup.
100

CASE FOLDING

102       The local(8) delivery agent always folds the search string to lowercase
103       before database lookup.
104

REGULAR EXPRESSION TABLES

106       This section describes how the table lookups change when the  table  is
107       given  in the form of regular expressions. For a description of regular
108       expression lookup table syntax, see regexp_table(5)  or  pcre_table(5).
109       NOTE: these formats do not use ":" at the end of a pattern.
110
111       Each regular expression is applied to the entire search string. Thus, a
112       search string user+foo is not broken up into user and foo.
113
114       Regular expressions are applied in the order as specified in the table,
115       until a regular expression is found that matches the search string.
116
117       Lookup results are the same as with indexed file lookups.  For security
118       reasons there is no support for $1, $2 etc. substring interpolation.
119

SECURITY

121       The local(8) delivery agent disallows regular  expression  substitution
122       of $1 etc. in alias_maps, because that would open a security hole.
123
124       The  local(8)  delivery  agent will silently ignore requests to use the
125       proxymap(8) server within alias_maps. Instead it will  open  the  table
126       directly.  Before Postfix version 2.2, the local(8) delivery agent will
127       terminate with a fatal error.
128

CONFIGURATION PARAMETERS

130       The following main.cf parameters are  especially  relevant.   The  text
131       below  provides  only  a  parameter  summary.  See postconf(5) for more
132       details including examples.
133
134       alias_database (see 'postconf -d' output)
135              The alias databases for local(8) delivery that are updated  with
136              "newaliases" or with "sendmail -bi".
137
138       alias_maps (see 'postconf -d' output)
139              The alias databases that are used for local(8) delivery.
140
141       allow_mail_to_commands (alias, forward)
142              Restrict local(8) mail delivery to external commands.
143
144       allow_mail_to_files (alias, forward)
145              Restrict local(8) mail delivery to external files.
146
147       expand_owner_alias (no)
148              When   delivering   to   an   alias   "aliasname"  that  has  an
149              "owner-aliasname"  companion  alias,  set  the  envelope  sender
150              address to the expansion of the "owner-aliasname" alias.
151
152       propagate_unmatched_extensions (canonical, virtual)
153              What  address  lookup  tables copy an address extension from the
154              lookup key to the lookup result.
155
156       owner_request_special (yes)
157              Enable special  treatment  for  owner-listname  entries  in  the
158              aliases(5)  file,  and  don't  split  owner-listname  and  list‐
159              name-request address localparts when the recipient_delimiter  is
160              set to "-".
161
162       recipient_delimiter (empty)
163              The  set  of  characters  that can separate a user name from its
164              extension (example: user+foo), or a .forward file name from  its
165              extension (example: .forward+foo).
166
167       Available in Postfix version 2.3 and later:
168
169       frozen_delivered_to (yes)
170              Update  the  local(8) delivery agent's idea of the Delivered-To:
171              address (see prepend_delivered_header) only once, at  the  start
172              of  a  delivery attempt; do not update the Delivered-To: address
173              while expanding aliases or .forward files.
174

STANDARDS

176       RFC 822 (ARPA Internet Text Messages)
177

SEE ALSO

179       local(8), local delivery agent
180       newaliases(1), create/update alias database
181       postalias(1), create/update alias database
182       postconf(5), configuration parameters
183

README FILES

185       Use "postconf readme_directory" or "postconf html_directory" to  locate
186       this information.
187       DATABASE_README, Postfix lookup table overview
188

LICENSE

190       The Secure Mailer license must be distributed with this software.
191

AUTHOR(S)

193       Wietse Venema
194       IBM T.J. Watson Research
195       P.O. Box 704
196       Yorktown Heights, NY 10598, USA
197
198       Wietse Venema
199       Google, Inc.
200       111 8th Avenue
201       New York, NY 10011, USA
202
203
204
205                                                                    ALIASES(5)
Impressum