summaryrefslogtreecommitdiffstats
path: root/html/trivial-rewrite.8.html
blob: 7b1e3e3559d8ede5e93d95f27d00de57b0b7e4d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='stylesheet' type='text/css' href='postfix-doc.css'>
<title> Postfix manual - trivial-rewrite(8) </title>
</head> <body> <pre>
TRIVIAL-REWRITE(8)                                          TRIVIAL-REWRITE(8)

<b>NAME</b>
       trivial-rewrite - Postfix address rewriting and resolving daemon

<b>SYNOPSIS</b>
       <b>trivial-rewrite</b> [generic Postfix daemon options]

<b>DESCRIPTION</b>
       The  <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a>  daemon processes three types of client service
       requests:

       <b>rewrite</b> <i>context address</i>
              Rewrite an address to standard form, according  to  the  address
              rewriting context:

              <b>local</b>  Append  the  domain  names  specified  with  <b>$<a href="postconf.5.html#myorigin">myorigin</a></b> or
                     <b>$<a href="postconf.5.html#mydomain">mydomain</a></b> to incomplete addresses; do  <b><a href="postconf.5.html#swap_bangpath">swap_bangpath</a></b>  and
                     <b><a href="postconf.5.html#allow_percent_hack">allow_percent_hack</a></b>  processing  as  described  below, and
                     strip source routed  addresses  (<i>@site,@site:user@domain</i>)
                     to <i>user@domain</i> form.

              <b>remote</b> Append  the domain name specified with <b>$<a href="postconf.5.html#remote_header_rewrite_domain">remote_header_re</a>-</b>
                     <b><a href="postconf.5.html#remote_header_rewrite_domain">write_domain</a></b>  to  incomplete  addresses.  Otherwise   the
                     result  is identical to that of the <b>local</b> address rewrit-
                     ing context. This prevents  Postfix  from  appending  the
                     local  domain to spam from poorly written remote clients.

       <b>resolve</b> <i>sender address</i>
              Resolve the address to a (<i>transport</i>, <i>nexthop</i>, <i>recipient</i>,  <i>flags</i>)
              quadruple. The meaning of the results is as follows:

              <i>transport</i>
                     The  delivery agent to use. This is the first field of an
                     entry in the <a href="master.5.html"><b>master.cf</b></a> file.

              <i>nexthop</i>
                     The host to send to and optional delivery method informa-
                     tion.

              <i>recipient</i>
                     The  envelope recipient address that is passed on to <i>nex-</i>
                     <i>thop</i>.

              <i>flags</i>  The address class, whether the address requires relaying,
                     whether the address has problems, and whether the request
                     failed.

       <b>verify</b> <i>sender address</i>
              Resolve the address for address verification purposes.

<b>SERVER PROCESS MANAGEMENT</b>
       The <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a> servers run under control by  the  Postfix  <a href="master.8.html">mas-</a>
       <a href="master.8.html">ter(8)</a>  server.   Each  server can handle multiple simultaneous connec-
       tions.  When all servers are busy while a client connects,  the  master
       creates  a new server process, provided that the trivial-rewrite server
       process limit is not exceeded.  Each trivial-rewrite server  terminates
       after  serving  at least <b>$<a href="postconf.5.html#max_use">max_use</a></b> clients of after <b>$<a href="postconf.5.html#max_idle">max_idle</a></b> seconds of
       idle time.

<b>STANDARDS</b>
       None. The command does not interact with the outside world.

<b>SECURITY</b>
       The <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a> daemon is not security sensitive.   By  default,
       this  daemon  does  not talk to remote or local users.  It can run at a
       fixed low privilege in a chrooted environment.

<b>DIAGNOSTICS</b>
       Problems and transactions are logged to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>.

<b>CONFIGURATION PARAMETERS</b>
       On busy mail systems a long time  may  pass  before  a  <a href="postconf.5.html"><b>main.cf</b></a>  change
       affecting  <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a>  is  picked  up. Use the command "<b>postfix</b>
       <b>reload</b>" to speed up a change.

       The text below provides only a parameter summary. See  <a href="postconf.5.html"><b>postconf</b>(5)</a>  for
       more details including examples.

<b>COMPATIBILITY CONTROLS</b>
       <b><a href="postconf.5.html#resolve_dequoted_address">resolve_dequoted_address</a> (yes)</b>
              Resolve  a  recipient  address  safely  instead of correctly, by
              looking inside quotes.

       Available with Postfix version 2.1 and later:

       <b><a href="postconf.5.html#resolve_null_domain">resolve_null_domain</a> (no)</b>
              Resolve an address that ends in the "@" null domain  as  if  the
              local  hostname were specified, instead of rejecting the address
              as invalid.

       Available with Postfix version 2.3 and later:

       <b><a href="postconf.5.html#resolve_numeric_domain">resolve_numeric_domain</a> (no)</b>
              Resolve  "user@ipaddress"  as  "user@[ipaddress]",  instead   of
              rejecting the address as invalid.

       Available with Postfix version 2.5 and later:

       <b><a href="postconf.5.html#allow_min_user">allow_min_user</a> (no)</b>
              Allow  a  sender  or  recipient address to have `-' as the first
              character.

<b>ADDRESS REWRITING CONTROLS</b>
       <b><a href="postconf.5.html#myorigin">myorigin</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
              The domain name that locally-posted mail appears to  come  from,
              and that locally posted mail is delivered to.

       <b><a href="postconf.5.html#allow_percent_hack">allow_percent_hack</a> (yes)</b>
              Enable the rewriting of the form "user%domain" to "user@domain".

       <b><a href="postconf.5.html#append_at_myorigin">append_at_myorigin</a> (yes)</b>
              With locally submitted mail, append the string  "@$<a href="postconf.5.html#myorigin">myorigin</a>"  to
              mail addresses without domain information.

       <b><a href="postconf.5.html#append_dot_mydomain">append_dot_mydomain</a> (Postfix</b> &gt;<b>= 3.0: no, Postfix</b> &lt; <b>3.0: yes)</b>
              With  locally  submitted mail, append the string ".$<a href="postconf.5.html#mydomain">mydomain</a>" to
              addresses that have no ".domain" information.

       <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
              The set of characters that can separate an email address  local-
              part, user name, or a .forward file name from its extension.

       <b><a href="postconf.5.html#swap_bangpath">swap_bangpath</a> (yes)</b>
              Enable the rewriting of "site!user" into "user@site".

       Available in Postfix 2.2 and later:

       <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> (empty)</b>
              Rewrite  or  add  message headers in mail from remote clients if
              the <a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> parameter value  is  non-empty,
              updating  incomplete  addresses with the domain specified in the
              <a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> parameter, and adding missing head-
              ers.

<b>ROUTING CONTROLS</b>
       The  following is applicable to Postfix version 2.0 and later.  Earlier
       versions do not have support for:  <a href="postconf.5.html#virtual_transport">virtual_transport</a>,  <a href="postconf.5.html#relay_transport">relay_transport</a>,
       <a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> or <a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>.

       <b><a href="postconf.5.html#local_transport">local_transport</a> (<a href="local.8.html">local</a>:$<a href="postconf.5.html#myhostname">myhostname</a>)</b>
              The default mail delivery transport and next-hop destination for
              final delivery to domains listed  with  <a href="postconf.5.html#mydestination">mydestination</a>,  and  for
              [ipaddress]   destinations   that   match   $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>  or
              $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>.

       <b><a href="postconf.5.html#virtual_transport">virtual_transport</a> (virtual)</b>
              The default mail delivery transport and next-hop destination for
              final  delivery to domains listed with $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.

       <b><a href="postconf.5.html#relay_transport">relay_transport</a> (relay)</b>
              The default mail delivery transport and next-hop destination for
              the  relay  domain  address  class: recipient domains that match
              $<a href="postconf.5.html#relay_domains">relay_domains</a>.

       <b><a href="postconf.5.html#default_transport">default_transport</a> (smtp)</b>
              The default mail delivery transport and next-hop destination for
              the  default  domain  class: recipient domains that do not match
              $<a href="postconf.5.html#mydestination">mydestination</a>,   $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>,   $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>,   $<a href="postconf.5.html#virtual_alias_domains">vir</a>-
              <a href="postconf.5.html#virtual_alias_domains">tual_alias_domains</a>, $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>, or $<a href="postconf.5.html#relay_domains">relay_domains</a>.

       <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> (see 'postconf -d' output)</b>
              A list of Postfix features where the pattern "example.com"  also
              matches  subdomains  of  example.com,  instead  of  requiring an
              explicit ".example.com" pattern.

       <b><a href="postconf.5.html#relayhost">relayhost</a> (empty)</b>
              The next-hop destination(s) for non-local mail; takes precedence
              over non-<a href="ADDRESS_CLASS_README.html#local_domain_class">local domains</a> in recipient addresses.

       <b><a href="postconf.5.html#transport_maps">transport_maps</a> (empty)</b>
              Optional  lookup  tables with mappings from recipient address to
              (message delivery transport, next-hop destination).

       Available in Postfix version 2.3 and later:

       <b><a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> (empty)</b>
              A sender-dependent override for the global  <a href="postconf.5.html#relayhost">relayhost</a>  parameter
              setting.

       Available in Postfix version 2.5 and later:

       <b><a href="postconf.5.html#empty_address_relayhost_maps_lookup_key">empty_address_relayhost_maps_lookup_key</a> (</b>&lt;&gt;<b>)</b>
              The  <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a>  search string that will be
              used instead of the null sender address.

       Available in Postfix version 2.7 and later:

       <b><a href="postconf.5.html#empty_address_default_transport_maps_lookup_key">empty_address_default_transport_maps_lookup_key</a> (</b>&lt;&gt;<b>)</b>
              The <a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a> search  string  that
              will be used instead of the null sender address.

       <b><a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a> (empty)</b>
              A  sender-dependent  override  for  the global <a href="postconf.5.html#default_transport">default_transport</a>
              parameter setting.

<b>ADDRESS VERIFICATION CONTROLS</b>
       Postfix version 2.1 introduces sender and recipient  address  verifica-
       tion.  This feature is implemented by sending probe email messages that
       are not actually delivered.  By default,  address  verification  probes
       use  the  same  route  as regular mail. To override specific aspects of
       message routing for address verification probes, specify one or more of
       the following:

       <b><a href="postconf.5.html#address_verify_local_transport">address_verify_local_transport</a> ($<a href="postconf.5.html#local_transport">local_transport</a>)</b>
              Overrides the <a href="postconf.5.html#local_transport">local_transport</a> parameter setting for address ver-
              ification probes.

       <b><a href="postconf.5.html#address_verify_virtual_transport">address_verify_virtual_transport</a> ($<a href="postconf.5.html#virtual_transport">virtual_transport</a>)</b>
              Overrides the <a href="postconf.5.html#virtual_transport">virtual_transport</a> parameter  setting  for  address
              verification probes.

       <b><a href="postconf.5.html#address_verify_relay_transport">address_verify_relay_transport</a> ($<a href="postconf.5.html#relay_transport">relay_transport</a>)</b>
              Overrides the <a href="postconf.5.html#relay_transport">relay_transport</a> parameter setting for address ver-
              ification probes.

       <b><a href="postconf.5.html#address_verify_default_transport">address_verify_default_transport</a> ($<a href="postconf.5.html#default_transport">default_transport</a>)</b>
              Overrides the <a href="postconf.5.html#default_transport">default_transport</a> parameter  setting  for  address
              verification probes.

       <b><a href="postconf.5.html#address_verify_relayhost">address_verify_relayhost</a> ($<a href="postconf.5.html#relayhost">relayhost</a>)</b>
              Overrides  the <a href="postconf.5.html#relayhost">relayhost</a> parameter setting for address verifica-
              tion probes.

       <b><a href="postconf.5.html#address_verify_transport_maps">address_verify_transport_maps</a> ($<a href="postconf.5.html#transport_maps">transport_maps</a>)</b>
              Overrides the <a href="postconf.5.html#transport_maps">transport_maps</a> parameter setting for address veri-
              fication probes.

       Available in Postfix version 2.3 and later:

       <b><a href="postconf.5.html#address_verify_sender_dependent_relayhost_maps">address_verify_sender_dependent_relayhost_maps</a>          ($<a href="postconf.5.html#sender_dependent_relayhost_maps">sender_depen</a>-</b>
       <b><a href="postconf.5.html#sender_dependent_relayhost_maps">dent_relayhost_maps</a>)</b>
              Overrides  the <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> parameter setting
              for address verification probes.

       Available in Postfix version 2.7 and later:

       <b><a href="postconf.5.html#address_verify_sender_dependent_default_transport_maps">address_verify_sender_dependent_default_transport_maps</a>  ($<a href="postconf.5.html#sender_dependent_default_transport_maps">sender_depen</a>-</b>
       <b><a href="postconf.5.html#sender_dependent_default_transport_maps">dent_default_transport_maps</a>)</b>
              Overrides the <a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a>  parameter
              setting for address verification probes.

<b>MISCELLANEOUS CONTROLS</b>
       <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
              The  default  location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
              figuration files.

       <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
              How much time a Postfix daemon process  may  take  to  handle  a
              request before it is terminated by a built-in watchdog timer.

       <b><a href="postconf.5.html#empty_address_recipient">empty_address_recipient</a> (MAILER-DAEMON)</b>
              The recipient of mail addressed to the null address.

       <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
              The  time  limit  for  sending  or receiving information over an
              internal communication channel.

       <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
              The maximum amount of time that an idle Postfix  daemon  process
              waits for an incoming connection before terminating voluntarily.

       <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
              The maximal number of incoming connections that a Postfix daemon
              process will service before terminating voluntarily.

       <b><a href="postconf.5.html#relocated_maps">relocated_maps</a> (empty)</b>
              Optional lookup tables with new contact information for users or
              domains that no longer exist.

       <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
              The process ID of a Postfix command or daemon process.

       <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
              The process name of a Postfix command or daemon process.

       <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
              The location of the Postfix top-level queue directory.

       <b><a href="postconf.5.html#show_user_unknown_table_name">show_user_unknown_table_name</a> (yes)</b>
              Display the name of the recipient table in  the  "User  unknown"
              responses.

       <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
              The syslog facility of Postfix logging.

       <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
              A  prefix  that  is  prepended  to  the  process  name in syslog
              records, so that, for example, "smtpd" becomes "prefix/smtpd".

       Available in Postfix version 2.0 and later:

       <b><a href="postconf.5.html#helpful_warnings">helpful_warnings</a> (yes)</b>
              Log warnings about problematic configuration settings, and  pro-
              vide helpful suggestions.

       Available in Postfix 3.3 and later:

       <b><a href="postconf.5.html#service_name">service_name</a> (read-only)</b>
              The <a href="master.5.html">master.cf</a> service name of a Postfix daemon process.

<b>SEE ALSO</b>
       <a href="postconf.5.html">postconf(5)</a>, configuration parameters
       <a href="transport.5.html">transport(5)</a>, transport table format
       <a href="relocated.5.html">relocated(5)</a>, format of the "user has moved" table
       <a href="master.8.html">master(8)</a>, process manager
       <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging
       syslogd(8), system logging

<b>README FILES</b>
       <a href="ADDRESS_CLASS_README.html">ADDRESS_CLASS_README</a>, Postfix address classes howto
       <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VERIFICATION_README</a>, Postfix address verification

<b>LICENSE</b>
       The Secure Mailer license must be distributed with this software.

<b>AUTHOR(S)</b>
       Wietse Venema
       IBM T.J. Watson Research
       P.O. Box 704
       Yorktown Heights, NY 10598, USA

       Wietse Venema
       Google, Inc.
       111 8th Avenue
       New York, NY 10011, USA

                                                            TRIVIAL-REWRITE(8)
</pre> </body> </html>