1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3<html> <head> 4<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> 5<title> Postfix manual - trivial-rewrite(8) </title> 6</head> <body> <pre> 7TRIVIAL-REWRITE(8) TRIVIAL-REWRITE(8) 8 9<b>NAME</b> 10 trivial-rewrite - Postfix address rewriting and resolving daemon 11 12<b>SYNOPSIS</b> 13 <b>trivial-rewrite</b> [generic Postfix daemon options] 14 15<b>DESCRIPTION</b> 16 The <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a> daemon processes three types of client service 17 requests: 18 19 <b>rewrite</b> <i>context address</i> 20 Rewrite an address to standard form, according to the address 21 rewriting context: 22 23 <b>local</b> Append the domain names specified with <b>$<a href="postconf.5.html#myorigin">myorigin</a></b> or 24 <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 25 <b><a href="postconf.5.html#allow_percent_hack">allow_percent_hack</a></b> processing as described below, and 26 strip source routed addresses (<i>@site,@site:user@domain</i>) 27 to <i>user@domain</i> form. 28 29 <b>remote</b> Append the domain name specified with <b>$<a href="postconf.5.html#remote_header_rewrite_domain">remote_header_re</a>-</b> 30 <b><a href="postconf.5.html#remote_header_rewrite_domain">write_domain</a></b> to incomplete addresses. Otherwise the 31 result is identical to that of the <b>local</b> address rewrit- 32 ing context. This prevents Postfix from appending the 33 local domain to spam from poorly written remote clients. 34 35 <b>resolve</b> <i>sender address</i> 36 Resolve the address to a (<i>transport</i>, <i>nexthop</i>, <i>recipient</i>, <i>flags</i>) 37 quadruple. The meaning of the results is as follows: 38 39 <i>transport</i> 40 The delivery agent to use. This is the first field of an 41 entry in the <a href="master.5.html"><b>master.cf</b></a> file. 42 43 <i>nexthop</i> 44 The host to send to and optional delivery method informa- 45 tion. 46 47 <i>recipient</i> 48 The envelope recipient address that is passed on to <i>nex-</i> 49 <i>thop</i>. 50 51 <i>flags</i> The address class, whether the address requires relaying, 52 whether the address has problems, and whether the request 53 failed. 54 55 <b>verify</b> <i>sender address</i> 56 Resolve the address for address verification purposes. 57 58<b>SERVER PROCESS MANAGEMENT</b> 59 The <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a> servers run under control by the Postfix master 60 server. Each server can handle multiple simultaneous connections. 61 When all servers are busy while a client connects, the master creates a 62 new server process, provided that the trivial-rewrite server process 63 limit is not exceeded. Each trivial-rewrite server terminates after 64 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 65 time. 66 67<b>STANDARDS</b> 68 None. The command does not interact with the outside world. 69 70<b>SECURITY</b> 71 The <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a> daemon is not security sensitive. By default, 72 this daemon does not talk to remote or local users. It can run at a 73 fixed low privilege in a chrooted environment. 74 75<b>DIAGNOSTICS</b> 76 Problems and transactions are logged to <b>syslogd</b>(8). 77 78<b>CONFIGURATION PARAMETERS</b> 79 On busy mail systems a long time may pass before a <a href="postconf.5.html"><b>main.cf</b></a> change 80 affecting <a href="trivial-rewrite.8.html"><b>trivial-rewrite</b>(8)</a> is picked up. Use the command "<b>postfix</b> 81 <b>reload</b>" to speed up a change. 82 83 The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for 84 more details including examples. 85 86<b>COMPATIBILITY CONTROLS</b> 87 <b><a href="postconf.5.html#resolve_dequoted_address">resolve_dequoted_address</a> (yes)</b> 88 Resolve a recipient address safely instead of correctly, by 89 looking inside quotes. 90 91 Available with Postfix version 2.1 and later: 92 93 <b><a href="postconf.5.html#resolve_null_domain">resolve_null_domain</a> (no)</b> 94 Resolve an address that ends in the "@" null domain as if the 95 local hostname were specified, instead of rejecting the address 96 as invalid. 97 98 Available with Postfix version 2.3 and later: 99 100 <b><a href="postconf.5.html#resolve_numeric_domain">resolve_numeric_domain</a> (no)</b> 101 Resolve "user@ipaddress" as "user@[ipaddress]", instead of 102 rejecting the address as invalid. 103 104 Available with Postfix version 2.5 and later: 105 106 <b><a href="postconf.5.html#allow_min_user">allow_min_user</a> (no)</b> 107 Allow a sender or recipient address to have `-' as the first 108 character. 109 110<b>ADDRESS REWRITING CONTROLS</b> 111 <b><a href="postconf.5.html#myorigin">myorigin</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b> 112 The domain name that locally-posted mail appears to come from, 113 and that locally posted mail is delivered to. 114 115 <b><a href="postconf.5.html#allow_percent_hack">allow_percent_hack</a> (yes)</b> 116 Enable the rewriting of the form "user%domain" to "user@domain". 117 118 <b><a href="postconf.5.html#append_at_myorigin">append_at_myorigin</a> (yes)</b> 119 With locally submitted mail, append the string "@$<a href="postconf.5.html#myorigin">myorigin</a>" to 120 mail addresses without domain information. 121 122 <b><a href="postconf.5.html#append_dot_mydomain">append_dot_mydomain</a> (yes)</b> 123 With locally submitted mail, append the string ".$<a href="postconf.5.html#mydomain">mydomain</a>" to 124 addresses that have no ".domain" information. 125 126 <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b> 127 The set of characters that can separate a user name from its 128 extension (example: user+foo), or a .forward file name from its 129 extension (example: .forward+foo). 130 131 <b><a href="postconf.5.html#swap_bangpath">swap_bangpath</a> (yes)</b> 132 Enable the rewriting of "site!user" into "user@site". 133 134 Available in Postfix 2.2 and later: 135 136 <b><a href="postconf.5.html#remote_header_rewrite_domain">remote_header_rewrite_domain</a> (empty)</b> 137 Don't rewrite message headers from remote clients at all when 138 this parameter is empty; otherwise, rewrite message headers and 139 append the specified domain name to incomplete addresses. 140 141<b>ROUTING CONTROLS</b> 142 The following is applicable to Postfix version 2.0 and later. Earlier 143 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>, 144 <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>. 145 146 <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> 147 The default mail delivery transport and next-hop destination for 148 final delivery to domains listed with <a href="postconf.5.html#mydestination">mydestination</a>, and for 149 [ipaddress] destinations that match $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or 150 $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>. 151 152 <b><a href="postconf.5.html#virtual_transport">virtual_transport</a> (virtual)</b> 153 The default mail delivery transport and next-hop destination for 154 final delivery to domains listed with $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>. 155 156 <b><a href="postconf.5.html#relay_transport">relay_transport</a> (relay)</b> 157 The default mail delivery transport and next-hop destination for 158 remote delivery to domains listed with $<a href="postconf.5.html#relay_domains">relay_domains</a>. 159 160 <b><a href="postconf.5.html#default_transport">default_transport</a> (smtp)</b> 161 The default mail delivery transport and next-hop destination for 162 destinations that do not match $<a href="postconf.5.html#mydestination">mydestination</a>, $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>, 163 $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>, $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a>, $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mail</a>- 164 <a href="postconf.5.html#virtual_mailbox_domains">box_domains</a>, or $<a href="postconf.5.html#relay_domains">relay_domains</a>. 165 166 <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> (see 'postconf -d' output)</b> 167 What Postfix features match subdomains of "domain.tld" automati- 168 cally, instead of requiring an explicit ".domain.tld" pattern. 169 170 <b><a href="postconf.5.html#relayhost">relayhost</a> (empty)</b> 171 The next-hop destination of non-local mail; overrides non-local 172 domains in recipient addresses. 173 174 <b><a href="postconf.5.html#transport_maps">transport_maps</a> (empty)</b> 175 Optional lookup tables with mappings from recipient address to 176 (message delivery transport, next-hop destination). 177 178 Available in Postfix version 2.3 and later: 179 180 <b><a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> (empty)</b> 181 A sender-dependent override for the global <a href="postconf.5.html#relayhost">relayhost</a> parameter 182 setting. 183 184 Available in Postfix version 2.5 and later: 185 186 <b><a href="postconf.5.html#empty_address_relayhost_maps_lookup_key">empty_address_relayhost_maps_lookup_key</a> (</b><><b>)</b> 187 The <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> search string that will be 188 used instead of the null sender address. 189 190 Available in Postfix version 2.7 and later: 191 192 <b><a href="postconf.5.html#empty_address_default_transport_maps_lookup_key">empty_address_default_transport_maps_lookup_key</a> (</b><><b>)</b> 193 The <a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a> search string that 194 will be used instead of the null sender address. 195 196 <b><a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a> (empty)</b> 197 A sender-dependent override for the global <a href="postconf.5.html#default_transport">default_transport</a> 198 parameter setting. 199 200<b>ADDRESS VERIFICATION CONTROLS</b> 201 Postfix version 2.1 introduces sender and recipient address verifica- 202 tion. This feature is implemented by sending probe email messages that 203 are not actually delivered. By default, address verification probes 204 use the same route as regular mail. To override specific aspects of 205 message routing for address verification probes, specify one or more of 206 the following: 207 208 <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> 209 Overrides the <a href="postconf.5.html#local_transport">local_transport</a> parameter setting for address ver- 210 ification probes. 211 212 <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> 213 Overrides the <a href="postconf.5.html#virtual_transport">virtual_transport</a> parameter setting for address 214 verification probes. 215 216 <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> 217 Overrides the <a href="postconf.5.html#relay_transport">relay_transport</a> parameter setting for address ver- 218 ification probes. 219 220 <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> 221 Overrides the <a href="postconf.5.html#default_transport">default_transport</a> parameter setting for address 222 verification probes. 223 224 <b><a href="postconf.5.html#address_verify_relayhost">address_verify_relayhost</a> ($<a href="postconf.5.html#relayhost">relayhost</a>)</b> 225 Overrides the <a href="postconf.5.html#relayhost">relayhost</a> parameter setting for address verifica- 226 tion probes. 227 228 <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> 229 Overrides the <a href="postconf.5.html#transport_maps">transport_maps</a> parameter setting for address veri- 230 fication probes. 231 232 Available in Postfix version 2.3 and later: 233 234 <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> 235 <b><a href="postconf.5.html#sender_dependent_relayhost_maps">dent_relayhost_maps</a>)</b> 236 Overrides the <a href="postconf.5.html#sender_dependent_relayhost_maps">sender_dependent_relayhost_maps</a> parameter setting 237 for address verification probes. 238 239 Available in Postfix version 2.7 and later: 240 241 <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> 242 <b><a href="postconf.5.html#sender_dependent_default_transport_maps">dent_default_transport_maps</a>)</b> 243 Overrides the <a href="postconf.5.html#sender_dependent_default_transport_maps">sender_dependent_default_transport_maps</a> parameter 244 setting for address verification probes. 245 246<b>MISCELLANEOUS CONTROLS</b> 247 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 248 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 249 figuration files. 250 251 <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b> 252 How much time a Postfix daemon process may take to handle a 253 request before it is terminated by a built-in watchdog timer. 254 255 <b><a href="postconf.5.html#empty_address_recipient">empty_address_recipient</a> (MAILER-DAEMON)</b> 256 The recipient of mail addressed to the null address. 257 258 <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b> 259 The time limit for sending or receiving information over an 260 internal communication channel. 261 262 <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b> 263 The maximum amount of time that an idle Postfix daemon process 264 waits for an incoming connection before terminating voluntarily. 265 266 <b><a href="postconf.5.html#max_use">max_use</a> (100)</b> 267 The maximal number of incoming connections that a Postfix daemon 268 process will service before terminating voluntarily. 269 270 <b><a href="postconf.5.html#relocated_maps">relocated_maps</a> (empty)</b> 271 Optional lookup tables with new contact information for users or 272 domains that no longer exist. 273 274 <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b> 275 The process ID of a Postfix command or daemon process. 276 277 <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b> 278 The process name of a Postfix command or daemon process. 279 280 <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b> 281 The location of the Postfix top-level queue directory. 282 283 <b><a href="postconf.5.html#show_user_unknown_table_name">show_user_unknown_table_name</a> (yes)</b> 284 Display the name of the recipient table in the "User unknown" 285 responses. 286 287 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 288 The syslog facility of Postfix logging. 289 290 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 291 The mail system name that is prepended to the process name in 292 syslog records, so that "smtpd" becomes, for example, "post- 293 fix/smtpd". 294 295 Available in Postfix version 2.0 and later: 296 297 <b><a href="postconf.5.html#helpful_warnings">helpful_warnings</a> (yes)</b> 298 Log warnings about problematic configuration settings, and pro- 299 vide helpful suggestions. 300 301<b>SEE ALSO</b> 302 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 303 <a href="transport.5.html">transport(5)</a>, transport table format 304 <a href="relocated.5.html">relocated(5)</a>, format of the "user has moved" table 305 <a href="master.8.html">master(8)</a>, process manager 306 syslogd(8), system logging 307 308<b>README FILES</b> 309 <a href="ADDRESS_CLASS_README.html">ADDRESS_CLASS_README</a>, Postfix address classes howto 310 <a href="ADDRESS_VERIFICATION_README.html">ADDRESS_VERIFICATION_README</a>, Postfix address verification 311 312<b>LICENSE</b> 313 The Secure Mailer license must be distributed with this software. 314 315<b>AUTHOR(S)</b> 316 Wietse Venema 317 IBM T.J. Watson Research 318 P.O. Box 704 319 Yorktown Heights, NY 10598, USA 320 321 TRIVIAL-REWRITE(8) 322</pre> </body> </html> 323