xref: /netbsd-src/external/ibm-public/postfix/dist/proto/transport (revision 154bfe8e089c1a0a4e9ed8414f08d3da90949162)
1#++
2# NAME
3#	transport 5
4# SUMMARY
5#	Postfix transport table format
6# SYNOPSIS
7#	\fBpostmap /etc/postfix/transport\fR
8#
9#	\fBpostmap -q "\fIstring\fB" /etc/postfix/transport\fR
10#
11#	\fBpostmap -q - /etc/postfix/transport <\fIinputfile\fR
12# DESCRIPTION
13#	The optional \fBtransport\fR(5) table specifies a mapping from email
14#	addresses to message delivery transports and next-hop destinations.
15#	Message delivery transports such as \fBlocal\fR or \fBsmtp\fR
16#	are defined in the \fBmaster.cf\fR file, and next-hop
17#	destinations are typically hosts or domain names. The
18#	table is searched by the \fBtrivial-rewrite\fR(8) daemon.
19#
20#	This mapping overrides the default \fItransport\fR:\fInexthop\fR
21#	selection that is built into Postfix:
22# .IP "\fBlocal_transport (default: local:$myhostname)\fR"
23#	This is the default for final delivery to domains listed
24#	with \fBmydestination\fR, and for [\fIipaddress\fR]
25#	destinations that match \fB$inet_interfaces\fR or
26#	\fB$proxy_interfaces\fR. The default \fInexthop\fR destination
27#	is the MTA hostname.
28# .IP "\fBvirtual_transport (default: virtual:)\fR"
29#	This is the default for final delivery to domains listed
30#	with \fBvirtual_mailbox_domains\fR. The default \fInexthop\fR
31#	destination is the recipient domain.
32# .IP "\fBrelay_transport (default: relay:)\fR"
33#	This is the default for remote delivery to domains listed
34#	with \fBrelay_domains\fR. In order of decreasing precedence,
35#	the \fInexthop\fR destination is taken from \fBrelay_transport\fR,
36#	\fBsender_dependent_relayhost_maps\fR, \fBrelayhost\fR, or from the
37#	recipient domain.
38# .IP "\fBdefault_transport (default: smtp:)\fR"
39#	This is the default for remote delivery to other destinations.
40#	In order of decreasing precedence, the \fInexthop\fR
41#	destination is taken from \fBsender_dependent_default_transport_maps,
42#	\fBdefault_transport\fR, \fBsender_dependent_relayhost_maps\fR,
43#	\fBrelayhost\fR, or from the recipient domain.
44# .PP
45#	Normally, the \fBtransport\fR(5) table is specified as a text file
46#	that serves as input to the \fBpostmap\fR(1) command.
47#	The result, an indexed file in \fBdbm\fR or \fBdb\fR format, is used
48#	for fast searching by the mail system. Execute the command
49#	"\fBpostmap /etc/postfix/transport\fR" to rebuild an indexed
50#	file after changing the corresponding transport table.
51#
52#	When the table is provided via other means such as NIS, LDAP
53#	or SQL, the same lookups are done as for ordinary indexed files.
54#
55#	Alternatively, the table can be provided as a regular-expression
56#	map where patterns are given as regular expressions, or lookups
57#	can be directed to TCP-based server. In those case, the lookups
58#	are done in a slightly different way as described below under
59#	"REGULAR EXPRESSION TABLES" or "TCP-BASED TABLES".
60# CASE FOLDING
61# .ad
62# .fi
63#	The search string is folded to lowercase before database
64#	lookup. As of Postfix 2.3, the search string is not case
65#	folded with database types such as regexp: or pcre: whose
66#	lookup fields can match both upper and lower case.
67# TABLE FORMAT
68# .ad
69# .fi
70#	The input format for the \fBpostmap\fR(1) command is as follows:
71# .IP "\fIpattern result\fR"
72#	When \fIpattern\fR matches the recipient address or domain, use the
73#	corresponding \fIresult\fR.
74# .IP "blank lines and comments"
75#	Empty lines and whitespace-only lines are ignored, as
76#	are lines whose first non-whitespace character is a `#'.
77# .IP "multi-line text"
78#	A logical line starts with non-whitespace text. A line that
79#	starts with whitespace continues a logical line.
80# .PP
81#	The \fIpattern\fR specifies an email address, a domain name, or
82#	a domain name hierarchy, as described in section "TABLE LOOKUP".
83#
84#	The \fIresult\fR is of the form \fItransport:nexthop\fR and
85#	specifies how or where to deliver mail. This is described in
86#	section "RESULT FORMAT".
87# TABLE SEARCH ORDER
88# .ad
89# .fi
90#	With lookups from indexed files such as DB or DBM, or from networked
91#	tables such as NIS, LDAP or SQL, patterns are tried in the order as
92#	listed below:
93# .IP "\fIuser+extension@domain transport\fR:\fInexthop\fR"
94#	Deliver mail for \fIuser+extension@domain\fR through
95#	\fItransport\fR to
96#	\fInexthop\fR.
97# .IP "\fIuser@domain transport\fR:\fInexthop\fR"
98#	Deliver mail for \fIuser@domain\fR through \fItransport\fR to
99#	\fInexthop\fR.
100# .IP "\fIdomain transport\fR:\fInexthop\fR"
101#	Deliver mail for \fIdomain\fR through \fItransport\fR to
102#	\fInexthop\fR.
103# .IP "\fI.domain transport\fR:\fInexthop\fR"
104#	Deliver mail for any subdomain of \fIdomain\fR through
105#	\fItransport\fR to \fInexthop\fR. This applies only when the
106#	string \fBtransport_maps\fR is not listed in the
107#	\fBparent_domain_matches_subdomains\fR configuration setting.
108#	Otherwise, a domain name matches itself and its subdomains.
109# .IP "\fB*\fI transport\fR:\fInexthop\fR"
110#	The special pattern \fB*\fR represents any address (i.e. it
111#	functions as the wild-card pattern, and is unique to Postfix
112#	transport tables).
113# .PP
114#	Note 1: the null recipient address is looked up as
115#	\fB$empty_address_recipient\fR@\fB$myhostname\fR (default:
116#	mailer-daemon@hostname).
117#
118#	Note 2: \fIuser@domain\fR or \fIuser+extension@domain\fR
119#	lookup is available in Postfix 2.0 and later.
120# RESULT FORMAT
121# .ad
122# .fi
123#	The lookup result is of the form \fItransport\fB:\fInexthop\fR.
124#	The \fItransport\fR field specifies a mail delivery transport
125#	such as \fBsmtp\fR or \fBlocal\fR. The \fInexthop\fR field
126#	specifies where and how to deliver mail.
127#
128#	The transport field specifies the name of a mail delivery transport
129#	(the first name of a mail delivery service entry in the Postfix
130#	\fBmaster.cf\fR file).
131#
132#	The nexthop field usually specifies one recipient domain
133#	or hostname. In the case of the Postfix SMTP/LMTP client,
134#	the nexthop field may contain a list of nexthop destinations
135#	separated by comma or whitespace (Postfix 3.5 and later).
136#
137#	The syntax of a nexthop destination is transport dependent.
138#	With SMTP, specify a service on a non-default
139#	port as \fIhost\fR:\fIservice\fR, and disable MX (mail exchanger)
140#	DNS lookups with [\fIhost\fR] or [\fIhost\fR]:\fIport\fR. The [] form
141#	is required when you specify an IP address instead of a hostname.
142#
143#	A null \fItransport\fR and null \fInexthop\fR field means "do
144#	not change": use the delivery transport and nexthop information
145#	that would be used when the entire transport table did not exist.
146#
147#	A non-null \fItransport\fR field with a null \fInexthop\fR field
148#	resets the nexthop information to the recipient domain.
149#
150#	A null \fItransport\fR field with non-null \fInexthop\fR field
151#	does not modify the transport information.
152# EXAMPLES
153# .ad
154# .fi
155#	In order to deliver internal mail directly, while using a
156#	mail relay for all other mail, specify a null entry for
157#	internal destinations (do not change the delivery transport or
158#	the nexthop information) and specify a wildcard for all other
159#	destinations.
160#
161# .nf
162#	     \fB\&my.domain    :\fR
163#	     \fB\&.my.domain   :\fR
164#	     \fB*            smtp:outbound-relay.my.domain\fR
165# .fi
166#
167#	In order to send mail for \fBexample.com\fR and its subdomains
168#	via the \fBuucp\fR transport to the UUCP host named \fBexample\fR:
169#
170# .nf
171#	     \fBexample.com      uucp:example\fR
172#	     \fB\&.example.com     uucp:example\fR
173# .fi
174#
175#	When no nexthop host name is specified, the destination domain
176#	name is used instead. For example, the following directs mail for
177#	\fIuser\fR@\fBexample.com\fR via the \fBslow\fR transport to a mail
178#	exchanger for \fBexample.com\fR.  The \fBslow\fR transport could be
179#	configured to run at most one delivery process at a time:
180#
181# .nf
182#	     \fBexample.com      slow:\fR
183# .fi
184#
185#	When no transport is specified, Postfix uses the transport that
186#	matches the address domain class (see DESCRIPTION
187#	above).  The following sends all mail for \fBexample.com\fR and its
188#	subdomains to host \fBgateway.example.com\fR:
189#
190# .nf
191#	     \fBexample.com      :[gateway.example.com]\fR
192#	     \fB\&.example.com     :[gateway.example.com]\fR
193# .fi
194#
195#	In the above example, the [] suppress MX lookups.
196#	This prevents mail routing loops when your machine is primary MX
197#	host for \fBexample.com\fR.
198#
199#	In the case of delivery via SMTP or LMTP, one may specify
200#	\fIhost\fR:\fIservice\fR instead of just a host:
201#
202# .nf
203#	     \fBexample.com      smtp:bar.example:2025\fR
204# .fi
205#
206#	This directs mail for \fIuser\fR@\fBexample.com\fR to host \fBbar.example\fR
207#	port \fB2025\fR. Instead of a numerical port a symbolic name may be
208#	used. Specify [] around the hostname if MX lookups must be disabled.
209#
210#	Deliveries via SMTP or LMTP support multiple destinations
211#	(Postfix >= 3.5):
212#
213# .nf
214#	     \fBexample.com      smtp:bar.example, foo.example\fR
215# .fi
216#
217#	This tries to deliver to \fBbar.example\fR before trying
218#	to deliver to \fBfoo.example\fR.
219#
220#	The error mailer can be used to bounce mail:
221#
222# .nf
223#	     \fB\&.example.com     error:mail for *.example.com is not deliverable\fR
224# .fi
225#
226#	This causes all mail for \fIuser\fR@\fIanything\fB.example.com\fR
227#	to be bounced.
228# REGULAR EXPRESSION TABLES
229# .ad
230# .fi
231#	This section describes how the table lookups change when the table
232#	is given in the form of regular expressions. For a description of
233#	regular expression lookup table syntax, see \fBregexp_table\fR(5)
234#	or \fBpcre_table\fR(5).
235#
236#	Each pattern is a regular expression that is applied to the entire
237#	address being looked up. Thus, \fIsome.domain.hierarchy\fR is not
238#	looked up via its parent domains,
239#	nor is \fIuser+foo@domain\fR looked up as \fIuser@domain\fR.
240#
241#	Patterns are applied in the order as specified in the table, until a
242#	pattern is found that matches the search string.
243#
244#	The \fBtrivial-rewrite\fR(8) server disallows regular
245#	expression substitution of $1 etc. in regular expression
246#	lookup tables, because that could open a security hole
247#	(Postfix version 2.3 and later).
248# TCP-BASED TABLES
249# .ad
250# .fi
251#	This section describes how the table lookups change when lookups
252#	are directed to a TCP-based server. For a description of the TCP
253#	client/server lookup protocol, see \fBtcp_table\fR(5).
254#	This feature is not available up to and including Postfix version 2.4.
255#
256#	Each lookup operation uses the entire recipient address once.  Thus,
257#	\fIsome.domain.hierarchy\fR is not looked up via its parent domains,
258#	nor is \fIuser+foo@domain\fR looked up as \fIuser@domain\fR.
259#
260#	Results are the same as with indexed file lookups.
261# CONFIGURATION PARAMETERS
262# .ad
263# .fi
264#	The following \fBmain.cf\fR parameters are especially relevant.
265#	The text below provides only a parameter summary. See
266#	\fBpostconf\fR(5) for more details including examples.
267# .IP "\fBempty_address_recipient (MAILER-DAEMON)\fR"
268#	The recipient of mail addressed to the null address.
269# .IP "\fBparent_domain_matches_subdomains (see 'postconf -d' output)\fR"
270#	A list of Postfix features where the pattern "example.com" also
271#	matches subdomains of example.com,
272#	instead of requiring an explicit ".example.com" pattern.
273# .IP "\fBtransport_maps (empty)\fR"
274#	Optional lookup tables with mappings from recipient address to
275#	(message delivery transport, next-hop destination).
276# SEE ALSO
277#	trivial-rewrite(8), rewrite and resolve addresses
278#	master(5), master.cf file format
279#	postconf(5), configuration parameters
280#	postmap(1), Postfix lookup table manager
281# README FILES
282# .ad
283# .fi
284#	Use "\fBpostconf readme_directory\fR" or
285#	"\fBpostconf html_directory\fR" to locate this information.
286# .na
287# .nf
288#	ADDRESS_REWRITING_README, address rewriting guide
289#	DATABASE_README, Postfix lookup table overview
290#	FILTER_README, external content filter
291# LICENSE
292# .ad
293# .fi
294#	The Secure Mailer license must be distributed with this software.
295# AUTHOR(S)
296#	Wietse Venema
297#	IBM T.J. Watson Research
298#	P.O. Box 704
299#	Yorktown Heights, NY 10598, USA
300#
301#	Wietse Venema
302#	Google, Inc.
303#	111 8th Avenue
304#	New York, NY 10011, USA
305#--
306