xref: /netbsd-src/external/ibm-public/postfix/dist/html/aliases.5.html (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2        "http://www.w3.org/TR/html4/loose.dtd">
3<html> <head>
4<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
5<title> Postfix manual - aliases(5) </title>
6</head> <body> <pre>
7ALIASES(5)                                                          ALIASES(5)
8
9<b>NAME</b>
10       aliases - Postfix local alias database format
11
12<b>SYNOPSIS</b>
13       <b>newaliases</b>
14
15<b>DESCRIPTION</b>
16       The  <a href="aliases.5.html"><b>aliases</b>(5)</a> table provides a system-wide mechanism to redirect mail
17       for local recipients. The redirections are  processed  by  the  Postfix
18       <a href="local.8.html"><b>local</b>(8)</a> delivery agent.
19
20       Normally,  the <a href="aliases.5.html"><b>aliases</b>(5)</a> table is specified as a text file that serves
21       as input to the <a href="postalias.1.html"><b>postalias</b>(1)</a> command. The result, an  indexed  file  in
22       <b>dbm</b>  or  <b>db</b> format, is used for fast lookup by the mail system. Execute
23       the command <b>newaliases</b> in order  to  rebuild  the  indexed  file  after
24       changing the Postfix alias database.
25
26       When  the  table  is provided via other means such as NIS, LDAP or SQL,
27       the same lookups are done as for ordinary indexed files.
28
29       Alternatively, the table can be provided as  a  regular-expression  map
30       where  patterns  are  given  as  regular expressions. In this case, the
31       lookups are done in a slightly different way as described  below  under
32       "REGULAR EXPRESSION TABLES".
33
34       Users  can  control  delivery  of their own mail by setting up <b>.forward</b>
35       files in their home directory.  Lines in per-user <b>.forward</b>  files  have
36       the same syntax as the right-hand side of <a href="aliases.5.html"><b>aliases</b>(5)</a> entries.
37
38       The format of the alias database input file is as follows:
39
40       <b>o</b>      An alias definition has the form
41
42                   <i>name</i>: <i>value1</i>, <i>value2</i>, <i>...</i>
43
44       <b>o</b>      Empty  lines and whitespace-only lines are ignored, as are lines
45              whose first non-whitespace character is a `#'.
46
47       <b>o</b>      A logical line starts with  non-whitespace  text.  A  line  that
48              starts with whitespace continues a logical line.
49
50       The  <i>name</i>  is a local address (no domain part).  Use double quotes when
51       the name contains any special characters such as whitespace, `#',  `:',
52       or  `@'.  The  <i>name</i>  is  folded to lowercase, in order to make database
53       lookups case insensitive.
54
55       In addition, when an alias exists for <b>owner-</b><i>name</i>, delivery  diagnostics
56       are  directed to that address, instead of to the originator of the mes-
57       sage.  This is typically used to direct delivery errors  to  the  main-
58       tainer  of  a  mailing  list,  who is in a better position to deal with
59       mailing list delivery problems than the originator of  the  undelivered
60       mail.
61
62       The <i>value</i> contains one or more of the following:
63
64       <i>address</i>
65              Mail  is  forwarded to <i>address</i>, which is compatible with the <a href="http://tools.ietf.org/html/rfc822">RFC</a>
66              <a href="http://tools.ietf.org/html/rfc822">822</a> standard.
67
68       <i>/file/name</i>
69              Mail is appended to <i>/file/name</i>.  See  <a href="local.8.html"><b>local</b>(8)</a>  for  details  of
70              delivery  to  file.   Delivery  is not limited to regular files.
71              For  example,  to  dispose  of  unwanted  mail,  deflect  it  to
72              <b>/dev/null</b>.
73
74       |<i>command</i>
75              Mail  is piped into <i>command</i>. Commands that contain special char-
76              acters, such as whitespace, should be  enclosed  between  double
77              quotes. See <a href="local.8.html"><b>local</b>(8)</a> for details of delivery to command.
78
79              When  the  command  fails, a limited amount of command output is
80              mailed back to the  sender.   The  file  <b>/usr/include/sysexits.h</b>
81              defines  the expected exit status codes. For example, use <b>"|exit</b>
82              <b>67"</b> to simulate a "user unknown" error, and <b>"|exit 0"</b> to  imple-
83              ment an expensive black hole.
84
85       <b>:include:</b><i>/file/name</i>
86              Mail  is  sent  to  the  destinations  listed in the named file.
87              Lines in <b>:include:</b> files have the same syntax as the  right-hand
88              side of alias entries.
89
90              A  destination  can be any destination that is described in this
91              manual page. However, delivery to "|<i>command</i>" and  <i>/file/name</i>  is
92              disallowed  by  default.  To enable, edit the <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_com</a>-</b>
93              <b><a href="postconf.5.html#allow_mail_to_commands">mands</a></b> and <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b> configuration parameters.
94
95<b>ADDRESS EXTENSION</b>
96       When alias database search fails, and the recipient localpart  contains
97       the  optional  recipient  delimiter  (e.g.,  <i>user+foo</i>),  the  search is
98       repeated for the unextended address (e.g., <i>user</i>).
99
100       The  <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b>  parameter  controls   whether   an
101       unmatched address extension (<i>+foo</i>) is propagated to the result of table
102       lookup.
103
104<b>CASE FOLDING</b>
105       The <a href="local.8.html">local(8)</a> delivery agent always folds the search string to lowercase
106       before database lookup.
107
108<b>REGULAR EXPRESSION TABLES</b>
109       This  section  describes how the table lookups change when the table is
110       given in the form of regular expressions. For a description of  regular
111       expression  lookup  table syntax, see <a href="regexp_table.5.html"><b>regexp_table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre_table</b>(5)</a>.
112       NOTE: these formats do not use ":" at the end of a pattern.
113
114       Each regular expression is applied to the entire search string. Thus, a
115       search string <i>user+foo</i> is not broken up into <i>user</i> and <i>foo</i>.
116
117       Regular expressions are applied in the order as specified in the table,
118       until a regular expression is found that matches the search string.
119
120       Lookup results are the same as with indexed file lookups.  For security
121       reasons there is no support for <b>$1</b>, <b>$2</b> etc. substring interpolation.
122
123<b>SECURITY</b>
124       The  <a href="local.8.html"><b>local</b>(8)</a>  delivery agent disallows regular expression substitution
125       of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that would open a security hole.
126
127       The <a href="local.8.html"><b>local</b>(8)</a> delivery agent will silently ignore requests  to  use  the
128       <a href="proxymap.8.html"><b>proxymap</b>(8)</a>  server  within  <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>. Instead it will open the table
129       directly.  Before Postfix version 2.2, the <a href="local.8.html"><b>local</b>(8)</a> delivery agent will
130       terminate with a fatal error.
131
132<b>CONFIGURATION PARAMETERS</b>
133       The  following  <a href="postconf.5.html"><b>main.cf</b></a>  parameters  are especially relevant.  The text
134       below provides only a  parameter  summary.  See  <a href="postconf.5.html"><b>postconf</b>(5)</a>  for  more
135       details including examples.
136
137       <b><a href="postconf.5.html#alias_database">alias_database</a></b>
138              List  of  alias  databases that are updated by the <a href="newaliases.1.html"><b>newaliases</b>(1)</a>
139              command.
140
141       <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>
142              List of alias databases queried by the <a href="local.8.html"><b>local</b>(8)</a> delivery  agent.
143
144       <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_commands</a></b>
145              Restrict the usage of mail delivery to external command.
146
147       <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a></b>
148              Restrict the usage of mail delivery to external file.
149
150       <b><a href="postconf.5.html#expand_owner_alias">expand_owner_alias</a></b>
151              When  delivering to an alias that has an <b>owner-</b> companion alias,
152              set the envelope sender address to the right-hand  side  of  the
153              owner alias, instead using of the left-hand side address.
154
155       <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b>
156              A list of address rewriting or forwarding mechanisms that propa-
157              gate an address extension  from  the  original  address  to  the
158              result.  Specify zero or more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>for-</b>
159              <b>ward</b>, <b>include</b>, or <b>generic</b>.
160
161       <b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b>
162              Give special treatment to  <b>owner-</b><i>listname</i>  and  <i>listname</i><b>-request</b>
163              addresses.
164
165       <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a></b>
166              Delimiter that separates recipients from address extensions.
167
168       Available in Postfix version 2.3 and later:
169
170       <b><a href="postconf.5.html#frozen_delivered_to">frozen_delivered_to</a></b>
171              Update  the <a href="local.8.html">local(8)</a> delivery agent's Delivered-To: address (see
172              <a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a>) only once, at the start of a delivery;
173              do  not update the Delivered-To: address while expanding aliases
174              or .forward files.
175
176<b>STANDARDS</b>
177       <a href="http://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages)
178
179<b>SEE ALSO</b>
180       <a href="local.8.html">local(8)</a>, local delivery agent
181       <a href="newaliases.1.html">newaliases(1)</a>, create/update alias database
182       <a href="postalias.1.html">postalias(1)</a>, create/update alias database
183       <a href="postconf.5.html">postconf(5)</a>, configuration parameters
184
185<b>README FILES</b>
186       <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
187
188<b>LICENSE</b>
189       The Secure Mailer license must be distributed with this software.
190
191<b>AUTHOR(S)</b>
192       Wietse Venema
193       IBM T.J. Watson Research
194       P.O. Box 704
195       Yorktown Heights, NY 10598, USA
196
197                                                                    ALIASES(5)
198</pre> </body> </html>
199