28.06.2014 Views

Postfix Overview - Introduction - SCN Research

Postfix Overview - Introduction - SCN Research

Postfix Overview - Introduction - SCN Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Postfix</strong> Configuration - Address Manipulation<br />

Rewrite site!user to user@site<br />

This feature is controlled by the boolean swap_bangpath parameter (default: yes). The purpose is to<br />

rewrite UUCP-style addresses to domain style. This is useful only when you receive mail via UUCP, but<br />

it probably does not hurt otherwise.<br />

Rewrite user%domain to user@domain<br />

This feature is controlled by the boolean allow_percent_hack parameter (default: yes). Typically, this is<br />

used in order to deal with monstrosities such as user%domain@otherdomain.<br />

Rewrite user to user@$myorigin<br />

This feature is controlled by the boolean append_at_myorigin parameter (default: yes). The purpose is<br />

to get consistent treatment of user on every machine in $myorigin.<br />

You probably should never turn off this feature, because a lot of <strong>Postfix</strong> components expect that all<br />

addresses have the form user@domain.<br />

If your machine is not the main machine for $myorigin and you wish to have some users delivered<br />

locally without going via that main machine, make an entry in the virtual table that redirects<br />

user@$myorigin to user@$myhostname.<br />

Rewrite user@host to user@host.$mydomain<br />

This feature is controlled by the boolean append_dot_mydomain parameter (default: yes). The purpose<br />

is to get consistent treatment of different forms of the same hostname.<br />

Some will argue that rewriting host to host.$mydomain is bad. That is why it can be turned off. Others<br />

like the convenience of having the local domain appended automatically.<br />

Rewrite user@site. to user@site (without the trailing dot).<br />

Canonical address mapping<br />

Before the cleanup daemon stores inbound mail into the incoming queue, it uses the canonical table to rewrite<br />

all addresses in message envelopes and in message headers, local or remote. The mapping is useful to replace<br />

login names by Firstname.Lastname style addresses, or to clean up invalid domains in mail addresses produced<br />

by legacy mail systems.<br />

Canonical mapping is disabled by default. To enable, edit the canonical_maps parameter in the main.cf file<br />

and specify one or more lookup tables, separated by whitespace or commas. For example:<br />

canonical_maps = hash:/etc/postfix/canonical<br />

In addition to the canonical maps which are applied to both sender and recipient addresses, you can specify<br />

canonical maps that are applied only to sender addresses or to recipient addresses. For example:<br />

sender_canonical_maps = hash:/etc/postfix/sender_canonical<br />

recipient_canonical_maps = hash:/etc/postfix/recipient_canonical<br />

The sender and recipient canonical maps are applied before the common canonical maps.<br />

Page 2 of 5<br />

Sender-specific rewriting is useful when you want to rewrite ugly sender addresses to pretty ones, and still want<br />

to be able to send mail to the those ugly address without creating a mailer loop.<br />

http://www.porcupine.org/postfix-mirror/rewrite.html<br />

6/26/01

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!