The simplest way to set up Postfix on a host behind a firewalled
network is to send all mail to a gateway host, and to let that mail
host take care of internal and external forwarding. Examples of that
are shown in the
local area network
section above. A more sophisticated approach is to send only external
mail to the gateway host, and to send intranet mail directly.
That's what Wietse does at work.
Note: this example requires Postfix version 2.0 and later. To find
out what Postfix version you have, execute the command "postconf
The following example presents additional configuration. You
need to combine this with basic configuration information as
discussed the first half of this document.
transport_maps = hash:/etc/postfix/transport
4 # Optional for a machine that isn't "always on"
fallback_relay = [gateway.example.com]
8 # Internal delivery.
9 example.com :
10 .example.com :
11 # External delivery.
Lines 2, 7-12: Request that intranet mail is delivered
directly, and that external mail is given to a gateway. Obviously,
this example assumes that the organization uses DNS MX records
internally. The  forces Postfix to do no MX lookup.
Line 3: IMPORTANT: do not specify a
Line 5: This prevents mail from being stuck in the queue
when the machine is turned off. Postfix tries to deliver mail
directly, and gives undeliverable mail to a gateway.
Specify dbm instead of hash if your system uses
dbm files instead of db files. To find out what lookup
tables Postfix supports, use the command "postconf -m".
Execute the command "postmap /etc/postfix/transport" whenever
you edit the transport table.