trivial-rewrite − Postfix address rewriting and resolving daemon


trivial-rewrite [generic Postfix daemon options]


The trivial-rewrite(8) daemon processes three types of client service requests:
context address

Rewrite an address to standard form, according to the address rewriting context:


Append the domain names specified with $myorigin or $mydomain to incomplete addresses; do swap_bangpath and allow_percent_hack processing as described below, and strip source routed addresses (@site,@site:user@domain) to user@domain form.


Append the domain name specified with $remote_header_rewrite_domain to incomplete addresses. Otherwise the result is identical to that of the local address rewriting context. This prevents Postfix from appending the local domain to spam from poorly written remote clients.

resolve sender address

Resolve the address to a (transport, nexthop, recipient, flags) quadruple. The meaning of the results is as follows:

The delivery agent to use. This is the first field of an entry in the file.


The host to send to and optional delivery method information.


The envelope recipient address that is passed on to nexthop.


The address class, whether the address requires relaying, whether the address has problems, and whether the request failed.

verify sender address

Resolve the address for address verification purposes.


The trivial-rewrite(8) servers run under control by the Postfix master server. Each server can handle multiple simultaneous connections. 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 $max_use clients of after $max_idle seconds of idle time.


None. The command does not interact with the outside world.


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.


Problems and transactions are logged to syslogd(8).


On busy mail systems a long time may pass before a change affecting trivial-rewrite(8) is 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.


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.


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 (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 a user name from its extension (example: user+foo), or a .forward file name from its extension (example: .forward+foo).

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.


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)

What Postfix features match subdomains of "domain.tld" automatically, instead of requiring an explicit ".domain.tld" pattern.

relayhost (empty)

The next-hop destination of 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.


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:

Overrides the sender_dependent_relayhost_maps parameter setting for address verification probes.

Available in Postfix version 2.7 and later:

Overrides the sender_dependent_default_transport_maps parameter setting for address verification probes.


config_directory (see ’postconf -d’ output)

The default location of the Postfix and configuration files.

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.

empty_address_recipient (MAILER-DAEMON)

The recipient of mail addressed to the null address.

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 (see ’postconf -d’ output)

The location of the Postfix top-level queue directory.

show_user_unknown_table_name (yes)

Display the name of the recipient table in the "User unknown" responses.

syslog_facility (mail)

The syslog facility of Postfix logging.

syslog_name (see ’postconf -d’ output)

The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd".

Available in Postfix version 2.0 and later:
helpful_warnings (yes)

Log warnings about problematic configuration settings, and provide helpful suggestions.


postconf(1), configuration parameters
transport(5), transport table format
relocated(5), format of the "user has moved" table
master(5), process manager
syslogd(8), system logging


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


The Secure Mailer license must be distributed with this software.


Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA

More Linux Commands

yn(3) - Bessel functions of the second kind - Linux man page
The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x

mesg(1) - display (do not display) messages from other users
The mesg utility is invoked by a user to control write access others have to the terminal device associated with standard error output. If write access is allow

glDepthFunc(3gl) - specify the value used for depth buffer c
glDepthFunc specifies the function used to compare each incoming pixel depth value with the depth value present in the depth buffer. The comparison is performed

strnlen(3) - determine the length of a fixed-size string....
The strnlen() function returns the number of bytes in the string pointed to by s, excluding the terminating null byte (\0), but at most maxlen. In doing this, s

glColor4d(3gl) - set the current color - Linux manual page
The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. glColor has two major va

systemd.automount(5) - systemd automount configuration files
A unit configuration file whose name ends in .automount encodes information about a file system automount point controlled and supervised by systemd. This man p

pam_listfile(8) - deny or allow services based on an arbitra
pam_listfile is a PAM module which provides a way to deny or allow services based on an arbitrary file. The module gets the item of the type specified -- user s

lneato(1) - A Customizable Graph Editor - Linux manual page
lneato is a graph editor for the X Window System. It may be run as a standalone editor, or as a front end for applications that use graphs. It can control multi

git-send-email(1) - Send a collection of patches as emails
Takes the patches given on the command line and emails them out. Patches can be specified as files, directories (which will send all files in the directory), or

border(3ncurses) - create curses borders, horizontal and ver
The border, wborder and box routines draw a box around the edges of a window. Other than the window, each argument is a character with attributes: ls - left sid

fonttosfnt(1) - Wrap a bitmap font in a sfnt (TrueType) wrap
Wrap a bitmap font or a set of bitmap fonts in a sfnt (TrueType or OpenType) wrapper. OPTIONS -v Be verbose. -c Do not crop glyphs. This usually increases file

pair_content(3ncurses) - curses color manipulation routines
Overview curses support color attributes on terminals with that capability. To use these routines start_color must be called, usually right after initscr. Color

We can't live, work or learn in freedom unless the software we use is free.