[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Qmail/Postfix/Sendmail for fastest outgoing mail



On Mon, Nov 25, 2002 at 01:00:51PM +1100, Jason Lim wrote:
> I don't want to spark a flame war or anything... but for purely
> outgoing mailing (sending emails), which mail package would be
> fastest?

if you're using VERP (Variable Envelope Return Path), postfix is a
little faster than qmail.  if you're not using VERP, postfix is *MUCH*
faster than qmail.

> I know people have complained about Qmail's way of sending emails...
> in that it creates a connection for each email rather than bunching
> them up like Sendmail, but then how does Postfix operate
> (similar/hybrid)? It hear Postfix does something fancy in that regard
> that is a mix or something, but since I'm no Postfix expert, perhaps
> someone knows more about this?

postfix can do either, depending on how you use it.

by default, postfix does the same as sendmail - multiple emails to
different recipients at the same domain will be sent in one SMTP
session.  actually, postfix performs much better than sendmail in this
instance because for any given message with multiple recipients, postfix
will open multiple connections to *different* servers in parallel,
whereas, for the same message, sendmail will open only one connection to
each server in turn.

if you use VERP for completely automated bounce-detection then postfix
will send one message per recipient the same as qmail, even if several
recipients are @ the same domain - VERP requires this to work.


actually, even sendmail can send one message per recipient, *IFF* your
mailing list software sends one message per recipient.  qmail and
postfix can, by using VERP, do the same even when the mailing list sends
only one message with a huge CC or BCC list.

to summarise:

 - qmail *always* sends one message per recipient, whether it
   makes sense to do so or not.
 - postfix can do either, depending on what you tell it to do.
 - sendmail can do either, depending on what it is given to do.


> The reason I ask is that we have a number of Qmail servers right now,
> and they are heavily loaded because they also run Apache, DNS, and
> other stuff. My idea was to get Qmail to send all email quickly to the
> "pure Email box" (mail relay), and have the Email box handle all the
> actual grunt work of sending to remote hosts. All servers are
> connected together by 100Mbps so no bottleneck there. We can't stop
> using Qmail on the multi-purpose servers because the whole system is
> setup and downtime is unacceptable, but do you think having the Qmail
> relay all email to the Email box, then having them actually sent would
> benefit? We're talking about 2-3 million emails per day, which the
> Qmails have done well so far but because Apache is getting loaded,
> Qmail is slowing up and the number of concurrent connections it can
> handle has been dropping.

it'll take the mail delivery load off your multi-purpose boxes, but
won't result in much faster delivery (although you'll get some benefit
simply because you're spreading the same load over more machines).

however, it won't solve the multiple-recipients-at-one-domain problem.
if qmail relays individual messages via a postfix box, then the postfix
box will have individual messages in it's queue - it can't recombine
them into one message.  i.e. the "damage" has already been done.


> I'm *thinking* it would because then the Qmail servers would not need
> to create so many simultaneous connections to slow remote hosts
> (waiting around and stuff), and instead would be able to get email off
> faster to the Email box and thus free up load on the Qmail servers, so
> they can do other stuff more (Apache).

yep, it will get the mail off the qmail boxes ASAP, which will be some
improvement at least.

craig

-- 
craig sanders <cas@taz.net.au>

Fabricati Diem, PVNC.
 -- motto of the Ankh-Morpork City Watch



Reply to: