Oh, and another not-yet-mentioned piece of wisdom from Motonori: When
dealing with delivery of a message to multiple sites, having a truly
asynchronous multi-threaded resolver is an incredible win (if the
mail is going to 40 places, launching all 40 DNS queries at once
means that you can start delivering mail as soon as you get the FIRST
DNS reply packet back - even if you're doing MX piggybacking(*),
you're still in the clear as long as any additional replies
indicating piggybacking arrive in time for you to merge in their RCPT
TO: (basically, as long as you haven't gotten to the DATA command).
You can improve that another bit if you a) delay the SMTP connection for
a few tenths of a second from the time of the first DNS reply and b)
base piggybacking on the IP address of each SMTP server rather than MX
name. In my experience, at least.