Unless indicated otherwise, all parameters described here are in the main.cf file. If you change parameters of a running Postfix system, don't forget to issue a postfix reload command.
All mail:
Local delivery:
You probably should never turn off this feature, because a lot of
Postfix components expect that all addresses have the form
user@domain.
If your machine is not the main machine for $myorigin and
you wish to have some users delivered locally without going via
that main machine, make an entry in the virtual
table that redirects user@$myorigin to user@$myhostname.
Some will argue that rewriting host to host.$mydomain
is bad. That is why it can be turned off. Others like the convenience of having
the local domain appended automatically.
Canonical mapping is disabled by default. To enable, edit the canonical_maps parameter in the main.cf file and specify one or more lookup tables, separated by whitespace or commas. For example:
In addition to the canonical maps which are applied to both sender and recipient addresses, you can specify canonical maps that are applied only to sender addresses or to recipient addresses. For example:
The sender and recipient canonical maps are applied before the common canonical maps.
Sender-specific rewriting is useful when you want to rewrite ugly
sender addresses to pretty ones, and still want to be able to
send mail to the those ugly address without creating a mailer loop.
Address masquerading is disabled by default. To enable, edit the
masquerade_domains parameter in the main.cf
file and specify one or more domain names separated by whitespace
or commas. For example:
In this example, addresses of the form user@host.$mydomain
would be rewritten to user@$mydomain.
The masquerade_exceptions configuration parameter specifies
what user names should not be subjected to address masquerading.
Specify one or more user names separated by whitespace or commas.
For example,
By default, Postfix makes no exceptions.
Subtle point: address masquerading is applied only to message
headers and envelope sender addresses, not to envelope recipients.
Virtual mapping is disabled by default. To enable, edit the
virtual_maps parameter in the main.cf file and
specify one or more lookup tables, separated by whitespace or
commas. For example:
Addresses found in virtual maps are subjected to another iteration
of virtual mapping, but are not subjected to canonical mapping, in
order to avoid loops.
Lookups of relocated users are disabled by default. To enable, edit
the relocated_maps parameter in the main.cf
file and specify one or more lookup tables, separated by whitespace
or commas. For example:
Address masquerading
Address masquerading is a method to hide all hosts below a domain
behind their mail gateway, and to make it appear as if the mail
comes from the gateway itself, instead of from individual machines.
Virtual address mapping
After applying the canonical and masquerade mappings, the cleanup daemon uses the virtual table to redirect mail for all
recipients, local or remote. The mapping affects only envelope
recipients; it has no effect on message headers or envelope senders.
Virtual lookups are useful to redirect mail for virtual domains to
real user mailboxes, and to redirect mail for domains that no longer
exist. Virtual lookups can also be used to transform
Firstname.Lastname back into UNIX login names, although it
seems that local aliases are a more appropriate
vehicle.
Relocated users table
Next, the queue manager runs each recipient name through the
relocated database. This table
provides information on how to reach users that no longer have an
account, or what to do with mail for entire domains that no longer
exist. When mail is sent to an address that is listed in this
table, the message is bounced with an informative message.
Mail transport switch
Once the queue manager has established the destination of a message,
the optional transport table controls
how the message will be delivered (this table is used by the address
rewriting and resolving daemon). By default, everything is sent
via the smtp transport. The transport
table can be used to send mail to specific sites via UUCP,
or to send mail to a really broken mail system that can handle only
one SMTP connection at a time (yes, such systems exist and people
used to pay real money for them).
Transport table lookups are disabled by default. To enable, edit the transport_maps parameter in the main.cf file and specify one or more lookup tables, separated by whitespace or commas. For example:
Alias lookups are enabled by default. The default configuration depends on the system environment, but it is typically one of the following:
The path to the alias database file is controlled via the alias_database configuration parameter. The value is system dependent. Usually it is one of the following:
For security reasons, deliveries to command and file destinations
are performed with the rights of the alias database owner. A
default userid, default_privs, is used for deliveries to
commands/files in root-owned aliases.
Alternatively, mail for non-existent recipients can be delegated
to an entirely different message transport, as specified with the
fallback_transport configuration parameter. For details,
see the local delivery agent.
luser_relay can specify one address. It is subjected to
$name expansions. The most useful examples are:
Per-user .forward files
Users can control their own mail delivery by specifying destinations
in a file called .forward in their home directories. The
syntax of these files is the same as with system aliases, except
that the lookup key and colon are not present.
Non-existent users
When the local delivery agent finds that a message recipient does
not exist, the message is normally bounced to the sender ("user
unknown"). Sometimes it is desirable to forward mail for non-existing
recipients to another machine. For this purpose you can specify
an alternative destination with the luser_relay configuration
parameter.
Up one level |
Basic Configuration | UCE
Controls | Rate Controls | Resource Controls | Address Manipulation