On Mon, Apr 21, 2014 at 02:18:41PM -0400, Wietse Venema wrote:
> The following example will deliver local mail locally and load-balance
> non-local mail over smtp0: and smtp1:.
>
> /etc/postfix/main.cf:
> transport_maps = hash:/etc/postfix/transport, randmap:!smtp0:!smtp1:
One caveat is that the queue manager maintains a 1-element cache
of transport mappings, so if a stream of mail is sent to a single
recipient, the load balacing will not kick in. MX records are
better. Instea of using multiple ports on 127.0.0.1 to nat to
remote destinations, use multiple IP addresses of the form 127.0.1.N
and a fixed port, then use an MX record on a multi-homed entry in
/etc/hosts.
--
Viktor.