How do I set up my colo box to relay email for my domain (xcski.com) to my home box? Both are currently running postfix, and currently the colo box receives email for a bunch of domains and my home box receives the email for xcski.com. I'd rather receive the mail on the colo box since it's on a static IP. Ideally since my wife forwards all her mail to gmail, I'd like it so I can forward mail for some of the accounts on the colo box directly.

2 Answers 2


Apart from the obivious (changing the DNS to make your colo box the mail server for your domain), you can use the postfix transport map to forward mail for a domain to another machine. Your colo box will act as a forwarder/relay for your domain, but this will be invisible to the outside world.

If you want to selectively forward email on the colo box, you can do this using the virtual domains mechanism in postfix as you can specify a destination for each recipient in that one.


It's all about address classes (it's always all about address classes in Postfix :-)).

Make your colo box the MX for xcski.com and use transport maps to send mail to your home box. You probably want virtual aliases to separate out the addresses in xcski.com that need to go to different places. That could go on the colo box or your home box. The below assumes you're doing the virtual aliasing and selective forwarding on the nexthop (home).

in main.cf on the colo box:

relay_domains = xcski.com
transport_maps = hash:$config_directory/transport

and in /etc/postfix/transport:

# assumes you have a relay transport in master.cf. could happily use smtp.
# square brackets suppress MX lookups for nexthop.
xcski.com  relay:[hostname.of.home.box]

The postfix STANDARD_CONFIGURATION_README should cover most of it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .