Single-Recipient Delivery vs. Multiple-Recipient Delivery

 < Free Open Study > 



Simple Mail Transfer Protocol (SMTP) allows a message to be sent to multiple recipients in one session using multiple RCPT (recipient) commands. For example, a Mail Transfer Agent (MTA) charged with sending the same message to three recipients on server.example.com has at least three ways to do it:

  • Open an SMTP connection to server, send a copy of the message to the first user, send a copy to the second user, send a copy to the third user, and then close the connection (see Figure 12-1).

    click to expand
    Figure 12-1: One SMTP connection, three messages

  • Start three processes, each of which opens an SMTP connection to server, sends a copy of the message to one of the users, and then closes the connection (see Figure 12-2).

    click to expand
    Figure 12-2: Three SMTP connections, one message each

  • Open an SMTP connection to server, send a copy of the message addressed to all three recipients, and then close the connection (see Figure 12-3).

    click to expand
    Figure 12-3: One SMTP connection, three recipients

The first method (one SMTP connection, three messages) is clearly inferior to the third (one SMTP connection, three recipients). Even if the message is tiny, it'll take at least as long as one message to three recipients. And if the message is large, it'll take a lot longer and use more network bandwidth. The only advantage the first method has over the third is that because each copy is sent separately, it would be possible to use VERP (see the next section).

So scratch method one.

The second and third methods are a little more interesting.

The third method only opens one connection to server and only sends one copy of the message. That makes for efficient use of bandwidth.

The second method (three SMTP connections, one message each) uses multiple connections and sends multiple copies of the message. This wastes bandwidth but allows the round-trip delays inherent with SMTP to occur in parallel, and it is usually faster than the third method. It's also simpler than the third method, so the MTA can be coded more directly. And finally, because recipients get their own copy of the message, it's possible for the MTA to use VERP (see the next section).

qmail always uses the second method (single RCPT). There are no patches available to implement the third method (multiple RCPT), and doing so would require major work.

Although there are pathological cases where it can be slower than multiple RCPT, the speed, simplicity, and ability to use VERP afforded by single RCPT delivery outweigh them.

Single RCPT delivery does use more bandwidth than multiple RCPT delivery, but the difference is often exaggerated. Most messages have a couple recipients, and they're usually on separate hosts, so multi-RCPT delivery is not possible. Even on a list server, where multi-RCPT delivery could help, the potential gains are small because SMTP uses only a fraction of the bandwidth over most links—HyperText Transfer Protocol (HTTP) usually gets the lion's share.

For example, if 10 percent of your uplink bandwidth goes to SMTP, and your SMTP bandwidth could be reduced by, say, 25 percent by using multi-RCPT delivery, that would only drop your SMTP bandwidth to 7.5 percent.



 < Free Open Study > 



The Qmail Handbook
The qmail Handbook
ISBN: 1893115402
EAN: 2147483647
Year: 2001
Pages: 186
Authors: Dave Sill

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net