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