xref: /netbsd-src/external/ibm-public/postfix/dist/proto/transport (revision fdd524d4ccd2bb0c6f67401e938dabf773eb0372)
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 interpretation of the nexthop field is transport
133#	dependent. In the case of SMTP, specify a service on a non-default
134#	port as \fIhost\fR:\fIservice\fR, and disable MX (mail exchanger)
135#	DNS lookups with [\fIhost\fR] or [\fIhost\fR]:\fIport\fR. The [] form
136#	is required when you specify an IP address instead of a hostname.
137#
138#	A null \fItransport\fR and null \fInexthop\fR result means "do
139#	not change": use the delivery transport and nexthop information
140#	that would be used when the entire transport table did not exist.
141#
142#	A non-null \fItransport\fR field with a null \fInexthop\fR field
143#	resets the nexthop information to the recipient domain.
144#
145#	A null \fItransport\fR field with non-null \fInexthop\fR field
146#	does not modify the transport information.
147# EXAMPLES
148# .ad
149# .fi
150#	In order to deliver internal mail directly, while using a
151#	mail relay for all other mail, specify a null entry for
152#	internal destinations (do not change the delivery transport or
153#	the nexthop information) and specify a wildcard for all other
154#	destinations.
155#
156# .nf
157#	     \fB\&my.domain    :\fR
158#	     \fB\&.my.domain   :\fR
159#	     \fB*            smtp:outbound-relay.my.domain\fR
160# .fi
161#
162#	In order to send mail for \fBexample.com\fR and its subdomains
163#	via the \fBuucp\fR transport to the UUCP host named \fBexample\fR:
164#
165# .nf
166#	     \fBexample.com      uucp:example\fR
167#	     \fB\&.example.com     uucp:example\fR
168# .fi
169#
170#	When no nexthop host name is specified, the destination domain
171#	name is used instead. For example, the following directs mail for
172#	\fIuser\fR@\fBexample.com\fR via the \fBslow\fR transport to a mail
173#	exchanger for \fBexample.com\fR.  The \fBslow\fR transport could be
174#	configured to run at most one delivery process at a time:
175#
176# .nf
177#	     \fBexample.com      slow:\fR
178# .fi
179#
180#	When no transport is specified, Postfix uses the transport that
181#	matches the address domain class (see DESCRIPTION
182#	above).  The following sends all mail for \fBexample.com\fR and its
183#	subdomains to host \fBgateway.example.com\fR:
184#
185# .nf
186#	     \fBexample.com      :[gateway.example.com]\fR
187#	     \fB\&.example.com     :[gateway.example.com]\fR
188# .fi
189#
190#	In the above example, the [] suppress MX lookups.
191#	This prevents mail routing loops when your machine is primary MX
192#	host for \fBexample.com\fR.
193#
194#	In the case of delivery via SMTP, one may specify
195#	\fIhostname\fR:\fIservice\fR instead of just a host:
196#
197# .nf
198#	     \fBexample.com      smtp:bar.example:2025\fR
199# .fi
200#
201#	This directs mail for \fIuser\fR@\fBexample.com\fR to host \fBbar.example\fR
202#	port \fB2025\fR. Instead of a numerical port a symbolic name may be
203#	used. Specify [] around the hostname if MX lookups must be disabled.
204#
205#	The error mailer can be used to bounce mail:
206#
207# .nf
208#	     \fB\&.example.com     error:mail for *.example.com is not deliverable\fR
209# .fi
210#
211#	This causes all mail for \fIuser\fR@\fIanything\fB.example.com\fR
212#	to be bounced.
213# REGULAR EXPRESSION TABLES
214# .ad
215# .fi
216#	This section describes how the table lookups change when the table
217#	is given in the form of regular expressions. For a description of
218#	regular expression lookup table syntax, see \fBregexp_table\fR(5)
219#	or \fBpcre_table\fR(5).
220#
221#	Each pattern is a regular expression that is applied to the entire
222#	address being looked up. Thus, \fIsome.domain.hierarchy\fR is not
223#	looked up via its parent domains,
224#	nor is \fIuser+foo@domain\fR looked up as \fIuser@domain\fR.
225#
226#	Patterns are applied in the order as specified in the table, until a
227#	pattern is found that matches the search string.
228#
229#	The \fBtrivial-rewrite\fR(8) server disallows regular
230#	expression substitution of $1 etc. in regular expression
231#	lookup tables, because that could open a security hole
232#	(Postfix version 2.3 and later).
233# TCP-BASED TABLES
234# .ad
235# .fi
236#	This section describes how the table lookups change when lookups
237#	are directed to a TCP-based server. For a description of the TCP
238#	client/server lookup protocol, see \fBtcp_table\fR(5).
239#	This feature is not available up to and including Postfix version 2.4.
240#
241#	Each lookup operation uses the entire recipient address once.  Thus,
242#	\fIsome.domain.hierarchy\fR is not looked up via its parent domains,
243#	nor is \fIuser+foo@domain\fR looked up as \fIuser@domain\fR.
244#
245#	Results are the same as with indexed file lookups.
246# CONFIGURATION PARAMETERS
247# .ad
248# .fi
249#	The following \fBmain.cf\fR parameters are especially relevant.
250#	The text below provides only a parameter summary. See
251#	\fBpostconf\fR(5) for more details including examples.
252# .IP \fBempty_address_recipient\fR
253#	The address that is looked up instead of the null sender address.
254# .IP \fBparent_domain_matches_subdomains\fR
255#	List of Postfix features that use \fIdomain.tld\fR patterns
256#	to match \fIsub.domain.tld\fR (as opposed to
257#	requiring \fI.domain.tld\fR patterns).
258# .IP \fBtransport_maps\fR
259#	List of transport lookup tables.
260# SEE ALSO
261#	trivial-rewrite(8), rewrite and resolve addresses
262#	master(5), master.cf file format
263#	postconf(5), configuration parameters
264#	postmap(1), Postfix lookup table manager
265# README FILES
266# .ad
267# .fi
268#	Use "\fBpostconf readme_directory\fR" or
269#	"\fBpostconf html_directory\fR" to locate this information.
270# .na
271# .nf
272#	ADDRESS_REWRITING_README, address rewriting guide
273#	DATABASE_README, Postfix lookup table overview
274#	FILTER_README, external content filter
275# LICENSE
276# .ad
277# .fi
278#	The Secure Mailer license must be distributed with this software.
279# AUTHOR(S)
280#	Wietse Venema
281#	IBM T.J. Watson Research
282#	P.O. Box 704
283#	Yorktown Heights, NY 10598, USA
284#--
285