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