TRIVIAL-REWRITE(8postfix)
πΈ NAME πΈ
ok so bestie, meet trivial-rewrite β the TRIVIAL-REWRITE(8postfix) girlie herself π she's the Postfix address rewriting and resolving daemon, and honestly? she's iconic for it.
β¨ SYNOPSIS β¨
trivial-rewrite [generic Postfix daemon options]
π¦ DESCRIPTION π¦
The trivial-rewrite(8) daemon is out here handling three (yes, three) types of client service requests. Not two, not four. Three. Slay π
rewrite context address
She rewrites an address into standard form, based on the address rewriting context, and the contexts are:
localβ appends the domain names specified with$myoriginor$mydomainonto incomplete addresses π also does theswap_bangpathandallow_percent_hackprocessing (more on those below, don't worry), and strips source routed addresses in the form@site,@site:user@domaindown touser@domainform. Clean. Fresh. Minimal. Periodt.remoteβ appends the domain name specified with$remote_header_rewrite_domainonto incomplete addresses. Other than that? The result is identical to what thelocaladdress rewriting context gives you. This whole thing exists so Postfix does not append the local domain onto spam from poorly written remote clients π iconic protective behaviour honestly.
resolve sender address
She resolves the address into a (transport, nexthop, recipient, flags) quadruple π and the meaning of each piece goes like this:
- transport β the delivery agent to use. This is the first field of an entry in the
master.cffile. - nexthop β the host to send to, plus optional delivery method information.
- recipient β the envelope recipient address that gets passed on to nexthop.
- flags β the address class, whether the address requires relaying, whether the address has problems, and whether the request failed. So like, a whole vibe check in one field, ngl.
verify sender address
She resolves the address for address verification purposes π«Ά
π SERVER PROCESS MANAGEMENT π
The trivial-rewrite(8) servers run under the control of the Postfix master(8) server π Each server can handle multiple simultaneous connections at once β multitasking queen.
When all the servers are busy while a client connects, the master creates a new server process, provided that the trivial-rewrite server process limit has not been exceeded π«
Each trivial-rewrite server terminates after serving at least $max_use clients, or after $max_idle seconds of idle time. She's done, she's resting, don't @ her π€
π STANDARDS π
None. The command does not interact with the outside world. She's an indoor cat, fr fr π±
π SECURITY π
The trivial-rewrite(8) 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 π§ lowkey unbothered, highkey safe.
π DIAGNOSTICS π
Problems and transactions are logged to syslogd(8) or postlogd(8).
π CONFIGURATION PARAMETERS π
Real talk bestie: on busy mail systems, a long time may pass before a main.cf change that affects trivial-rewrite(8) gets picked up. Use the command postfix reload to speed up a change β‘
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.
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) β resolveuser@ipaddressasuser@[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.
π 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 formuser%domaintouser@domain.append_at_myorigin(yes) β with locally submitted mail, append the string@$myoriginto mail addresses without domain information.append_dot_mydomain(Postfix >= 3.0: no, Postfix < 3.0: yes) β with locally submitted mail, append the string.$mydomainto addresses that have no.domaininformation.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 ofsite!userintouser@site.
Available in Postfix 2.2 and later:
remote_header_rewrite_domain(empty) β don't rewrite message headers from remote clients at all when this parameter is empty; otherwise, rewrite message headers and append the specified domain name to incomplete addresses.
π 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 π
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 remote delivery to domains listed with$relay_domains.default_transport(smtp) β the default mail delivery transport and next-hop destination for destinations that do not match$mydestination,$inet_interfaces,$proxy_interfaces,$virtual_alias_domains,$virtual_mailbox_domains, or$relay_domains.parent_domain_matches_subdomains(seepostconf -doutput) β a list of Postfix features where the patternexample.comalso matches subdomains ofexample.com, instead of requiring an explicit.example.compattern.relayhost(empty) β the next-hop destination(s) for non-local mail; overrides 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. 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, these are the extra little knobs and dials that don't fit anywhere else but are still super important. no skipping, fr fr.
config_directoryβ the default location of the Postfixmain.cfandmaster.cfconfiguration files. (seepostconf -doutput) so if you're lost, that's where the config lives π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 don't ghost the watchdog, bestie β°empty_address_recipient(MAILER-DAEMON) β the recipient of mail addressed to the null address. the void gets a name πipc_timeout(3600s) β the time limit for sending or receiving information over an internal communication channel.max_idle(100s) β the maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.max_use(100) β the maximal number of incoming connections that a Postfix daemon process will service before terminating voluntarily.relocated_maps(empty) β optional lookup tables with new contact information for users or domains that no longer exist.process_id(read-only) β the process ID of a Postfix command or daemon process.process_name(read-only) β the process name of a Postfix command or daemon process.queue_directoryβ the location of the Postfix top-level queue directory. (seepostconf -doutput)show_user_unknown_table_name(yes) β display the name of the recipient table in the"User unknown"responses. so when it says user unknown, it's naming names πsyslog_facility(mail) β the syslog facility of Postfix logging.syslog_nameβ a prefix that is prepended to the process name in syslog records, so that, for example,smtpdbecomesprefix/smtpd. (seepostconf -doutput)
β¨ Available in Postfix version 2.0 and later: β¨
helpful_warnings(yes) β log warnings about problematic configuration settings, and provide helpful suggestions. we love a warning that actually helps π
β¨ Available in Postfix 3.3 and later: β¨
service_name(read-only) β themaster.cfservice name of a Postfix daemon process.
π 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.
π 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
k love u, bye π this page was TRIVIAL-REWRITE(8postfix) (source/version) and the date is whatever the footer says β iconic, periodt β¨π
π¦ where this page comes from
- debian bookworm: postfix 3.7.11-0+deb12u1
- ubuntu noble: postfix 3.8.6-1build2
- ubuntu noble: postfix 3.8.6-1ubuntu0.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms