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>, this will override 56 the envelope sender address, so that delivery diagnostics are directed 57 to <b>owner-</b><i>name</i>, instead of the originator of the message (for details, 58 see <b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b>, <b><a href="postconf.5.html#expand_owner_alias">expand_owner_alias</a></b> and <b><a href="postconf.5.html#reset_owner_alias">reset_owner_alias</a></b>). 59 This is typically used to direct delivery errors to the maintainer of a 60 mailing list, who is in a better position to deal with mailing list 61 delivery problems than the originator of the undelivered mail. 62 63 The <i>value</i> contains one or more of the following: 64 65 <i>address</i> 66 Mail is forwarded to <i>address</i>, which is compatible with the <a href="http://tools.ietf.org/html/rfc822">RFC</a> 67 <a href="http://tools.ietf.org/html/rfc822">822</a> standard. 68 69 <i>/file/name</i> 70 Mail is appended to <i>/file/name</i>. See <a href="local.8.html"><b>local</b>(8)</a> for details of 71 delivery to file. Delivery is not limited to regular files. 72 For example, to dispose of unwanted mail, deflect it to 73 <b>/dev/null</b>. 74 75 |<i>command</i> 76 Mail is piped into <i>command</i>. Commands that contain special char- 77 acters, such as whitespace, should be enclosed between double 78 quotes. See <a href="local.8.html"><b>local</b>(8)</a> for details of delivery to command. 79 80 When the command fails, a limited amount of command output is 81 mailed back to the sender. The file <b>/usr/include/sysexits.h</b> 82 defines the expected exit status codes. For example, use <b>"|exit</b> 83 <b>67"</b> to simulate a "user unknown" error, and <b>"|exit 0"</b> to imple- 84 ment an expensive black hole. 85 86 <b>:include:</b><i>/file/name</i> 87 Mail is sent to the destinations listed in the named file. 88 Lines in <b>:include:</b> files have the same syntax as the right-hand 89 side of alias entries. 90 91 A destination can be any destination that is described in this 92 manual page. However, delivery to "|<i>command</i>" and <i>/file/name</i> is 93 disallowed by default. To enable, edit the <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_com</a>-</b> 94 <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. 95 96<b>ADDRESS EXTENSION</b> 97 When alias database search fails, and the recipient localpart contains 98 the optional recipient delimiter (e.g., <i>user+foo</i>), the search is 99 repeated for the unextended address (e.g., <i>user</i>). 100 101 The <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b> parameter controls whether an 102 unmatched address extension (<i>+foo</i>) is propagated to the result of table 103 lookup. 104 105<b>CASE FOLDING</b> 106 The <a href="local.8.html">local(8)</a> delivery agent always folds the search string to lowercase 107 before database lookup. 108 109<b>REGULAR EXPRESSION TABLES</b> 110 This section describes how the table lookups change when the table is 111 given in the form of regular expressions. For a description of regular 112 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>. 113 NOTE: these formats do not use ":" at the end of a pattern. 114 115 Each regular expression is applied to the entire search string. Thus, a 116 search string <i>user+foo</i> is not broken up into <i>user</i> and <i>foo</i>. 117 118 Regular expressions are applied in the order as specified in the table, 119 until a regular expression is found that matches the search string. 120 121 Lookup results are the same as with indexed file lookups. For security 122 reasons there is no support for <b>$1</b>, <b>$2</b> etc. substring interpolation. 123 124<b>SECURITY</b> 125 The <a href="local.8.html"><b>local</b>(8)</a> delivery agent disallows regular expression substitution 126 of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that would open a security hole. 127 128 The <a href="local.8.html"><b>local</b>(8)</a> delivery agent will silently ignore requests to use the 129 <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 130 directly. Before Postfix version 2.2, the <a href="local.8.html"><b>local</b>(8)</a> delivery agent will 131 terminate with a fatal error. 132 133<b>CONFIGURATION PARAMETERS</b> 134 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant. The text 135 below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more 136 details including examples. 137 138 <b><a href="postconf.5.html#alias_database">alias_database</a> (see 'postconf -d' output)</b> 139 The alias databases for <a href="local.8.html"><b>local</b>(8)</a> delivery that are updated with 140 "<b>newaliases</b>" or with "<b>sendmail -bi</b>". 141 142 <b><a href="postconf.5.html#alias_maps">alias_maps</a> (see 'postconf -d' output)</b> 143 The alias databases that are used for <a href="local.8.html"><b>local</b>(8)</a> delivery. 144 145 <b><a href="postconf.5.html#allow_mail_to_commands">allow_mail_to_commands</a> (alias, forward)</b> 146 Restrict <a href="local.8.html"><b>local</b>(8)</a> mail delivery to external commands. 147 148 <b><a href="postconf.5.html#allow_mail_to_files">allow_mail_to_files</a> (alias, forward)</b> 149 Restrict <a href="local.8.html"><b>local</b>(8)</a> mail delivery to external files. 150 151 <b><a href="postconf.5.html#expand_owner_alias">expand_owner_alias</a> (no)</b> 152 When delivering to an alias "<i>aliasname</i>" that has an 153 "owner-<i>aliasname</i>" companion alias, set the envelope sender 154 address to the expansion of the "owner-<i>aliasname</i>" alias. 155 156 <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b> 157 What address lookup tables copy an address extension from the 158 lookup key to the lookup result. 159 160 <b><a href="postconf.5.html#owner_request_special">owner_request_special</a> (yes)</b> 161 Enable special treatment for owner-<i>listname</i> entries in the 162 <a href="aliases.5.html"><b>aliases</b>(5)</a> file, and don't split owner-<i>listname</i> and <i>list-</i> 163 <i>name</i>-request address localparts when the <a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> is 164 set to "-". 165 166 <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b> 167 The set of characters that can separate a user name from its 168 extension (example: user+foo), or a .forward file name from its 169 extension (example: .forward+foo). 170 171 Available in Postfix version 2.3 and later: 172 173 <b><a href="postconf.5.html#frozen_delivered_to">frozen_delivered_to</a> (yes)</b> 174 Update the <a href="local.8.html"><b>local</b>(8)</a> delivery agent's idea of the Delivered-To: 175 address (see <a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a>) only once, at the start 176 of a delivery attempt; do not update the Delivered-To: address 177 while expanding aliases or .forward files. 178 179<b>STANDARDS</b> 180 <a href="http://tools.ietf.org/html/rfc822">RFC 822</a> (ARPA Internet Text Messages) 181 182<b>SEE ALSO</b> 183 <a href="local.8.html">local(8)</a>, local delivery agent 184 <a href="newaliases.1.html">newaliases(1)</a>, create/update alias database 185 <a href="postalias.1.html">postalias(1)</a>, create/update alias database 186 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 187 188<b>README FILES</b> 189 <a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview 190 191<b>LICENSE</b> 192 The Secure Mailer license must be distributed with this software. 193 194<b>AUTHOR(S)</b> 195 Wietse Venema 196 IBM T.J. Watson Research 197 P.O. Box 704 198 Yorktown Heights, NY 10598, USA 199 200 Wietse Venema 201 Google, Inc. 202 111 8th Avenue 203 New York, NY 10011, USA 204 205 ALIASES(5) 206</pre> </body> </html> 207