I would suggest using the 'vitual user' system and a port redirector.
Make some redirects, eg
mail4user1@my.domain redirects to mail4user1@host2.my.domain
You can redirect an entire domain with
@my.domain redirects to @host2.my.domain
Each is a fqdn with a valid dns MX record for each smtp server.
The last server can have any host name so long as it resolves.
The redirect will wrap another address header around the mail which keeps the original address intact.
No local copy is held on the first server.
Then add an iptables rule,
iptables -t nat -I PREROUTING -p tcp --dport 25 -d host2.ip.address -j DNAT --to-destination host2.ip.address:port#
to redirect to the other smtp server.
You'll have to check your RELAYing rules to allow this.
I've done this with Sendmail 'aliases' and 'virtusers' but I don't use Postfix, so the actual commands and files you will need to find for this.
Last edited by peter_robb; 03-18-2003 at 02:44 PM.
|