On Mon, 23 Jul 2001, Simon Huggins wrote:
> So I have n subscribers @wanadoo.fr for instance and to be more
> efficient exim should only try to contact the MX for wanadoo once really
> but I have various other subscribers at random domains. Enabling
> remote_max_parallel seems to imply that even for the same host it will
> make different connections which seems suboptimal. However it is an
> option I want to use if I want to get the messages out to everyone
> reasonably speedily.
Unless you have set max_rcpt in the smtp transport to less than n, Exim
will send _one_ copy of message to wanadoo.fr, with n RCPT commands,
whatever the setting of remote_max_parallel.
The interesting case is when max_rcpt is less than n. Suppose you have
set max_rcpt = m, which is less than n.
In Exim 3:
----------
Exim will make ceil(n/m) connections to the remote host, and in each
connection it will send one copy of the message, with m recipients
(except for the last one, of course, which may have fewer). [For
example, if n is 11 and m is 2, there will be 6 connections, 5 with 2
recipients, and one with 1.]
If remote_max_parallel is greater than 1, the connections may or may not
be made in parallel, depending on the other recipients of the message.
In Exim 4:
----------
In Exim 4, the setting of remote_max_parallel is taken into account and
it's more complicated. Suppose remote_max_parallel = r and we have
max_rcpt = m and n recipients, as before, where n is greater than m.
Exim is prepared to make up to r connections to the host, and in each
connection, the greater of m and n/r recipients are handled.
If n/r is less than m, then there will be fewer than r connections. [For
example, if r = 4, m = 3, n = 8, n/r = 2 which is less than m. So there
will be 3 connections, sending 3, 3, and 2 recipients respectively.]
However, if n/r is greater than m, there will be r connections, and each
connection will sent multiple copies of the message, each (except the
last) with m recipients. The connections may or may not be made in
parallel, depending on the other recipients of the message. [For
example, if r = 4, m = 1, n = 8, n/r is 2, which is greater than m. So
there will be 4 connections, each handling two recipients. But since m =
1, each connection will have to send two copies of the message.]
I hope this makes sense.
Exim 4 is not, of course, released yet, so there is no experience as to
whether the more complicated approach is beneficial, and if so, by how
much. What I was trying to do in making this change was to take a
balance between using multiple parallel connections and sending multiple
copies of the message down a single connection. In case this isn't
wanted, I built in an option called max_copies_per_connection, which
limits the number of copies sent down one connection. The default is 50.
By setting it to 1 you get back to the Exim 3 behaviour.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.