TRIVIAL-REWRITE(8postfix)

πŸ“¦
version 3.8.6 Β· 2 versions
, in debian bookworm, ubuntu noble

🌸 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 $myorigin or $mydomain onto incomplete addresses πŸ’Œ also does the swap_bangpath and allow_percent_hack processing (more on those below, don't worry), and strips source routed addresses in the form @site,@site:user@domain down to user@domain form. Clean. Fresh. Minimal. Periodt.
  • remote β€” appends the domain name specified with $remote_header_rewrite_domain onto incomplete addresses. Other than that? The result is identical to what the local address 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.cf file.
  • 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) β€” 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.

πŸ“ 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 .forward file 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) β€” 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 with mydestination, and for [ipaddress] destinations that match $inet_interfaces or $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 (see postconf -d output) β€” a list of Postfix features where the pattern example.com also matches subdomains of example.com, instead of requiring an explicit .example.com pattern.
  • 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 global relayhost parameter setting.

Available in Postfix version 2.5 and later:

  • empty_address_relayhost_maps_lookup_key (<>) β€” the sender_dependent_relayhost_maps search 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 (<>) β€” the sender_dependent_default_transport_maps search string that will be used instead of the null sender address.
  • sender_dependent_default_transport_maps (empty) β€” a sender-dependent override for the global default_transport parameter 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 the local_transport parameter setting for address verification probes.
  • address_verify_virtual_transport ($virtual_transport) β€” overrides the virtual_transport parameter setting for address verification probes.
  • address_verify_relay_transport ($relay_transport) β€” overrides the relay_transport parameter setting for address verification probes.
  • address_verify_default_transport ($default_transport) β€” overrides the default_transport parameter setting for address verification probes.
  • address_verify_relayhost ($relayhost) β€” overrides the relayhost parameter setting for address verification probes.
  • address_verify_transport_maps ($transport_maps) β€” overrides the transport_maps parameter setting for address verification probes.

Available in Postfix version 2.3 and later:

  • address_verify_sender_dependent_relayhost_maps ($sender_dependent_relayhost_maps) β€” overrides the sender_dependent_relayhost_maps parameter 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 the sender_dependent_default_transport_maps parameter 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 Postfix main.cf and master.cf configuration files. (see postconf -d output) 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. (see postconf -d output)
  • 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, smtpd becomes prefix/smtpd. (see postconf -d output)

✨ 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) β€” the master.cf service name of a Postfix daemon process.

🌈 SEE ALSO 🌈


πŸ“š README FILES πŸ“š

Use postconf readme_directory or postconf html_directory to locate this information.

  • ADDRESS_CLASS_README, Postfix address classes howto
  • ADDRESS_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