~ubuntu-branches/ubuntu/raring/postfix/raring

« back to all changes in this revision

Viewing changes to man/man5/canonical.5

Tags: upstream-2.2.6
ImportĀ upstreamĀ versionĀ 2.2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
.SH NAME
5
5
canonical
6
6
\-
7
 
format of Postfix canonical table
 
7
Postfix canonical table format
8
8
.SH "SYNOPSIS"
9
9
.na
10
10
.nf
16
16
.SH DESCRIPTION
17
17
.ad
18
18
.fi
19
 
The optional \fBcanonical\fR table specifies an address mapping for
 
19
The optional \fBcanonical\fR(5) table specifies an address mapping for
20
20
local and non-local addresses. The mapping is used by the
21
 
\fBcleanup\fR(8) daemon.  The address mapping is recursive.
 
21
\fBcleanup\fR(8) daemon, before mail is stored into the
 
22
queue.  The address mapping is recursive.
22
23
 
23
 
Normally, the \fBcanonical\fR table is specified as a text file
 
24
Normally, the \fBcanonical\fR(5) table is specified as a text file
24
25
that serves as input to the \fBpostmap\fR(1) command.
25
26
The result, an indexed file in \fBdbm\fR or \fBdb\fR format,
26
27
is used for fast searching by the mail system. Execute the command
27
 
\fBpostmap /etc/postfix/canonical\fR in order to rebuild the indexed
 
28
"\fBpostmap /etc/postfix/canonical\fR" in order to rebuild the indexed
28
29
file after changing the text file.
29
30
 
30
31
When the table is provided via other means such as NIS, LDAP
36
37
done in a slightly different way as described below under
37
38
"REGULAR EXPRESSION TABLES" and "TCP-BASED TABLES".
38
39
 
39
 
The \fBcanonical\fR mapping affects both message header addresses
40
 
(i.e. addresses that appear inside messages) and message envelope
41
 
addresses (for example, the addresses that are used in SMTP protocol
42
 
commands). Think Sendmail rule set \fBS3\fR, if you like.
43
 
 
44
 
Typically, one would use the \fBcanonical\fR table to replace login
 
40
By default the \fBcanonical\fR(5) mapping affects both message
 
41
header addresses (i.e. addresses that appear inside messages)
 
42
and message envelope addresses (for example, the addresses
 
43
that are used in SMTP protocol commands). Think Sendmail
 
44
rule set \fBS3\fR, if you like.  This is controlled with
 
45
the \fBcanonical_classes\fR parameter.
 
46
 
 
47
NOTE: Postfix versions 2.2 and later rewrite message headers
 
48
from remote SMTP clients only if the client matches the
 
49
local_header_rewrite_clients parameter, or if the
 
50
remote_header_rewrite_domain configuration parameter specifies
 
51
a non-empty value. To get the behavior before Postfix 2.2,
 
52
specify "local_header_rewrite_clients = static:all".
 
53
 
 
54
Typically, one would use the \fBcanonical\fR(5) table to replace login
45
55
names by \fIFirstname.Lastname\fR, or to clean up addresses produced
46
56
by legacy mail systems.
47
57
 
48
 
The \fBcanonical\fR mapping is not to be confused with \fIvirtual
 
58
The \fBcanonical\fR(5) mapping is not to be confused with \fIvirtual
49
59
domain\fR support. Use the \fBvirtual\fR(5) map for that purpose.
50
60
 
51
 
The \fBcanonical\fR mapping is not to be confused with local aliasing.
 
61
The \fBcanonical\fR(5) mapping is not to be confused with local aliasing.
52
62
Use the \fBaliases\fR(5) map for that purpose.
53
63
.SH "TABLE FORMAT"
54
64
.na
65
75
.IP "multi-line text"
66
76
A logical line starts with non-whitespace text. A line that
67
77
starts with whitespace continues a logical line.
68
 
.PP
 
78
.SH "TABLE SEARCH ORDER"
 
79
.na
 
80
.nf
 
81
.ad
 
82
.fi
69
83
With lookups from indexed files such as DB or DBM, or from networked
70
84
tables such as NIS, LDAP or SQL, patterns are tried in the order as
71
85
listed below:
72
86
.IP "\fIuser\fR@\fIdomain address\fR"
73
 
\fIuser\fR@\fIdomain\fR is replaced by \fIaddress\fR. This form
 
87
Replace \fIuser\fR@\fIdomain\fR by \fIaddress\fR. This form
74
88
has the highest precedence.
75
89
.sp
76
90
This is useful to clean up addresses produced by legacy mail systems.
77
91
It can also be used to produce \fIFirstname.Lastname\fR style
78
92
addresses, but see below for a simpler solution.
79
93
.IP "\fIuser address\fR"
80
 
\fIuser\fR@\fIsite\fR is replaced by \fIaddress\fR when \fIsite\fR is
 
94
Replace \fIuser\fR@\fIsite\fR by \fIaddress\fR when \fIsite\fR is
81
95
equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
82
96
$\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
83
97
or $\fBproxy_interfaces\fR.
85
99
This form is useful for replacing login names by
86
100
\fIFirstname.Lastname\fR.
87
101
.IP "@\fIdomain address\fR"
88
 
Every address in \fIdomain\fR is replaced by \fIaddress\fR.
 
102
Replace other addresses in \fIdomain\fR by \fIaddress\fR.
89
103
This form has the lowest precedence.
90
 
.PP
91
 
In all the above forms, when \fIaddress\fR has the form
92
 
@\fIotherdomain\fR, the result is the same user in \fIotherdomain\fR.
 
104
.SH "RESULT ADDRESS REWRITING"
 
105
.na
 
106
.nf
 
107
.ad
 
108
.fi
 
109
The lookup result is subject to address rewriting:
 
110
.IP \(bu
 
111
When the result has the form @\fIotherdomain\fR, the
 
112
result becomes the same \fIuser\fR in \fIotherdomain\fR.
 
113
.IP \(bu
 
114
When "\fBappend_at_myorigin=yes\fR", append "\fB@$myorigin\fR"
 
115
to addresses without "@domain".
 
116
.IP \(bu
 
117
When "\fBappend_dot_mydomain=yes\fR", append
 
118
"\fB.$mydomain\fR" to addresses without ".domain".
93
119
.SH "ADDRESS EXTENSION"
94
120
.na
95
121
.nf
132
158
This section describes how the table lookups change when lookups
133
159
are directed to a TCP-based server. For a description of the TCP
134
160
client/server lookup protocol, see \fBtcp_table\fR(5).
135
 
This feature is not available in Postfix version 2.1.
 
161
This feature is not available up to and including Postfix version 2.2.
136
162
 
137
163
Each lookup operation uses the entire address once.  Thus,
138
164
\fIuser@domain\fR mail addresses are not broken up into their
151
177
.fi
152
178
The following \fBmain.cf\fR parameters are especially relevant.
153
179
The text below provides only a parameter summary. See
154
 
postconf(5) for more details including examples.
 
180
\fBpostconf\fR(5) for more details including examples.
 
181
.IP \fBcanonical_classes\fR
 
182
What addresses are subject to canonical address mapping.
155
183
.IP \fBcanonical_maps\fR
156
184
List of canonical mapping tables.
157
185
.IP \fBrecipient_canonical_maps\fR
164
192
A list of address rewriting or forwarding mechanisms that propagate
165
193
an address extension from the original address to the result.
166
194
Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
167
 
\fBforward\fR, or \fBinclude\fR.
 
195
\fBforward\fR, \fBinclude\fR, or \fBgeneric\fR.
168
196
.PP
169
197
Other parameters of interest:
170
198
.IP \fBinet_interfaces\fR
171
199
The network interface addresses that this system receives mail on.
172
200
You need to stop and start Postfix when this parameter changes.
 
201
.IP \fBlocal_header_rewrite_clients\fR
 
202
Rewrite message header addresses in mail from these clients
 
203
and update incomplete addresses with the domain name in
 
204
$myorigin or $mydomain; either don't rewrite message headers
 
205
from other clients at all, or rewrite message headers and
 
206
update incomplete addresses with the domain specified in
 
207
the remote_header_rewrite_domain parameter.
173
208
.IP \fBproxy_interfaces\fR
174
209
Other interfaces that this machine receives mail on by way of a
175
210
proxy agent or network address translator.
188
223
.IP \fBowner_request_special\fR
189
224
Give special treatment to \fBowner-\fIxxx\fR and \fIxxx\fB-request\fR
190
225
addresses.
 
226
.IP \fBremote_header_rewrite_domain\fR
 
227
Don't rewrite message headers from remote clients at all
 
228
when this parameter is empty; otherwise, rewrite message
 
229
headers and append the specified domain name to incomplete
 
230
addresses.
191
231
.SH "SEE ALSO"
192
232
.na
193
233
.nf