Re: [exim] Limits on address expansion

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: Magnus Holmgren
CC: exim-users
Temat: Re: [exim] Limits on address expansion
On Sat, 10 Feb 2007, Magnus Holmgren wrote:

> > Exim will process the recipients of the message serially, so it may take
> > quite a while for the last student to get his copy. but Exim certainly
> > won't have a problem with it, nor make a problem for its host.
>
> Exim will route all recipients of the message serially before actually
> delivering (transporting), so it may take a long while for any recipient to
> get their copy, depending on how many recipients are remote. After routing,
> local deliveries are performed serially, while up to remote_max_parallel
> remote deliveries are performed concurrently.


Yes, that's right. One of the reasons for doing all the routing first is
that you can then discover how many of the recipients are routed to the
same servers - and send just a single copy for them. So if all your
20000 recipients are at hotmail, you don't send 20000 copies of the
message.

Another reason for doing all the routing first is that sometimes, the
result of routing causes a rewrite of one or more of the headers. This
can happen if the configuration allows non-FQDN domains. This is not
something that I recommend, but it is something that certain sites used
to do - and some still do (there was a very recent query about it). For
example, if a message is sent from x@localname1 to y@localname2,
containing

From: x@localname1
To: y@localname2

then the DNS lookups for localname1 and localname2 can be configured to
expand them to localname1.something.tld and localname2.something.tld
respectively. Exim will then rewrite the From: and the To:
appropriately. This is particularly important if there are off-site
recipients, because you should only send FQDNs off-site.

In order for this to work, all the routing must be done before any of
the deliveries. In practice, Exim does not hold up delivery if some of
the addresses cannot be routed (DNS unreachable, for example). This is a
compromise, not perfect, but "good enough" solution.

Of course, in principle, the routing could be done in parallel while
still doing all the routing before any delivering. However, I do tend to
go for the "keep it simple" solution where I can. In fact, the original
releases of Exim also did all deliveries serially, but that was made
more complicated so that multiple remote deliveries could proceed in
parallel, as Magnus says.

Doing parallel routing might be in danger of losing the
same_domain_copy_routing optimization.

In practice, people who are delivering to thousands of recipients
usually use some kind of mailing list software, and such applications
can be configured to limit the number of recipients per message to a
hundred or so. If you do that, you get the benefits of parallel routing
from the multiple messages.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book