TRIVIAL-REWRITE(8)
β¨ TRIVIAL-REWRITE(8) β¨
okay bestie, gather round, because we're talking about trivial-rewrite, the Postfix address rewriting and resolving daemon π she lives in the System Manager's Manual section of the Unix manual, section 8, and she is so much cooler than her name makes her sound. no cap.
πΈ NAME πΈ
trivial-rewrite β the Postfix address rewriting and resolving daemon. she rewrites addresses, she resolves addresses, she does it all. main character energy fr.
π¦ SYNOPSIS π¦
trivial-rewrite [generic Postfix daemon options]
that's it. that's the whole vibe. you hand her the generic Postfix daemon options and she handles the rest π«Ά
π DESCRIPTION π
so the trivial-rewrite(8) daemon processes three types of client service requests. three. a little trio. iconic honestly:
rewritecontext address β rewrite an address into standard formresolvesender address β resolve the address into a quadrupleverifysender address β resolve the address for address verification purposes
let's break each one down, bestie, because they all hit different:
rewrite context address
Rewrite an address to standard form, according to the address rewriting context. and the contexts are:
localβ Append the domain names specified with$myoriginor$mydomainto incomplete addresses. Also doswap_bangpathandallow_percent_hackprocessing as described below, and strip source routed addresses (@site,@site:user@domain) down touser@domainform. πremoteβ Append the domain name specified with$remote_header_rewrite_domainto incomplete addresses. Otherwise the result is identical to that of thelocaladdress rewriting context. The whole point of this one is to prevent Postfix from appending the local domain to spam from poorly written remote clients π yes bestie, it's a whole anti-spam moment.
resolve sender address
Resolve the address to a (transport, nexthop, recipient, flags) quadruple. yes, four things. a little quad squad. the meaning of the results goes like this:
transportβ The delivery agent to use. This is the first field of an entry in themaster.cffile. πnexthopβ The host to send to and optional delivery method information.recipientβ The envelope recipient address that is passed on tonexthop.flagsβ The address class, whether the address requires relaying, whether the address has problems, and whether the request failed. so basically the whole status report π
verify sender address
Resolve the address for address verification purposes. short, sweet, to the point. periodt.
π SERVER PROCESS MANAGEMENT π
okay so here's how the server side works:
The trivial-rewrite(8) servers run under control by the Postfix master(8) server. Each server can handle multiple simultaneous connections at once β she's a multitasker, we love that for her π
When all servers are busy while a client connects, the master creates a new server process β but only provided that the trivial-rewrite server process limit is not exceeded. there's a limit bestie, don't push her.
Each trivial-rewrite server terminates after serving at least $max_use clients, or after $max_idle seconds of idle time. so she clocks out either way π
β STANDARDS β
None. The command does not interact with the outside world. she's an introvert. she stays home. respect it π«Ά
π SECURITY π
The trivial-rewrite(8) daemon is not security sensitive. By default, this daemon does not talk to remote or local users. and here's the slay part: it can run at a fixed low privilege in a chrooted environment. safe, contained, unbothered π
π DIAGNOSTICS π
Problems and transactions are logged to syslogd(8) or postlogd(8). so if something's weird, check the logs, bestie, the receipts are right there.
π§ CONFIGURATION PARAMETERS π§
heads up: on busy mail systems, a long time may pass before amain.cfchange affectingtrivial-rewrite(8)is picked up. use the commandpostfix reloadto speed up a change. you're welcome. π«Ά
The text below provides only a parameter summary. See postconf(5) for more details including examples.
COMPATIBILITY CONTROLS
resolve_dequoted_address(yes) β Resolve a recipient address safely instead of correctly, by looking inside quotes. yes bestie, "safely instead of correctly" is the actual vibe of this option, I don't make the rules.
Available with Postfix version 2.1 and later:
resolve_null_domain(no) β 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:
resolve_numeric_domain(no) β Resolve"user@ipaddress"as"user@[ipaddress]", instead of rejecting the address as invalid.
Available with Postfix version 2.5 and later:
allow_min_user(no) β Allow a sender or recipient address to have-as the first character. yes really, just the hyphen. living dangerously.
ADDRESS REWRITING CONTROLS
myorigin($myhostname) β The domain name that locally-posted mail appears to come from, and that locally posted mail is delivered to.allow_percent_hack(yes) β Enable the rewriting of the form"user%domain"to"user@domain".append_at_myorigin(yes) β With locally submitted mail, append the string"@$myorigin"to mail addresses without domain information.append_dot_mydomain(Postfix >= 3.0: no, Postfix < 3.0: yes) β With locally submitted mail, append the string".$mydomain"to addresses that have no".domain"information.recipient_delimiter(empty) β The set of characters that can separate an email address localpart, user name, or a.forwardfile name from its extension.swap_bangpath(yes) β Enable the rewriting of"site!user"into"user@site".
Available in Postfix 2.2 and later:
remote_header_rewrite_domain(empty) β Rewrite or add message headers in mail from remote clients if theremote_header_rewrite_domainparameter value is non-empty, updating incomplete addresses with the domain specified in theremote_header_rewrite_domainparameter, and adding missing headers.
ROUTING CONTROLS
The following is applicable to Postfix version 2.0 and later. Earlier versions do not have support for: virtual_transport, relay_transport, virtual_alias_domains, virtual_mailbox_domains or proxy_interfaces. so if you're on something ancient, bestie, this section is not for you π
local_transport(local:$myhostname) β The default mail delivery transport and next-hop destination for final delivery to domains listed withmydestination, and for[ipaddress]destinations that match$inet_interfacesor$proxy_interfaces.virtual_transport(virtual) β The default mail delivery transport and next-hop destination for final delivery to domains listed with$virtual_mailbox_domains.relay_transport(relay) β The default mail delivery transport and next-hop destination for the relay domain address class: recipient domains that match$relay_domains.default_transport(smtp) β The default mail delivery transport and next-hop destination for the default domain class: recipient domains that do not match$mydestination,$inet_interfaces,$proxy_interfaces,$virtual_alias_domains,$virtual_mailbox_domains, or$relay_domains.parent_domain_matches_subdomains(see'postconf -d'output) β A list of Postfix features where the pattern"example.com"also matches subdomains ofexample.com, instead of requiring an explicit".example.com"pattern.relayhost(empty) β The next-hop destination(s) for non-local mail; takes precedence over non-local domains in recipient addresses.transport_maps(empty) β Optional lookup tables with mappings from recipient address to (message delivery transport, next-hop destination).
Available in Postfix version 2.3 and later:
sender_dependent_relayhost_maps(empty) β A sender-dependent override for the globalrelayhostparameter setting.
Available in Postfix version 2.5 and later:
empty_address_relayhost_maps_lookup_key(<>) β Thesender_dependent_relayhost_mapssearch string that will be used instead of the null sender address.
Available in Postfix version 2.7 and later:
empty_address_default_transport_maps_lookup_key(<>) β Thesender_dependent_default_transport_mapssearch string that will be used instead of the null sender address.sender_dependent_default_transport_maps(empty) β A sender-dependent override for the globaldefault_transportparameter setting.
ADDRESS VERIFICATION CONTROLS
Postfix version 2.1 introduces sender and recipient address verification. This feature is implemented by sending probe email messages that are not actually delivered π (yes, she's sending fake mail to check if the real mail would work, it's giving undercover).
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:
address_verify_local_transport($local_transport) β Overrides thelocal_transportparameter setting for address verification probes.address_verify_virtual_transport($virtual_transport) β Overrides thevirtual_transportparameter setting for address verification probes.address_verify_relay_transport($relay_transport) β Overrides therelay_transportparameter setting for address verification probes.address_verify_default_transport($default_transport) β Overrides thedefault_transportparameter setting for address verification probes.address_verify_relayhost($relayhost) β Overrides therelayhostparameter setting for address verification probes.address_verify_transport_maps($transport_maps) β Overrides thetransport_mapsparameter setting for address verification probes.
Available in Postfix version 2.3 and later:
address_verify_sender_dependent_relayhost_maps($sender_dependent_relayhost_maps) β Overrides thesender_dependent_relayhost_mapsparameter setting for address verification probes.
Available in Postfix version 2.7 and later:
address_verify_sender_dependent_default_transport_maps($sender_dependent_default_transport_maps) β Overrides thesender_dependent_default_transport_mapsparameter setting for address verification probes.
β¨ MISCELLANEOUS CONTROLS β¨
okay bestie, this is the grab-bag section where all the random-but-important knobs live. let's get into it. π
config_directory(seepostconf -doutput) β the default location of the Postfixmain.cfandmaster.cfconfiguration files. lowkey essential, fr.daemon_timeout(18000s) β how much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. so if it's taking too long, the watchdog says "not today" and ends it. π€empty_address_recipient(MAILER-DAEMON) β the recipient of mail addressed to the null address. yes, even the void gets a forwarding address. πipc_timeout(3600s) β the time limit for sending or receiving information over an internal communication channel. basically the patience timer for internal chats. β³max_idle(100s) β the maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily. it's like, "i'll wait 100 seconds, but then i'm out." πͺmax_use(100) β the maximal number of incoming connections that a Postfix daemon process will service before terminating voluntarily. so after 100 connections, it dips. iconic exit strategy. πrelocated_maps(empty) β optional lookup tables with new contact information for users or domains that no longer exist. it's the "i moved, here's my new address" table. πββοΈprocess_id(read-only) β the process ID of a Postfix command or daemon process. you can look but you can't touch. πprocess_name(read-only) β the process name of a Postfix command or daemon process. also read-only, so just admire it. β¨queue_directory(seepostconf -doutput) β the location of the Postfix top-level queue directory. where all the mail waits its turn. π¬show_user_unknown_table_name(yes) β display the name of the recipient table in the "User unknown" responses. so when someone doesn't exist, you get the receipts. π§Ύsyslog_facility(mail) β the syslog facility of Postfix logging. it's giving "mail" energy in your syslogs. πsyslog_name(seepostconf -doutput) β a prefix that is prepended to the process name in syslog records, so that, for example,"smtpd"becomes"prefix/smtpd". it's like a last name for your process in the logs. π·οΈ
Available in Postfix version 2.0 and later:
helpful_warnings(yes) β log warnings about problematic configuration settings, and provide helpful suggestions. it's like a bestie who tells you your outfit is cute but your config is a mess. π
Available in Postfix 3.3 and later:
service_name(read-only) β themaster.cfservice name of a Postfix daemon process. another read-only flex. π
π SEE ALSO π
postconf(5), configuration parameterstransport(5), transport table formatrelocated(5), format of the "user has moved" tablemaster(8), process managerpostlogd(8), Postfix loggingsyslogd(8), system logging
π README FILES π
Use "postconf readme_directory" or "postconf html_directory" to locate this information.
ADDRESS_CLASS_README, Postfix address classes howtoADDRESS_VERIFICATION_README, Postfix address verification
π LICENSE π
The Secure Mailer license must be distributed with this software. periodt. π―
π AUTHOR(S) π
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
and that's a wrap on this page! the footer says it's TRIVIAL-REWRITE(8) from Postfix, with a version and dateβbut i'm not copying that line, just giving it a cute lil sign-off. stay iconic, bestie! πβ¨π¦
π¦ where this page comes from
- alpine 3.22: postfix-doc 3.10.13-r0 Β· IPL-1.0 EPL-2.0
- alpine 3.23: postfix-doc 3.10.13-r0 Β· IPL-1.0 EPL-2.0
- alpine 3.24: postfix-doc 3.11.7-r0 Β· IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- debian trixie: postfix 3.10.13-0+deb13u1
- fedora 43: postfix 2:3.10.14-1.fc43 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 43: postfix 2:3.10.3-3.fc43 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix 2:3.10.14-1.fc44 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix 2:3.10.7-2.fc44 Β· (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- nixos 26.05: postfix 3.11.7
- nixpkgs unstable: postfix 3.11.7
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- opensuse-leap 16.0: postfix-bdb 3.10.2-160000.3.1 Β· EPL-2.0 OR IPL-1.0
- ubuntu questing: postfix 3.10.2-1ubuntu2
- ubuntu questing: postfix 3.10.2-1ubuntu2.1
- ubuntu resolute: postfix 3.10.6-4ubuntu2
- ubuntu resolute: postfix 3.10.6-4ubuntu2.1
- ubuntu resolute: postfix 3.10.6-4ubuntu2.2
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms