Q9808 - Exim/exim GitHub Wiki
I have a mailing list exploder on one host, and three other hosts where I want to do the actual deliveries from. How can I get Exim to split a message into groups of recipients between the three hosts?
Set up a router that routes all remote addresses to a specific transport, with a list of your three hosts. For example:
send_to_three:
driver = manualroute
transport = to_three_smtp
route_list = !+local_domains hostA:hostB:hostC
The transport looks like this:
to_three_smtp:
driver = smtp
hosts_randomize
By setting hosts_randomize
, you request that the host list be sorted
randomly each time the transport is called, in order to spread the load.
The number of times the transport is called for each message depends on
the setting of the global option remote_max_parallel
. If it is set to
1, the transport is called only once for each message, so only one host
is used, but different messages use different hosts because of the
randomizing. The max_rcpt
option (default 100) controls the number of
addresses sent in each copy of the message - several copies are sent
over the same connection if necessary. If you want individual messages
to be split between the three hosts, you must set the global option
remote_max_parallel
to 3. This allows Exim to run 3 separate instances
of the transport at once. It will pass one-third of all the addresses to
each instance. Because the host list is randomized, not round-robinned,
there is no guarantee that a single message will use all three hosts,
but on average it should.