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