xref: /netbsd-src/external/ibm-public/postfix/dist/proto/transport (revision 4a6720548cbf2e9325ed049c8a675ae86609f654)
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 a 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
83#	SEARCH ORDER".
84#
85#	The \fIresult\fR is of the form \fItransport:nexthop\fR and
86#	specifies how or where to deliver mail. This is described in
87#	section "RESULT FORMAT".
88# TABLE SEARCH ORDER
89# .ad
90# .fi
91#	With lookups from indexed files such as DB or DBM, or from networked
92#	tables such as NIS, LDAP or SQL, patterns are tried in the order as
93#	listed below:
94# .IP "\fIuser+extension@domain transport\fR:\fInexthop\fR"
95#	Deliver mail for \fIuser+extension@domain\fR through
96#	\fItransport\fR to
97#	\fInexthop\fR.
98# .IP "\fIuser@domain transport\fR:\fInexthop\fR"
99#	Deliver mail for \fIuser@domain\fR through \fItransport\fR to
100#	\fInexthop\fR.
101# .IP "\fIdomain transport\fR:\fInexthop\fR"
102#	Deliver mail for \fIdomain\fR through \fItransport\fR to
103#	\fInexthop\fR.
104# .IP "\fI.domain transport\fR:\fInexthop\fR"
105#	Deliver mail for any subdomain of \fIdomain\fR through
106#	\fItransport\fR to \fInexthop\fR. This applies only when the
107#	string \fBtransport_maps\fR is not listed in the
108#	\fBparent_domain_matches_subdomains\fR configuration setting.
109#	Otherwise, a domain name matches itself and its subdomains.
110# .IP "\fB*\fI transport\fR:\fInexthop\fR"
111#	The special pattern \fB*\fR represents any address (i.e. it
112#	functions as the wild-card pattern, and is unique to Postfix
113#	transport tables).
114# .PP
115#	Note 1: the null recipient address is looked up as
116#	\fB$empty_address_recipient\fR@\fB$myhostname\fR (default:
117#	mailer-daemon@hostname).
118#
119#	Note 2: \fIuser@domain\fR or \fIuser+extension@domain\fR
120#	lookup is available in Postfix 2.0 and later.
121# RESULT FORMAT
122# .ad
123# .fi
124#	The lookup result is of the form \fItransport\fB:\fInexthop\fR.
125#	The \fItransport\fR field specifies a mail delivery transport
126#	such as \fBsmtp\fR or \fBlocal\fR. The \fInexthop\fR field
127#	specifies where and how to deliver mail.
128#
129#	The transport field specifies the name of a mail delivery transport
130#	(the first name of a mail delivery service entry in the Postfix
131#	\fBmaster.cf\fR file).
132#
133#	The nexthop field usually specifies one recipient domain
134#	or hostname. In the case of the Postfix SMTP/LMTP client,
135#	the nexthop field may contain a list of nexthop destinations
136#	separated by comma or whitespace (Postfix 3.5 and later).
137#
138#	The syntax of a nexthop destination is transport dependent.
139#	With SMTP, specify a service on a non-default
140#	port as \fIhost\fR:\fIservice\fR, and disable MX (mail exchanger)
141#	DNS lookups with [\fIhost\fR] or [\fIhost\fR]:\fIport\fR. The [] form
142#	is required when you specify an IP address instead of a hostname.
143#
144#	A null \fItransport\fR and null \fInexthop\fR field means "do
145#	not change": use the delivery transport and nexthop information
146#	that would be used when the entire transport table did not exist.
147#
148#	A non-null \fItransport\fR field with a null \fInexthop\fR field
149#	resets the nexthop information to the recipient domain.
150#
151#	A null \fItransport\fR field with non-null \fInexthop\fR field
152#	does not modify the transport information.
153# EXAMPLES
154# .ad
155# .fi
156#	In order to deliver internal mail directly, while using a
157#	mail relay for all other mail, specify a null entry for
158#	internal destinations (do not change the delivery transport or
159#	the nexthop information) and specify a wildcard for all other
160#	destinations.
161#
162# .nf
163#	     \fB\&my.domain    :\fR
164#	     \fB\&.my.domain   :\fR
165#	     \fB*            smtp:outbound-relay.my.domain\fR
166# .fi
167#
168#	In order to send mail for \fBexample.com\fR and its subdomains
169#	via the \fBuucp\fR transport to the UUCP host named \fBexample\fR:
170#
171# .nf
172#	     \fBexample.com      uucp:example\fR
173#	     \fB\&.example.com     uucp:example\fR
174# .fi
175#
176#	When no nexthop host name is specified, the destination domain
177#	name is used instead. For example, the following directs mail for
178#	\fIuser\fR@\fBexample.com\fR via the \fBslow\fR transport to a mail
179#	exchanger for \fBexample.com\fR.  The \fBslow\fR transport could be
180#	configured to run at most one delivery process at a time:
181#
182# .nf
183#	     \fBexample.com      slow:\fR
184# .fi
185#
186#	When no transport is specified, Postfix uses the transport that
187#	matches the address domain class (see DESCRIPTION
188#	above).  The following sends all mail for \fBexample.com\fR and its
189#	subdomains to host \fBgateway.example.com\fR:
190#
191# .nf
192#	     \fBexample.com      :[gateway.example.com]\fR
193#	     \fB\&.example.com     :[gateway.example.com]\fR
194# .fi
195#
196#	In the above example, the [] suppress MX lookups.
197#	This prevents mail routing loops when your machine is primary MX
198#	host for \fBexample.com\fR.
199#
200#	In the case of delivery via SMTP or LMTP, one may specify
201#	\fIhost\fR:\fIservice\fR instead of just a host:
202#
203# .nf
204#	     \fBexample.com      smtp:bar.example:2025\fR
205# .fi
206#
207#	This directs mail for \fIuser\fR@\fBexample.com\fR to host \fBbar.example\fR
208#	port \fB2025\fR. Instead of a numerical port a symbolic name may be
209#	used. Specify [] around the hostname if MX lookups must be disabled.
210#
211#	Deliveries via SMTP or LMTP support multiple destinations
212#	(Postfix >= 3.5):
213#
214# .nf
215#	     \fBexample.com      smtp:bar.example, foo.example\fR
216# .fi
217#
218#	This tries to deliver to \fBbar.example\fR before trying
219#	to deliver to \fBfoo.example\fR.
220#
221#	The error mailer can be used to bounce mail:
222#
223# .nf
224#	     \fB\&.example.com     error:mail for *.example.com is not deliverable\fR
225# .fi
226#
227#	This causes all mail for \fIuser\fR@\fIanything\fB.example.com\fR
228#	to be bounced.
229# REGULAR EXPRESSION TABLES
230# .ad
231# .fi
232#	This section describes how the table lookups change when the table
233#	is given in the form of regular expressions. For a description of
234#	regular expression lookup table syntax, see \fBregexp_table\fR(5)
235#	or \fBpcre_table\fR(5).
236#
237#	Each pattern is a regular expression that is applied to the entire
238#	address being looked up. Thus, \fIsome.domain.hierarchy\fR is not
239#	looked up via its parent domains,
240#	nor is \fIuser+foo@domain\fR looked up as \fIuser@domain\fR.
241#
242#	Patterns are applied in the order as specified in the table, until a
243#	pattern is found that matches the search string.
244#
245#	The \fBtrivial-rewrite\fR(8) server disallows regular
246#	expression substitution of $1 etc. in regular expression
247#	lookup tables, because that could open a security hole
248#	(Postfix version 2.3 and later).
249# TCP-BASED TABLES
250# .ad
251# .fi
252#	This section describes how the table lookups change when lookups
253#	are directed to a TCP-based server. For a description of the TCP
254#	client/server lookup protocol, see \fBtcp_table\fR(5).
255#	This feature is not available up to and including Postfix version 2.4.
256#
257#	Each lookup operation uses the entire recipient address once.  Thus,
258#	\fIsome.domain.hierarchy\fR is not looked up via its parent domains,
259#	nor is \fIuser+foo@domain\fR looked up as \fIuser@domain\fR.
260#
261#	Results are the same as with indexed file lookups.
262# CONFIGURATION PARAMETERS
263# .ad
264# .fi
265#	The following \fBmain.cf\fR parameters are especially relevant.
266#	The text below provides only a parameter summary. See
267#	\fBpostconf\fR(5) for more details including examples.
268# .IP "\fBempty_address_recipient (MAILER-DAEMON)\fR"
269#	The recipient of mail addressed to the null address.
270# .IP "\fBparent_domain_matches_subdomains (see 'postconf -d' output)\fR"
271#	A list of Postfix features where the pattern "example.com" also
272#	matches subdomains of example.com,
273#	instead of requiring an explicit ".example.com" pattern.
274# .IP "\fBtransport_maps (empty)\fR"
275#	Optional lookup tables with mappings from recipient address to
276#	(message delivery transport, next-hop destination).
277# SEE ALSO
278#	trivial-rewrite(8), rewrite and resolve addresses
279#	master(5), master.cf file format
280#	postconf(5), configuration parameters
281#	postmap(1), Postfix lookup table manager
282# README FILES
283# .ad
284# .fi
285#	Use "\fBpostconf readme_directory\fR" or
286#	"\fBpostconf html_directory\fR" to locate this information.
287# .na
288# .nf
289#	ADDRESS_REWRITING_README, address rewriting guide
290#	DATABASE_README, Postfix lookup table overview
291#	FILTER_README, external content filter
292# LICENSE
293# .ad
294# .fi
295#	The Secure Mailer license must be distributed with this software.
296# AUTHOR(S)
297#	Wietse Venema
298#	IBM T.J. Watson Research
299#	P.O. Box 704
300#	Yorktown Heights, NY 10598, USA
301#
302#	Wietse Venema
303#	Google, Inc.
304#	111 8th Avenue
305#	New York, NY 10011, USA
306#--
307