Address Rewriting and Masquerading

Postfix offers a relatively easy to use, and flexible, address rewriting system, allowing it to act as a mail gateway for a large network, or as a gateway between legacy mail systems and the Internet at large (Figure 10-4).

click to expand
Figure 10-4: Address Rewriting and Masquerading

Note 

The options on this page are also discussed on the Postfix Configuration - Address Manipulation [http://www.postfix.org/rewrite.html] page at the Postfix homepage. It is worth reading if advanced address rewriting is required in your mail system.

Rewrite “user%domain” to “user@domain”

This option is useful for some legacy systems that used strange address trickery such as, user%domain@otherdomain. It is not generally useful in modern environments, but it is not harmful so usually defaults to Yes. This option correlates to the allow_percent_hack directive.

Rewrite “user” to “user@$mydomain”

This option configures how Postfix will handle an address that has no domain name in the destination. If enabled, it will append the value of $mydomain to the address. This option correlates to the append_at_myorigin directive and defaults to Yes. Because most Postfix components expect addresses to be of the form user@domain it is probably never appropriate to disable this feature.

Rewrite “user@host” to “user@host.$mydomain”

This option configures whether simple host addresses will have the value of $mydomain appended to them. This option correlates to the append_dot_mydomain directive and defaults to Yes. Some administrators may find that this explicit rewrite has unexpected consequences, but it is very rarely a problem.

Rewrite “site!user” to “user@site”

Legacy UUCP networks use a different addressing format than modern SMTP systems. This option enables Postfix to convert the old-style address to a modern address for delivery via the standard SMTP protocol. This option configures the swap_bangpath directive and defaults to Yes.

Send mail with empty recipient to...

The specifies the destination of mail that is undeliverable. Typically, this will be bounce notifications and other error messages. This option correlates to the empty_address_recipient directive and defaults to MAILER-DAEMON, which by default is simply an alias to postmaster.

Address masquerading

Address masquerading is a method whereby hosts behind the gateway mail server may be hidden, and all mail will appear to have originated from the gateway server. If enabled, the host and/or subdomain portion of an address will be stripped off and only the domain specified here will be included in the address. For example, if $mydomain is specified here, an outgoing mail from joe@joesmachine.swelltech.com would become simply joe@swelltech.com, assuming the $mydomain variable contains swelltech.com. This option correlates to the masquerade_domains directive and it is disabled by default.

Masquerade exceptions

It is possible to skip over the masquerade rules define above for some user names. The names to be excepted from those rules can be entered here. This option corresponds to the masquerade_exceptions directive and by default no exceptions are made.



The Book of Webmin... or How I Learned to Stop Worrying and Love UNIX
The Book of Webmin: Or How I Learned to Stop Worrying and Love UNIX
ISBN: 1886411921
EAN: 2147483647
Year: 2006
Pages: 142
Authors: Joe Cooper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net