On Thu, 30 Aug 2001, Greg Ward wrote:
> > I'm pretty sure Exim has to wait until all the MX DNS lookups finish
> > until it can start sending mail.
This is correct.
> > This is the reason why qmail sends a
> > separate message for each recipient instead of one per mail exchange.
I thought it was because DJB believes this is faster.
> > AFAIK, Exim has an option to do that as well. According to DJB, the
> > bandwidth wasted by sending separate messages is not significant; it
> > only pays if your messages are large and there are lots of users on the
> > same exchange.
I believe people have disputed this, but I don't want to argue it
myself. I merely note that RFC 2821 says this:
When a mail message is to be delivered to multiple recipients, and
the SMTP server to which a copy of the message is to be sent is the
same for multiple recipients, then only one copy of the message
SHOULD be transmitted. That is, the SMTP client SHOULD use the
command sequence: MAIL, RCPT, RCPT,... RCPT, DATA instead of the
sequence: MAIL, RCPT, DATA, ..., MAIL, RCPT, DATA. However, if there
are very many addresses, a limit on the number of RCPT commands per
MAIL command MAY be imposed. Implementation of this efficiency
feature is strongly encouraged.
And that if, say, 100 of your recipients are on the same host, hitting
it with 100 simultaneous SMTP connections isn't very kind.
> Are his assertions true? Ie., does Exim perform all 1600 MX DNS lookups
> before starting to deliver mail?
Yes. This is a fundamental feature of the Exim design.
If any of the addresses are incomplete (e.g. xyz@myhost instead of
xyz@???) the DNS lookup may expand the address to its
fully qualified form. This may cause a rewrite in the header lines of
the message, which really ought to be done before sending out *any*
copies of the message. Sure, this isn't common, and probably doesn't
apply to mailing lists, but it is an issue to be considered.
> Can 1600 MX DNS lookups cause a 20 min
> delay?
Hmm. 0.75 seconds per lookup. That seems quite long to me. As Richard
Welty says, it pays to have a name server on the mail host.
> And does Exim have an option to send a separate message
> to each recipient?
Yes.
> If so, is its use advised in situations like this?
No, because it still does all the routing first.
If you want parallelism in routing, you must give Exim multiple copies
of the message (e.g. 16 copies with 100 recipients in each).
Philip
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.