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